From ff8c1e80df5f0ea1d3639c0c2f712c744d17f642 Mon Sep 17 00:00:00 2001 From: Sashank Appireddy Date: Wed, 27 Jun 2018 23:04:34 +0000 Subject: [PATCH] Add dependencies needed for mesos containerizer --- Godeps/Godeps.json | 108 + vendor/github.com/Rican7/retry/.travis.yml | 39 + vendor/github.com/Rican7/retry/LICENSE | 19 + vendor/github.com/Rican7/retry/Makefile | 83 + vendor/github.com/Rican7/retry/README.md | 101 + .../Rican7/retry/backoff/backoff.go | 67 + .../github.com/Rican7/retry/jitter/jitter.go | 89 + vendor/github.com/Rican7/retry/retry.go | 36 + .../Rican7/retry/strategy/strategy.go | 85 + .../gogo/protobuf/gogoproto/Makefile | 37 + .../github.com/gogo/protobuf/gogoproto/doc.go | 169 + .../gogo/protobuf/gogoproto/gogo.pb.go | 804 + .../gogo/protobuf/gogoproto/gogo.pb.golden | 45 + .../gogo/protobuf/gogoproto/gogo.proto | 132 + .../gogo/protobuf/gogoproto/helper.go | 357 + .../protoc-gen-gogo/descriptor/Makefile | 36 + .../protoc-gen-gogo/descriptor/descriptor.go | 118 + .../descriptor/descriptor.pb.go | 2150 + .../descriptor/descriptor_gostring.gen.go | 721 + .../protoc-gen-gogo/descriptor/helper.go | 390 + vendor/github.com/mesos/mesos-go/LICENSE | 201 + vendor/github.com/mesos/mesos-go/NOTICE | 13 + .../mesos-go/api/v1/lib/agent/agent.pb.go | 16909 ++++ .../api/v1/lib/agent/agent.pb_ffjson.go | 14735 ++++ .../mesos-go/api/v1/lib/agent/agent.proto | 690 + .../mesos-go/api/v1/lib/agent/calls/calls.go | 256 + .../api/v1/lib/agent/calls/calls_generated.go | 129 + .../mesos-go/api/v1/lib/agent/calls/gen.go | 3 + .../mesos/mesos-go/api/v1/lib/client.go | 71 + .../mesos-go/api/v1/lib/client/client.go | 54 + .../mesos/mesos-go/api/v1/lib/debug/logger.go | 17 + .../mesos/mesos-go/api/v1/lib/doc.go | 3 + .../api/v1/lib/encoding/codecs/codecs.go | 33 + .../api/v1/lib/encoding/framing/decoder.go | 34 + .../api/v1/lib/encoding/framing/framing.go | 70 + .../mesos-go/api/v1/lib/encoding/json/json.go | 28 + .../mesos-go/api/v1/lib/encoding/proto/doc.go | 4 + .../api/v1/lib/encoding/proto/encoding.go | 30 + .../mesos-go/api/v1/lib/encoding/types.go | 111 + .../mesos/mesos-go/api/v1/lib/filters.go | 26 + .../mesos/mesos-go/api/v1/lib/fixedpoint.go | 35 + .../api/v1/lib/httpcli/apierrors/apierrors.go | 161 + .../mesos-go/api/v1/lib/httpcli/auth_basic.go | 33 + .../mesos/mesos-go/api/v1/lib/httpcli/http.go | 614 + .../mesos/mesos-go/api/v1/lib/httpcli/opts.go | 53 + .../mesos/mesos-go/api/v1/lib/labels.go | 95 + .../mesos/mesos-go/api/v1/lib/mesos.pb.go | 72228 ++++++++++++++++ .../mesos-go/api/v1/lib/mesos.pb_ffjson.go | 63507 ++++++++++++++ .../mesos/mesos-go/api/v1/lib/mesos.proto | 3520 + .../mesos/mesos-go/api/v1/lib/ranges.go | 253 + .../mesos/mesos-go/api/v1/lib/recordio/doc.go | 5 + .../mesos-go/api/v1/lib/recordio/reader.go | 145 + .../mesos-go/api/v1/lib/recordio/strconv.go | 117 + .../mesos-go/api/v1/lib/recordio/writer.go | 34 + .../mesos/mesos-go/api/v1/lib/resources.go | 1145 + .../mesos/mesos-go/api/v1/lib/roles/role.go | 82 + .../mesos/mesos-go/api/v1/lib/values.go | 142 + vendor/github.com/pquerna/ffjson/LICENSE | 202 + vendor/github.com/pquerna/ffjson/NOTICE | 8 + .../pquerna/ffjson/fflib/v1/buffer.go | 421 + .../pquerna/ffjson/fflib/v1/buffer_nopool.go | 11 + .../pquerna/ffjson/fflib/v1/buffer_pool.go | 105 + .../pquerna/ffjson/fflib/v1/bytenum.go | 88 + .../pquerna/ffjson/fflib/v1/decimal.go | 378 + .../pquerna/ffjson/fflib/v1/extfloat.go | 668 + .../pquerna/ffjson/fflib/v1/fold.go | 121 + .../pquerna/ffjson/fflib/v1/ftoa.go | 542 + .../pquerna/ffjson/fflib/v1/internal/atof.go | 936 + .../pquerna/ffjson/fflib/v1/internal/atoi.go | 213 + .../ffjson/fflib/v1/internal/extfloat.go | 668 + .../pquerna/ffjson/fflib/v1/internal/ftoa.go | 475 + .../pquerna/ffjson/fflib/v1/iota.go | 161 + .../pquerna/ffjson/fflib/v1/jsonstring.go | 512 + .../pquerna/ffjson/fflib/v1/lexer.go | 937 + .../pquerna/ffjson/fflib/v1/reader.go | 512 + .../ffjson/fflib/v1/reader_scan_generic.go | 34 + 76 files changed, 188164 insertions(+) create mode 100644 vendor/github.com/Rican7/retry/.travis.yml create mode 100644 vendor/github.com/Rican7/retry/LICENSE create mode 100644 vendor/github.com/Rican7/retry/Makefile create mode 100644 vendor/github.com/Rican7/retry/README.md create mode 100644 vendor/github.com/Rican7/retry/backoff/backoff.go create mode 100644 vendor/github.com/Rican7/retry/jitter/jitter.go create mode 100644 vendor/github.com/Rican7/retry/retry.go create mode 100644 vendor/github.com/Rican7/retry/strategy/strategy.go create mode 100644 vendor/github.com/gogo/protobuf/gogoproto/Makefile create mode 100644 vendor/github.com/gogo/protobuf/gogoproto/doc.go create mode 100644 vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.go create mode 100644 vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.golden create mode 100644 vendor/github.com/gogo/protobuf/gogoproto/gogo.proto create mode 100644 vendor/github.com/gogo/protobuf/gogoproto/helper.go create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/Makefile create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.go create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go create mode 100644 vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/helper.go create mode 100644 vendor/github.com/mesos/mesos-go/LICENSE create mode 100644 vendor/github.com/mesos/mesos-go/NOTICE create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/agent/agent.pb.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/agent/agent.pb_ffjson.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/agent/agent.proto create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/agent/calls/calls.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/agent/calls/calls_generated.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/agent/calls/gen.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/client.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/client/client.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/debug/logger.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/doc.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/codecs/codecs.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/framing/decoder.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/framing/framing.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/json/json.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/proto/doc.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/proto/encoding.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/types.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/filters.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/fixedpoint.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/httpcli/apierrors/apierrors.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/httpcli/auth_basic.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/httpcli/http.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/httpcli/opts.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/labels.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/mesos.pb.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/mesos.pb_ffjson.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/mesos.proto create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/ranges.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/recordio/doc.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/recordio/reader.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/recordio/strconv.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/recordio/writer.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/resources.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/roles/role.go create mode 100644 vendor/github.com/mesos/mesos-go/api/v1/lib/values.go create mode 100644 vendor/github.com/pquerna/ffjson/LICENSE create mode 100644 vendor/github.com/pquerna/ffjson/NOTICE create mode 100644 vendor/github.com/pquerna/ffjson/fflib/v1/buffer.go create mode 100644 vendor/github.com/pquerna/ffjson/fflib/v1/buffer_nopool.go create mode 100644 vendor/github.com/pquerna/ffjson/fflib/v1/buffer_pool.go create mode 100644 vendor/github.com/pquerna/ffjson/fflib/v1/bytenum.go create mode 100644 vendor/github.com/pquerna/ffjson/fflib/v1/decimal.go create mode 100644 vendor/github.com/pquerna/ffjson/fflib/v1/extfloat.go create mode 100644 vendor/github.com/pquerna/ffjson/fflib/v1/fold.go create mode 100644 vendor/github.com/pquerna/ffjson/fflib/v1/ftoa.go create mode 100644 vendor/github.com/pquerna/ffjson/fflib/v1/internal/atof.go create mode 100644 vendor/github.com/pquerna/ffjson/fflib/v1/internal/atoi.go create mode 100644 vendor/github.com/pquerna/ffjson/fflib/v1/internal/extfloat.go create mode 100644 vendor/github.com/pquerna/ffjson/fflib/v1/internal/ftoa.go create mode 100644 vendor/github.com/pquerna/ffjson/fflib/v1/iota.go create mode 100644 vendor/github.com/pquerna/ffjson/fflib/v1/jsonstring.go create mode 100644 vendor/github.com/pquerna/ffjson/fflib/v1/lexer.go create mode 100644 vendor/github.com/pquerna/ffjson/fflib/v1/reader.go create mode 100644 vendor/github.com/pquerna/ffjson/fflib/v1/reader_scan_generic.go diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index 31a85a89..db507074 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -21,6 +21,26 @@ "Comment": "v0.3.2", "Rev": "862b6557927a5c5c81e411c12aa6de7e566cbb7a" }, + { + "ImportPath": "github.com/Rican7/retry", + "Comment": "v0.1.0-9-g272ad12", + "Rev": "272ad122d6e5ce1be757544007cf8bcd1c9c9ab0" + }, + { + "ImportPath": "github.com/Rican7/retry/backoff", + "Comment": "v0.1.0-9-g272ad12", + "Rev": "272ad122d6e5ce1be757544007cf8bcd1c9c9ab0" + }, + { + "ImportPath": "github.com/Rican7/retry/jitter", + "Comment": "v0.1.0-9-g272ad12", + "Rev": "272ad122d6e5ce1be757544007cf8bcd1c9c9ab0" + }, + { + "ImportPath": "github.com/Rican7/retry/strategy", + "Comment": "v0.1.0-9-g272ad12", + "Rev": "272ad122d6e5ce1be757544007cf8bcd1c9c9ab0" + }, { "ImportPath": "github.com/SeanDolphin/bqschema", "Rev": "f92a08f515e1bf718e995076a37c2f534b1deb08" @@ -394,11 +414,21 @@ "Comment": "v3", "Rev": "c7fdd8b5cd55e87b4e1f4e372cdb1db61dd6c66f" }, + { + "ImportPath": "github.com/gogo/protobuf/gogoproto", + "Comment": "v0.4-3-gc0656edd", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, { "ImportPath": "github.com/gogo/protobuf/proto", "Comment": "v0.4-3-gc0656edd", "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" }, + { + "ImportPath": "github.com/gogo/protobuf/protoc-gen-gogo/descriptor", + "Comment": "v0.4-3-gc0656edd", + "Rev": "c0656edd0d9eab7c66d1eb0c568f9039345796f7" + }, { "ImportPath": "github.com/gogo/protobuf/sortkeys", "Comment": "v0.4-3-gc0656edd", @@ -479,6 +509,76 @@ "ImportPath": "github.com/matttproud/golang_protobuf_extensions/pbutil", "Rev": "fc2b8d3a73c4867e51861bbdd5ae3c1f0869dd6a" }, + { + "ImportPath": "github.com/mesos/mesos-go/api/v1/lib", + "Comment": "mesos-1.4.x-33-g29de6ff", + "Rev": "29de6ff97b48c29cb5ac07029ed75186e5ba0eed" + }, + { + "ImportPath": "github.com/mesos/mesos-go/api/v1/lib/agent", + "Comment": "mesos-1.4.x-33-g29de6ff", + "Rev": "29de6ff97b48c29cb5ac07029ed75186e5ba0eed" + }, + { + "ImportPath": "github.com/mesos/mesos-go/api/v1/lib/agent/calls", + "Comment": "mesos-1.4.x-33-g29de6ff", + "Rev": "29de6ff97b48c29cb5ac07029ed75186e5ba0eed" + }, + { + "ImportPath": "github.com/mesos/mesos-go/api/v1/lib/client", + "Comment": "mesos-1.4.x-33-g29de6ff", + "Rev": "29de6ff97b48c29cb5ac07029ed75186e5ba0eed" + }, + { + "ImportPath": "github.com/mesos/mesos-go/api/v1/lib/debug", + "Comment": "mesos-1.4.x-33-g29de6ff", + "Rev": "29de6ff97b48c29cb5ac07029ed75186e5ba0eed" + }, + { + "ImportPath": "github.com/mesos/mesos-go/api/v1/lib/encoding", + "Comment": "mesos-1.4.x-33-g29de6ff", + "Rev": "29de6ff97b48c29cb5ac07029ed75186e5ba0eed" + }, + { + "ImportPath": "github.com/mesos/mesos-go/api/v1/lib/encoding/codecs", + "Comment": "mesos-1.4.x-33-g29de6ff", + "Rev": "29de6ff97b48c29cb5ac07029ed75186e5ba0eed" + }, + { + "ImportPath": "github.com/mesos/mesos-go/api/v1/lib/encoding/framing", + "Comment": "mesos-1.4.x-33-g29de6ff", + "Rev": "29de6ff97b48c29cb5ac07029ed75186e5ba0eed" + }, + { + "ImportPath": "github.com/mesos/mesos-go/api/v1/lib/encoding/json", + "Comment": "mesos-1.4.x-33-g29de6ff", + "Rev": "29de6ff97b48c29cb5ac07029ed75186e5ba0eed" + }, + { + "ImportPath": "github.com/mesos/mesos-go/api/v1/lib/encoding/proto", + "Comment": "mesos-1.4.x-33-g29de6ff", + "Rev": "29de6ff97b48c29cb5ac07029ed75186e5ba0eed" + }, + { + "ImportPath": "github.com/mesos/mesos-go/api/v1/lib/httpcli", + "Comment": "mesos-1.4.x-33-g29de6ff", + "Rev": "29de6ff97b48c29cb5ac07029ed75186e5ba0eed" + }, + { + "ImportPath": "github.com/mesos/mesos-go/api/v1/lib/httpcli/apierrors", + "Comment": "mesos-1.4.x-33-g29de6ff", + "Rev": "29de6ff97b48c29cb5ac07029ed75186e5ba0eed" + }, + { + "ImportPath": "github.com/mesos/mesos-go/api/v1/lib/recordio", + "Comment": "mesos-1.4.x-33-g29de6ff", + "Rev": "29de6ff97b48c29cb5ac07029ed75186e5ba0eed" + }, + { + "ImportPath": "github.com/mesos/mesos-go/api/v1/lib/roles", + "Comment": "mesos-1.4.x-33-g29de6ff", + "Rev": "29de6ff97b48c29cb5ac07029ed75186e5ba0eed" + }, { "ImportPath": "github.com/mindprince/gonvml", "Rev": "fee913ce8fb235edf54739d259ca0ecc226c7b8a" @@ -616,6 +716,14 @@ "Comment": "v1.0.0", "Rev": "792786c7400a136282c1664665ae0a8db921c6c2" }, + { + "ImportPath": "github.com/pquerna/ffjson/fflib/v1", + "Rev": "d49c2bc1aa135aad0c6f4fc2056623ec78f5d5ac" + }, + { + "ImportPath": "github.com/pquerna/ffjson/fflib/v1/internal", + "Rev": "d49c2bc1aa135aad0c6f4fc2056623ec78f5d5ac" + }, { "ImportPath": "github.com/prometheus/client_golang/prometheus", "Comment": "v0.8.0-62-g08fd2e1", diff --git a/vendor/github.com/Rican7/retry/.travis.yml b/vendor/github.com/Rican7/retry/.travis.yml new file mode 100644 index 00000000..399e7b64 --- /dev/null +++ b/vendor/github.com/Rican7/retry/.travis.yml @@ -0,0 +1,39 @@ +language: go + +go: + - 1.6 + - tip + +sudo: false + +before_install: + # Install tools necessary to report code-coverage to Coveralls.io + - go get github.com/mattn/goveralls + + # Export some environment variables + - export GO_TEST_COVERAGE_FILE_NAME='coverage.out' + +install: + # Get all imported packages + - make install-deps install-deps-dev + + # Basic build errors + - make build + +script: + # Lint + - make format-lint + - make import-lint + - make copyright-lint + + # Run tests + - make test-with-coverage-profile + +after_success: + # Report our code-coverage to Coveralls.io + - goveralls -service=travis-ci -coverprofile="${GO_TEST_COVERAGE_FILE_NAME}" + +matrix: + allow_failures: + - go: tip + fast_finish: true diff --git a/vendor/github.com/Rican7/retry/LICENSE b/vendor/github.com/Rican7/retry/LICENSE new file mode 100644 index 00000000..36150762 --- /dev/null +++ b/vendor/github.com/Rican7/retry/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2016 Trevor N. Suarez (Rican7) + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE +OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/vendor/github.com/Rican7/retry/Makefile b/vendor/github.com/Rican7/retry/Makefile new file mode 100644 index 00000000..77d4bcd7 --- /dev/null +++ b/vendor/github.com/Rican7/retry/Makefile @@ -0,0 +1,83 @@ +# Define some VCS context +PARENT_BRANCH ?= master + +# Set the mode for code-coverage +GO_TEST_COVERAGE_MODE ?= count +GO_TEST_COVERAGE_FILE_NAME ?= coverage.out + +# Set flags for `gofmt` +GOFMT_FLAGS ?= -s + +# Set a default `min_confidence` value for `golint` +GOLINT_MIN_CONFIDENCE ?= 0.3 + + +all: install-deps build install + +clean: + go clean -i -x ./... + +build: + go build -v ./... + +install: + go install ./... + +install-deps: + go get -d -t ./... + +install-deps-dev: install-deps + go get github.com/golang/lint/golint + go get golang.org/x/tools/cmd/goimports + +update-deps: + go get -d -t -u ./... + +update-deps-dev: update-deps + go get -u github.com/golang/lint/golint + go get -u golang.org/x/tools/cmd/goimports + +test: + go test -v ./... + +test-with-coverage: + go test -cover ./... + +test-with-coverage-formatted: + go test -cover ./... | column -t | sort -r + +test-with-coverage-profile: + echo "mode: ${GO_TEST_COVERAGE_MODE}" > ${GO_TEST_COVERAGE_FILE_NAME} + for package in $$(go list ./...); do \ + go test -covermode ${GO_TEST_COVERAGE_MODE} -coverprofile "coverage_$${package##*/}.out" "$${package}"; \ + sed '1d' "coverage_$${package##*/}.out" >> ${GO_TEST_COVERAGE_FILE_NAME}; \ + done + +format-lint: + errors=$$(gofmt -l ${GOFMT_FLAGS} .); if [ "$${errors}" != "" ]; then echo "$${errors}"; exit 1; fi + +import-lint: + errors=$$(goimports -l .); if [ "$${errors}" != "" ]; then echo "$${errors}"; exit 1; fi + +style-lint: + errors=$$(golint -min_confidence=${GOLINT_MIN_CONFIDENCE} ./...); if [ "$${errors}" != "" ]; then echo "$${errors}"; exit 1; fi + +copyright-lint: + @old_dates=$$(git diff --diff-filter=ACMRTUXB --name-only "${PARENT_BRANCH}" | xargs grep -E '[Cc]opyright(\s+)[©Cc]?(\s+)[0-9]{4}' | grep -E -v "[Cc]opyright(\s+)[©Cc]?(\s+)$$(date '+%Y')"); if [ "$${old_dates}" != "" ]; then printf "The following files contain outdated copyrights:\n$${old_dates}\n\nThis can be fixed with 'make copyright-fix'\n"; exit 1; fi + +lint: install-deps-dev format-lint import-lint style-lint copyright-lint + +format-fix: + gofmt -w ${GOFMT_FLAGS} . + +import-fix: + goimports -w . + +copyright-fix: + @git diff --diff-filter=ACMRTUXB --name-only "${PARENT_BRANCH}" | xargs -I '_FILENAME' -- sh -c 'sed -i.bak "s/\([Cc]opyright\([[:space:]][©Cc]\{0,1\}[[:space:]]*\)\)[0-9]\{4\}/\1"$$(date '+%Y')"/g" _FILENAME && rm _FILENAME.bak' + +vet: + go vet ./... + + +.PHONY: all clean build install install-deps install-deps-dev update-deps update-deps-dev test test-with-coverage test-with-coverage-formatted test-with-coverage-profile format-lint import-lint style-lint copyright-lint lint format-fix import-fix copyright-fix vet diff --git a/vendor/github.com/Rican7/retry/README.md b/vendor/github.com/Rican7/retry/README.md new file mode 100644 index 00000000..bccf4dec --- /dev/null +++ b/vendor/github.com/Rican7/retry/README.md @@ -0,0 +1,101 @@ +# retry + +[![Build Status](https://travis-ci.org/Rican7/retry.svg?branch=master)](https://travis-ci.org/Rican7/retry) +[![Coverage Status](https://coveralls.io/repos/github/Rican7/retry/badge.svg)](https://coveralls.io/github/Rican7/retry) +[![Go Report Card](https://goreportcard.com/badge/Rican7/retry)](http://goreportcard.com/report/Rican7/retry) +[![GoDoc](https://godoc.org/github.com/Rican7/retry?status.png)](https://godoc.org/github.com/Rican7/retry) +[![Latest Stable Version](https://img.shields.io/github/release/Rican7/retry.svg?style=flat)](https://github.com/Rican7/retry/releases) + +A simple, stateless, functional mechanism to perform actions repetitively until successful. + + +## Project Status + +This project is currently in "pre-release". While the code is heavily tested, the API may change. +Vendor (commit or lock) this dependency if you plan on using it. + + +## Install + +`go get github.com/Rican7/retry` + + +## Examples + +### Basic + +```go +retry.Retry(func(attempt uint) error { + return nil // Do something that may or may not cause an error +}) +``` + +### File Open + +```go +const logFilePath = "/var/log/myapp.log" + +var logFile *os.File + +err := retry.Retry(func(attempt uint) error { + var err error + + logFile, err = os.Open(logFilePath) + + return err +}) + +if nil != err { + log.Fatalf("Unable to open file %q with error %q", logFilePath, err) +} + +logFile.Chdir() // Do something with the file +``` + +### HTTP request with strategies and backoff + +```go +var response *http.Response + +action := func(attempt uint) error { + var err error + + response, err = http.Get("https://api.github.com/repos/Rican7/retry") + + if nil == err && nil != response && response.StatusCode > 200 { + err = fmt.Errorf("failed to fetch (attempt #%d) with status code: %d", attempt, response.StatusCode) + } + + return err +} + +err := retry.Retry( + action, + strategy.Limit(5), + strategy.Backoff(backoff.Fibonacci(10*time.Millisecond)), +) + +if nil != err { + log.Fatalf("Failed to fetch repository with error %q", err) +} +``` + +### Retry with backoff jitter + +```go +action := func(attempt uint) error { + return errors.New("something happened") +} + +seed := time.Now().UnixNano() +random := rand.New(rand.NewSource(seed)) + +retry.Retry( + action, + strategy.Limit(5), + strategy.BackoffWithJitter( + backoff.BinaryExponential(10*time.Millisecond), + jitter.Deviation(random, 0.5), + ), +) +``` diff --git a/vendor/github.com/Rican7/retry/backoff/backoff.go b/vendor/github.com/Rican7/retry/backoff/backoff.go new file mode 100644 index 00000000..5369a75a --- /dev/null +++ b/vendor/github.com/Rican7/retry/backoff/backoff.go @@ -0,0 +1,67 @@ +// Package backoff provides stateless methods of calculating durations based on +// a number of attempts made. +// +// Copyright © 2016 Trevor N. Suarez (Rican7) +package backoff + +import ( + "math" + "time" +) + +// Algorithm defines a function that calculates a time.Duration based on +// the given retry attempt number. +type Algorithm func(attempt uint) time.Duration + +// Incremental creates a Algorithm that increments the initial duration +// by the given increment for each attempt. +func Incremental(initial, increment time.Duration) Algorithm { + return func(attempt uint) time.Duration { + return initial + (increment * time.Duration(attempt)) + } +} + +// Linear creates a Algorithm that linearly multiplies the factor +// duration by the attempt number for each attempt. +func Linear(factor time.Duration) Algorithm { + return func(attempt uint) time.Duration { + return (factor * time.Duration(attempt)) + } +} + +// Exponential creates a Algorithm that multiplies the factor duration by +// an exponentially increasing factor for each attempt, where the factor is +// calculated as the given base raised to the attempt number. +func Exponential(factor time.Duration, base float64) Algorithm { + return func(attempt uint) time.Duration { + return (factor * time.Duration(math.Pow(base, float64(attempt)))) + } +} + +// BinaryExponential creates a Algorithm that multiplies the factor +// duration by an exponentially increasing factor for each attempt, where the +// factor is calculated as `2` raised to the attempt number (2^attempt). +func BinaryExponential(factor time.Duration) Algorithm { + return Exponential(factor, 2) +} + +// Fibonacci creates a Algorithm that multiplies the factor duration by +// an increasing factor for each attempt, where the factor is the Nth number in +// the Fibonacci sequence. +func Fibonacci(factor time.Duration) Algorithm { + return func(attempt uint) time.Duration { + return (factor * time.Duration(fibonacciNumber(attempt))) + } +} + +// fibonacciNumber calculates the Fibonacci sequence number for the given +// sequence position. +func fibonacciNumber(n uint) uint { + if 0 == n { + return 0 + } else if 1 == n { + return 1 + } else { + return fibonacciNumber(n-1) + fibonacciNumber(n-2) + } +} diff --git a/vendor/github.com/Rican7/retry/jitter/jitter.go b/vendor/github.com/Rican7/retry/jitter/jitter.go new file mode 100644 index 00000000..e94ad892 --- /dev/null +++ b/vendor/github.com/Rican7/retry/jitter/jitter.go @@ -0,0 +1,89 @@ +// Package jitter provides methods of transforming durations. +// +// Copyright © 2016 Trevor N. Suarez (Rican7) +package jitter + +import ( + "math" + "math/rand" + "time" +) + +// Transformation defines a function that calculates a time.Duration based on +// the given duration. +type Transformation func(duration time.Duration) time.Duration + +// Full creates a Transformation that transforms a duration into a result +// duration in [0, n) randomly, where n is the given duration. +// +// The given generator is what is used to determine the random transformation. +// If a nil generator is passed, a default one will be provided. +// +// Inspired by https://www.awsarchitectureblog.com/2015/03/backoff.html +func Full(generator *rand.Rand) Transformation { + random := fallbackNewRandom(generator) + + return func(duration time.Duration) time.Duration { + return time.Duration(random.Int63n(int64(duration))) + } +} + +// Equal creates a Transformation that transforms a duration into a result +// duration in [n/2, n) randomly, where n is the given duration. +// +// The given generator is what is used to determine the random transformation. +// If a nil generator is passed, a default one will be provided. +// +// Inspired by https://www.awsarchitectureblog.com/2015/03/backoff.html +func Equal(generator *rand.Rand) Transformation { + random := fallbackNewRandom(generator) + + return func(duration time.Duration) time.Duration { + return (duration / 2) + time.Duration(random.Int63n(int64(duration))/2) + } +} + +// Deviation creates a Transformation that transforms a duration into a result +// duration that deviates from the input randomly by a given factor. +// +// The given generator is what is used to determine the random transformation. +// If a nil generator is passed, a default one will be provided. +// +// Inspired by https://developers.google.com/api-client-library/java/google-http-java-client/backoff +func Deviation(generator *rand.Rand, factor float64) Transformation { + random := fallbackNewRandom(generator) + + return func(duration time.Duration) time.Duration { + min := int64(math.Floor(float64(duration) * (1 - factor))) + max := int64(math.Ceil(float64(duration) * (1 + factor))) + + return time.Duration(random.Int63n(max-min) + min) + } +} + +// NormalDistribution creates a Transformation that transforms a duration into a +// result duration based on a normal distribution of the input and the given +// standard deviation. +// +// The given generator is what is used to determine the random transformation. +// If a nil generator is passed, a default one will be provided. +func NormalDistribution(generator *rand.Rand, standardDeviation float64) Transformation { + random := fallbackNewRandom(generator) + + return func(duration time.Duration) time.Duration { + return time.Duration(random.NormFloat64()*standardDeviation + float64(duration)) + } +} + +// fallbackNewRandom returns the passed in random instance if it's not nil, +// and otherwise returns a new random instance seeded with the current time. +func fallbackNewRandom(random *rand.Rand) *rand.Rand { + // Return the passed in value if it's already not null + if nil != random { + return random + } + + seed := time.Now().UnixNano() + + return rand.New(rand.NewSource(seed)) +} diff --git a/vendor/github.com/Rican7/retry/retry.go b/vendor/github.com/Rican7/retry/retry.go new file mode 100644 index 00000000..15015db2 --- /dev/null +++ b/vendor/github.com/Rican7/retry/retry.go @@ -0,0 +1,36 @@ +// Package retry provides a simple, stateless, functional mechanism to perform +// actions repetitively until successful. +// +// Copyright © 2016 Trevor N. Suarez (Rican7) +package retry + +import "github.com/Rican7/retry/strategy" + +// Action defines a callable function that package retry can handle. +type Action func(attempt uint) error + +// Retry takes an action and performs it, repetitively, until successful. +// +// Optionally, strategies may be passed that assess whether or not an attempt +// should be made. +func Retry(action Action, strategies ...strategy.Strategy) error { + var err error + + for attempt := uint(0); (0 == attempt || nil != err) && shouldAttempt(attempt, strategies...); attempt++ { + err = action(attempt) + } + + return err +} + +// shouldAttempt evaluates the provided strategies with the given attempt to +// determine if the Retry loop should make another attempt. +func shouldAttempt(attempt uint, strategies ...strategy.Strategy) bool { + shouldAttempt := true + + for i := 0; shouldAttempt && i < len(strategies); i++ { + shouldAttempt = shouldAttempt && strategies[i](attempt) + } + + return shouldAttempt +} diff --git a/vendor/github.com/Rican7/retry/strategy/strategy.go b/vendor/github.com/Rican7/retry/strategy/strategy.go new file mode 100644 index 00000000..a315fa02 --- /dev/null +++ b/vendor/github.com/Rican7/retry/strategy/strategy.go @@ -0,0 +1,85 @@ +// Package strategy provides a way to change the way that retry is performed. +// +// Copyright © 2016 Trevor N. Suarez (Rican7) +package strategy + +import ( + "time" + + "github.com/Rican7/retry/backoff" + "github.com/Rican7/retry/jitter" +) + +// Strategy defines a function that Retry calls before every successive attempt +// to determine whether it should make the next attempt or not. Returning `true` +// allows for the next attempt to be made. Returning `false` halts the retrying +// process and returns the last error returned by the called Action. +// +// The strategy will be passed an "attempt" number on each successive retry +// iteration, starting with a `0` value before the first attempt is actually +// made. This allows for a pre-action delay, etc. +type Strategy func(attempt uint) bool + +// Limit creates a Strategy that limits the number of attempts that Retry will +// make. +func Limit(attemptLimit uint) Strategy { + return func(attempt uint) bool { + return (attempt <= attemptLimit) + } +} + +// Delay creates a Strategy that waits the given duration before the first +// attempt is made. +func Delay(duration time.Duration) Strategy { + return func(attempt uint) bool { + if 0 == attempt { + time.Sleep(duration) + } + + return true + } +} + +// Wait creates a Strategy that waits the given durations for each attempt after +// the first. If the number of attempts is greater than the number of durations +// provided, then the strategy uses the last duration provided. +func Wait(durations ...time.Duration) Strategy { + return func(attempt uint) bool { + if 0 < attempt && 0 < len(durations) { + durationIndex := int(attempt - 1) + + if len(durations) <= durationIndex { + durationIndex = len(durations) - 1 + } + + time.Sleep(durations[durationIndex]) + } + + return true + } +} + +// Backoff creates a Strategy that waits before each attempt, with a duration as +// defined by the given backoff.Algorithm. +func Backoff(algorithm backoff.Algorithm) Strategy { + return BackoffWithJitter(algorithm, noJitter()) +} + +// BackoffWithJitter creates a Strategy that waits before each attempt, with a +// duration as defined by the given backoff.Algorithm and jitter.Transformation. +func BackoffWithJitter(algorithm backoff.Algorithm, transformation jitter.Transformation) Strategy { + return func(attempt uint) bool { + if 0 < attempt { + time.Sleep(transformation(algorithm(attempt))) + } + + return true + } +} + +// noJitter creates a jitter.Transformation that simply returns the input. +func noJitter() jitter.Transformation { + return func(duration time.Duration) time.Duration { + return duration + } +} diff --git a/vendor/github.com/gogo/protobuf/gogoproto/Makefile b/vendor/github.com/gogo/protobuf/gogoproto/Makefile new file mode 100644 index 00000000..02f9c62c --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/Makefile @@ -0,0 +1,37 @@ +# Protocol Buffers for Go with Gadgets +# +# Copyright (c) 2013, The GoGo Authors. All rights reserved. +# http://github.com/gogo/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + protoc --gogo_out=Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/protoc-gen-gogo/descriptor:. --proto_path=../../../../:../protobuf/:. *.proto + +restore: + cp gogo.pb.golden gogo.pb.go + +preserve: + cp gogo.pb.go gogo.pb.golden diff --git a/vendor/github.com/gogo/protobuf/gogoproto/doc.go b/vendor/github.com/gogo/protobuf/gogoproto/doc.go new file mode 100644 index 00000000..147b5ecc --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/doc.go @@ -0,0 +1,169 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +/* +Package gogoproto provides extensions for protocol buffers to achieve: + + - fast marshalling and unmarshalling. + - peace of mind by optionally generating test and benchmark code. + - more canonical Go structures. + - less typing by optionally generating extra helper code. + - goprotobuf compatibility + +More Canonical Go Structures + +A lot of time working with a goprotobuf struct will lead you to a place where you create another struct that is easier to work with and then have a function to copy the values between the two structs. +You might also find that basic structs that started their life as part of an API need to be sent over the wire. With gob, you could just send it. With goprotobuf, you need to make a parallel struct. +Gogoprotobuf tries to fix these problems with the nullable, embed, customtype and customname field extensions. + + - nullable, if false, a field is generated without a pointer (see warning below). + - embed, if true, the field is generated as an embedded field. + - customtype, It works with the Marshal and Unmarshal methods, to allow you to have your own types in your struct, but marshal to bytes. For example, custom.Uuid or custom.Fixed128 + - customname (beta), Changes the generated fieldname. This is especially useful when generated methods conflict with fieldnames. + - casttype (beta), Changes the generated fieldtype. All generated code assumes that this type is castable to the protocol buffer field type. It does not work for structs or enums. + - castkey (beta), Changes the generated fieldtype for a map key. All generated code assumes that this type is castable to the protocol buffer field type. Only supported on maps. + - castvalue (beta), Changes the generated fieldtype for a map value. All generated code assumes that this type is castable to the protocol buffer field type. Only supported on maps. + +Warning about nullable: According to the Protocol Buffer specification, you should be able to tell whether a field is set or unset. With the option nullable=false this feature is lost, since your non-nullable fields will always be set. It can be seen as a layer on top of Protocol Buffers, where before and after marshalling all non-nullable fields are set and they cannot be unset. + +Let us look at: + + github.com/gogo/protobuf/test/example/example.proto + +for a quicker overview. + +The following message: + + package test; + + import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + + message A { + optional string Description = 1 [(gogoproto.nullable) = false]; + optional int64 Number = 2 [(gogoproto.nullable) = false]; + optional bytes Id = 3 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uuid", (gogoproto.nullable) = false]; + } + +Will generate a go struct which looks a lot like this: + + type A struct { + Description string + Number int64 + Id github_com_gogo_protobuf_test_custom.Uuid + } + +You will see there are no pointers, since all fields are non-nullable. +You will also see a custom type which marshals to a string. +Be warned it is your responsibility to test your custom types thoroughly. +You should think of every possible empty and nil case for your marshaling, unmarshaling and size methods. + +Next we will embed the message A in message B. + + message B { + optional A A = 1 [(gogoproto.nullable) = false, (gogoproto.embed) = true]; + repeated bytes G = 2 [(gogoproto.customtype) = "github.com/gogo/protobuf/test/custom.Uint128", (gogoproto.nullable) = false]; + } + +See below that A is embedded in B. + + type B struct { + A + G []github_com_gogo_protobuf_test_custom.Uint128 + } + +Also see the repeated custom type. + + type Uint128 [2]uint64 + +Next we will create a custom name for one of our fields. + + message C { + optional int64 size = 1 [(gogoproto.customname) = "MySize"]; + } + +See below that the field's name is MySize and not Size. + + type C struct { + MySize *int64 + } + +The is useful when having a protocol buffer message with a field name which conflicts with a generated method. +As an example, having a field name size and using the sizer plugin to generate a Size method will cause a go compiler error. +Using customname you can fix this error without changing the field name. +This is typically useful when working with a protocol buffer that was designed before these methods and/or the go language were avialable. + +Gogoprotobuf also has some more subtle changes, these could be changed back: + + - the generated package name for imports do not have the extra /filename.pb, + but are actually the imports specified in the .proto file. + +Gogoprotobuf also has lost some features which should be brought back with time: + + - Marshalling and unmarshalling with reflect and without the unsafe package, + this requires work in pointer_reflect.go + +Why does nullable break protocol buffer specifications: + +The protocol buffer specification states, somewhere, that you should be able to tell whether a +field is set or unset. With the option nullable=false this feature is lost, +since your non-nullable fields will always be set. It can be seen as a layer on top of +protocol buffers, where before and after marshalling all non-nullable fields are set +and they cannot be unset. + +Goprotobuf Compatibility: + +Gogoprotobuf is compatible with Goprotobuf, because it is compatible with protocol buffers. +Gogoprotobuf generates the same code as goprotobuf if no extensions are used. +The enumprefix, getters and stringer extensions can be used to remove some of the unnecessary code generated by goprotobuf: + + - gogoproto_import, if false, the generated code imports github.com/golang/protobuf/proto instead of github.com/gogo/protobuf/proto. + - goproto_enum_prefix, if false, generates the enum constant names without the messagetype prefix + - goproto_enum_stringer (experimental), if false, the enum is generated without the default string method, this is useful for rather using enum_stringer, or allowing you to write your own string method. + - goproto_getters, if false, the message is generated without get methods, this is useful when you would rather want to use face + - goproto_stringer, if false, the message is generated without the default string method, this is useful for rather using stringer, or allowing you to write your own string method. + - goproto_extensions_map (beta), if false, the extensions field is generated as type []byte instead of type map[int32]proto.Extension + - goproto_unrecognized (beta), if false, XXX_unrecognized field is not generated. This is useful in conjunction with gogoproto.nullable=false, to generate structures completely devoid of pointers and reduce GC pressure at the cost of losing information about unrecognized fields. + - goproto_registration (beta), if true, the generated files will register all messages and types against both gogo/protobuf and golang/protobuf. This is necessary when using third-party packages which read registrations from golang/protobuf (such as the grpc-gateway). + +Less Typing and Peace of Mind is explained in their specific plugin folders godoc: + + - github.com/gogo/protobuf/plugin/ + +If you do not use any of these extension the code that is generated +will be the same as if goprotobuf has generated it. + +The most complete way to see examples is to look at + + github.com/gogo/protobuf/test/thetest.proto + +Gogoprototest is a seperate project, +because we want to keep gogoprotobuf independant of goprotobuf, +but we still want to test it thoroughly. + +*/ +package gogoproto diff --git a/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.go b/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.go new file mode 100644 index 00000000..9506b6fb --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.go @@ -0,0 +1,804 @@ +// Code generated by protoc-gen-gogo. +// source: gogo.proto +// DO NOT EDIT! + +/* +Package gogoproto is a generated protocol buffer package. + +It is generated from these files: + gogo.proto + +It has these top-level messages: +*/ +package gogoproto + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +var E_GoprotoEnumPrefix = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.EnumOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 62001, + Name: "gogoproto.goproto_enum_prefix", + Tag: "varint,62001,opt,name=goproto_enum_prefix,json=goprotoEnumPrefix", + Filename: "gogo.proto", +} + +var E_GoprotoEnumStringer = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.EnumOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 62021, + Name: "gogoproto.goproto_enum_stringer", + Tag: "varint,62021,opt,name=goproto_enum_stringer,json=goprotoEnumStringer", + Filename: "gogo.proto", +} + +var E_EnumStringer = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.EnumOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 62022, + Name: "gogoproto.enum_stringer", + Tag: "varint,62022,opt,name=enum_stringer,json=enumStringer", + Filename: "gogo.proto", +} + +var E_EnumCustomname = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.EnumOptions)(nil), + ExtensionType: (*string)(nil), + Field: 62023, + Name: "gogoproto.enum_customname", + Tag: "bytes,62023,opt,name=enum_customname,json=enumCustomname", + Filename: "gogo.proto", +} + +var E_Enumdecl = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.EnumOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 62024, + Name: "gogoproto.enumdecl", + Tag: "varint,62024,opt,name=enumdecl", + Filename: "gogo.proto", +} + +var E_EnumvalueCustomname = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.EnumValueOptions)(nil), + ExtensionType: (*string)(nil), + Field: 66001, + Name: "gogoproto.enumvalue_customname", + Tag: "bytes,66001,opt,name=enumvalue_customname,json=enumvalueCustomname", + Filename: "gogo.proto", +} + +var E_GoprotoGettersAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63001, + Name: "gogoproto.goproto_getters_all", + Tag: "varint,63001,opt,name=goproto_getters_all,json=goprotoGettersAll", + Filename: "gogo.proto", +} + +var E_GoprotoEnumPrefixAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63002, + Name: "gogoproto.goproto_enum_prefix_all", + Tag: "varint,63002,opt,name=goproto_enum_prefix_all,json=goprotoEnumPrefixAll", + Filename: "gogo.proto", +} + +var E_GoprotoStringerAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63003, + Name: "gogoproto.goproto_stringer_all", + Tag: "varint,63003,opt,name=goproto_stringer_all,json=goprotoStringerAll", + Filename: "gogo.proto", +} + +var E_VerboseEqualAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63004, + Name: "gogoproto.verbose_equal_all", + Tag: "varint,63004,opt,name=verbose_equal_all,json=verboseEqualAll", + Filename: "gogo.proto", +} + +var E_FaceAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63005, + Name: "gogoproto.face_all", + Tag: "varint,63005,opt,name=face_all,json=faceAll", + Filename: "gogo.proto", +} + +var E_GostringAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63006, + Name: "gogoproto.gostring_all", + Tag: "varint,63006,opt,name=gostring_all,json=gostringAll", + Filename: "gogo.proto", +} + +var E_PopulateAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63007, + Name: "gogoproto.populate_all", + Tag: "varint,63007,opt,name=populate_all,json=populateAll", + Filename: "gogo.proto", +} + +var E_StringerAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63008, + Name: "gogoproto.stringer_all", + Tag: "varint,63008,opt,name=stringer_all,json=stringerAll", + Filename: "gogo.proto", +} + +var E_OnlyoneAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63009, + Name: "gogoproto.onlyone_all", + Tag: "varint,63009,opt,name=onlyone_all,json=onlyoneAll", + Filename: "gogo.proto", +} + +var E_EqualAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63013, + Name: "gogoproto.equal_all", + Tag: "varint,63013,opt,name=equal_all,json=equalAll", + Filename: "gogo.proto", +} + +var E_DescriptionAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63014, + Name: "gogoproto.description_all", + Tag: "varint,63014,opt,name=description_all,json=descriptionAll", + Filename: "gogo.proto", +} + +var E_TestgenAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63015, + Name: "gogoproto.testgen_all", + Tag: "varint,63015,opt,name=testgen_all,json=testgenAll", + Filename: "gogo.proto", +} + +var E_BenchgenAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63016, + Name: "gogoproto.benchgen_all", + Tag: "varint,63016,opt,name=benchgen_all,json=benchgenAll", + Filename: "gogo.proto", +} + +var E_MarshalerAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63017, + Name: "gogoproto.marshaler_all", + Tag: "varint,63017,opt,name=marshaler_all,json=marshalerAll", + Filename: "gogo.proto", +} + +var E_UnmarshalerAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63018, + Name: "gogoproto.unmarshaler_all", + Tag: "varint,63018,opt,name=unmarshaler_all,json=unmarshalerAll", + Filename: "gogo.proto", +} + +var E_StableMarshalerAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63019, + Name: "gogoproto.stable_marshaler_all", + Tag: "varint,63019,opt,name=stable_marshaler_all,json=stableMarshalerAll", + Filename: "gogo.proto", +} + +var E_SizerAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63020, + Name: "gogoproto.sizer_all", + Tag: "varint,63020,opt,name=sizer_all,json=sizerAll", + Filename: "gogo.proto", +} + +var E_GoprotoEnumStringerAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63021, + Name: "gogoproto.goproto_enum_stringer_all", + Tag: "varint,63021,opt,name=goproto_enum_stringer_all,json=goprotoEnumStringerAll", + Filename: "gogo.proto", +} + +var E_EnumStringerAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63022, + Name: "gogoproto.enum_stringer_all", + Tag: "varint,63022,opt,name=enum_stringer_all,json=enumStringerAll", + Filename: "gogo.proto", +} + +var E_UnsafeMarshalerAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63023, + Name: "gogoproto.unsafe_marshaler_all", + Tag: "varint,63023,opt,name=unsafe_marshaler_all,json=unsafeMarshalerAll", + Filename: "gogo.proto", +} + +var E_UnsafeUnmarshalerAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63024, + Name: "gogoproto.unsafe_unmarshaler_all", + Tag: "varint,63024,opt,name=unsafe_unmarshaler_all,json=unsafeUnmarshalerAll", + Filename: "gogo.proto", +} + +var E_GoprotoExtensionsMapAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63025, + Name: "gogoproto.goproto_extensions_map_all", + Tag: "varint,63025,opt,name=goproto_extensions_map_all,json=goprotoExtensionsMapAll", + Filename: "gogo.proto", +} + +var E_GoprotoUnrecognizedAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63026, + Name: "gogoproto.goproto_unrecognized_all", + Tag: "varint,63026,opt,name=goproto_unrecognized_all,json=goprotoUnrecognizedAll", + Filename: "gogo.proto", +} + +var E_GogoprotoImport = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63027, + Name: "gogoproto.gogoproto_import", + Tag: "varint,63027,opt,name=gogoproto_import,json=gogoprotoImport", + Filename: "gogo.proto", +} + +var E_ProtosizerAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63028, + Name: "gogoproto.protosizer_all", + Tag: "varint,63028,opt,name=protosizer_all,json=protosizerAll", + Filename: "gogo.proto", +} + +var E_CompareAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63029, + Name: "gogoproto.compare_all", + Tag: "varint,63029,opt,name=compare_all,json=compareAll", + Filename: "gogo.proto", +} + +var E_TypedeclAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63030, + Name: "gogoproto.typedecl_all", + Tag: "varint,63030,opt,name=typedecl_all,json=typedeclAll", + Filename: "gogo.proto", +} + +var E_EnumdeclAll = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63031, + Name: "gogoproto.enumdecl_all", + Tag: "varint,63031,opt,name=enumdecl_all,json=enumdeclAll", + Filename: "gogo.proto", +} + +var E_GoprotoRegistration = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FileOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 63032, + Name: "gogoproto.goproto_registration", + Tag: "varint,63032,opt,name=goproto_registration,json=goprotoRegistration", + Filename: "gogo.proto", +} + +var E_GoprotoGetters = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64001, + Name: "gogoproto.goproto_getters", + Tag: "varint,64001,opt,name=goproto_getters,json=goprotoGetters", + Filename: "gogo.proto", +} + +var E_GoprotoStringer = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64003, + Name: "gogoproto.goproto_stringer", + Tag: "varint,64003,opt,name=goproto_stringer,json=goprotoStringer", + Filename: "gogo.proto", +} + +var E_VerboseEqual = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64004, + Name: "gogoproto.verbose_equal", + Tag: "varint,64004,opt,name=verbose_equal,json=verboseEqual", + Filename: "gogo.proto", +} + +var E_Face = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64005, + Name: "gogoproto.face", + Tag: "varint,64005,opt,name=face", + Filename: "gogo.proto", +} + +var E_Gostring = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64006, + Name: "gogoproto.gostring", + Tag: "varint,64006,opt,name=gostring", + Filename: "gogo.proto", +} + +var E_Populate = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64007, + Name: "gogoproto.populate", + Tag: "varint,64007,opt,name=populate", + Filename: "gogo.proto", +} + +var E_Stringer = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 67008, + Name: "gogoproto.stringer", + Tag: "varint,67008,opt,name=stringer", + Filename: "gogo.proto", +} + +var E_Onlyone = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64009, + Name: "gogoproto.onlyone", + Tag: "varint,64009,opt,name=onlyone", + Filename: "gogo.proto", +} + +var E_Equal = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64013, + Name: "gogoproto.equal", + Tag: "varint,64013,opt,name=equal", + Filename: "gogo.proto", +} + +var E_Description = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64014, + Name: "gogoproto.description", + Tag: "varint,64014,opt,name=description", + Filename: "gogo.proto", +} + +var E_Testgen = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64015, + Name: "gogoproto.testgen", + Tag: "varint,64015,opt,name=testgen", + Filename: "gogo.proto", +} + +var E_Benchgen = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64016, + Name: "gogoproto.benchgen", + Tag: "varint,64016,opt,name=benchgen", + Filename: "gogo.proto", +} + +var E_Marshaler = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64017, + Name: "gogoproto.marshaler", + Tag: "varint,64017,opt,name=marshaler", + Filename: "gogo.proto", +} + +var E_Unmarshaler = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64018, + Name: "gogoproto.unmarshaler", + Tag: "varint,64018,opt,name=unmarshaler", + Filename: "gogo.proto", +} + +var E_StableMarshaler = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64019, + Name: "gogoproto.stable_marshaler", + Tag: "varint,64019,opt,name=stable_marshaler,json=stableMarshaler", + Filename: "gogo.proto", +} + +var E_Sizer = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64020, + Name: "gogoproto.sizer", + Tag: "varint,64020,opt,name=sizer", + Filename: "gogo.proto", +} + +var E_UnsafeMarshaler = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64023, + Name: "gogoproto.unsafe_marshaler", + Tag: "varint,64023,opt,name=unsafe_marshaler,json=unsafeMarshaler", + Filename: "gogo.proto", +} + +var E_UnsafeUnmarshaler = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64024, + Name: "gogoproto.unsafe_unmarshaler", + Tag: "varint,64024,opt,name=unsafe_unmarshaler,json=unsafeUnmarshaler", + Filename: "gogo.proto", +} + +var E_GoprotoExtensionsMap = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64025, + Name: "gogoproto.goproto_extensions_map", + Tag: "varint,64025,opt,name=goproto_extensions_map,json=goprotoExtensionsMap", + Filename: "gogo.proto", +} + +var E_GoprotoUnrecognized = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64026, + Name: "gogoproto.goproto_unrecognized", + Tag: "varint,64026,opt,name=goproto_unrecognized,json=goprotoUnrecognized", + Filename: "gogo.proto", +} + +var E_Protosizer = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64028, + Name: "gogoproto.protosizer", + Tag: "varint,64028,opt,name=protosizer", + Filename: "gogo.proto", +} + +var E_Compare = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64029, + Name: "gogoproto.compare", + Tag: "varint,64029,opt,name=compare", + Filename: "gogo.proto", +} + +var E_Typedecl = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.MessageOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 64030, + Name: "gogoproto.typedecl", + Tag: "varint,64030,opt,name=typedecl", + Filename: "gogo.proto", +} + +var E_Nullable = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 65001, + Name: "gogoproto.nullable", + Tag: "varint,65001,opt,name=nullable", + Filename: "gogo.proto", +} + +var E_Embed = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 65002, + Name: "gogoproto.embed", + Tag: "varint,65002,opt,name=embed", + Filename: "gogo.proto", +} + +var E_Customtype = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65003, + Name: "gogoproto.customtype", + Tag: "bytes,65003,opt,name=customtype", + Filename: "gogo.proto", +} + +var E_Customname = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65004, + Name: "gogoproto.customname", + Tag: "bytes,65004,opt,name=customname", + Filename: "gogo.proto", +} + +var E_Jsontag = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65005, + Name: "gogoproto.jsontag", + Tag: "bytes,65005,opt,name=jsontag", + Filename: "gogo.proto", +} + +var E_Moretags = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65006, + Name: "gogoproto.moretags", + Tag: "bytes,65006,opt,name=moretags", + Filename: "gogo.proto", +} + +var E_Casttype = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65007, + Name: "gogoproto.casttype", + Tag: "bytes,65007,opt,name=casttype", + Filename: "gogo.proto", +} + +var E_Castkey = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65008, + Name: "gogoproto.castkey", + Tag: "bytes,65008,opt,name=castkey", + Filename: "gogo.proto", +} + +var E_Castvalue = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 65009, + Name: "gogoproto.castvalue", + Tag: "bytes,65009,opt,name=castvalue", + Filename: "gogo.proto", +} + +var E_Stdtime = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 65010, + Name: "gogoproto.stdtime", + Tag: "varint,65010,opt,name=stdtime", + Filename: "gogo.proto", +} + +var E_Stdduration = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 65011, + Name: "gogoproto.stdduration", + Tag: "varint,65011,opt,name=stdduration", + Filename: "gogo.proto", +} + +func init() { + proto.RegisterExtension(E_GoprotoEnumPrefix) + proto.RegisterExtension(E_GoprotoEnumStringer) + proto.RegisterExtension(E_EnumStringer) + proto.RegisterExtension(E_EnumCustomname) + proto.RegisterExtension(E_Enumdecl) + proto.RegisterExtension(E_EnumvalueCustomname) + proto.RegisterExtension(E_GoprotoGettersAll) + proto.RegisterExtension(E_GoprotoEnumPrefixAll) + proto.RegisterExtension(E_GoprotoStringerAll) + proto.RegisterExtension(E_VerboseEqualAll) + proto.RegisterExtension(E_FaceAll) + proto.RegisterExtension(E_GostringAll) + proto.RegisterExtension(E_PopulateAll) + proto.RegisterExtension(E_StringerAll) + proto.RegisterExtension(E_OnlyoneAll) + proto.RegisterExtension(E_EqualAll) + proto.RegisterExtension(E_DescriptionAll) + proto.RegisterExtension(E_TestgenAll) + proto.RegisterExtension(E_BenchgenAll) + proto.RegisterExtension(E_MarshalerAll) + proto.RegisterExtension(E_UnmarshalerAll) + proto.RegisterExtension(E_StableMarshalerAll) + proto.RegisterExtension(E_SizerAll) + proto.RegisterExtension(E_GoprotoEnumStringerAll) + proto.RegisterExtension(E_EnumStringerAll) + proto.RegisterExtension(E_UnsafeMarshalerAll) + proto.RegisterExtension(E_UnsafeUnmarshalerAll) + proto.RegisterExtension(E_GoprotoExtensionsMapAll) + proto.RegisterExtension(E_GoprotoUnrecognizedAll) + proto.RegisterExtension(E_GogoprotoImport) + proto.RegisterExtension(E_ProtosizerAll) + proto.RegisterExtension(E_CompareAll) + proto.RegisterExtension(E_TypedeclAll) + proto.RegisterExtension(E_EnumdeclAll) + proto.RegisterExtension(E_GoprotoRegistration) + proto.RegisterExtension(E_GoprotoGetters) + proto.RegisterExtension(E_GoprotoStringer) + proto.RegisterExtension(E_VerboseEqual) + proto.RegisterExtension(E_Face) + proto.RegisterExtension(E_Gostring) + proto.RegisterExtension(E_Populate) + proto.RegisterExtension(E_Stringer) + proto.RegisterExtension(E_Onlyone) + proto.RegisterExtension(E_Equal) + proto.RegisterExtension(E_Description) + proto.RegisterExtension(E_Testgen) + proto.RegisterExtension(E_Benchgen) + proto.RegisterExtension(E_Marshaler) + proto.RegisterExtension(E_Unmarshaler) + proto.RegisterExtension(E_StableMarshaler) + proto.RegisterExtension(E_Sizer) + proto.RegisterExtension(E_UnsafeMarshaler) + proto.RegisterExtension(E_UnsafeUnmarshaler) + proto.RegisterExtension(E_GoprotoExtensionsMap) + proto.RegisterExtension(E_GoprotoUnrecognized) + proto.RegisterExtension(E_Protosizer) + proto.RegisterExtension(E_Compare) + proto.RegisterExtension(E_Typedecl) + proto.RegisterExtension(E_Nullable) + proto.RegisterExtension(E_Embed) + proto.RegisterExtension(E_Customtype) + proto.RegisterExtension(E_Customname) + proto.RegisterExtension(E_Jsontag) + proto.RegisterExtension(E_Moretags) + proto.RegisterExtension(E_Casttype) + proto.RegisterExtension(E_Castkey) + proto.RegisterExtension(E_Castvalue) + proto.RegisterExtension(E_Stdtime) + proto.RegisterExtension(E_Stdduration) +} + +func init() { proto.RegisterFile("gogo.proto", fileDescriptorGogo) } + +var fileDescriptorGogo = []byte{ + // 1201 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x98, 0xcb, 0x6f, 0x1c, 0x45, + 0x13, 0xc0, 0xf5, 0xe9, 0x73, 0x64, 0x6f, 0xf9, 0x85, 0xd7, 0xc6, 0x84, 0x08, 0x44, 0x72, 0xe3, + 0xe4, 0x9c, 0x22, 0x94, 0xb6, 0x22, 0xcb, 0xb1, 0x1c, 0x2b, 0x11, 0x06, 0x63, 0xe2, 0x00, 0xe2, + 0xb0, 0x9a, 0xdd, 0x6d, 0x4f, 0x06, 0x66, 0xa6, 0x87, 0x99, 0x9e, 0x28, 0xce, 0x0d, 0x85, 0x87, + 0x10, 0xe2, 0x8d, 0x04, 0x09, 0x49, 0x80, 0x03, 0xef, 0x67, 0x78, 0x1f, 0xb9, 0xf0, 0xb8, 0xf2, + 0x3f, 0x70, 0x01, 0xcc, 0xdb, 0x37, 0x5f, 0x50, 0xcd, 0x56, 0xcd, 0xf6, 0xac, 0x57, 0xea, 0xde, + 0xdb, 0xec, 0xba, 0x7f, 0xbf, 0xad, 0xa9, 0x9a, 0xae, 0xea, 0x31, 0x80, 0xaf, 0x7c, 0x35, 0x97, + 0xa4, 0x4a, 0xab, 0x7a, 0x0d, 0xaf, 0x8b, 0xcb, 0x03, 0x07, 0x7d, 0xa5, 0xfc, 0x50, 0x1e, 0x2e, + 0x3e, 0x35, 0xf3, 0xcd, 0xc3, 0x6d, 0x99, 0xb5, 0xd2, 0x20, 0xd1, 0x2a, 0xed, 0x2c, 0x16, 0x77, + 0xc1, 0x34, 0x2d, 0x6e, 0xc8, 0x38, 0x8f, 0x1a, 0x49, 0x2a, 0x37, 0x83, 0xf3, 0xf5, 0x5b, 0xe6, + 0x3a, 0xe4, 0x1c, 0x93, 0x73, 0xcb, 0x71, 0x1e, 0xdd, 0x9d, 0xe8, 0x40, 0xc5, 0xd9, 0xfe, 0xeb, + 0x3f, 0xff, 0xff, 0xe0, 0xff, 0x6e, 0x1f, 0x59, 0x9f, 0x22, 0x14, 0xff, 0xb6, 0x56, 0x80, 0x62, + 0x1d, 0x6e, 0xac, 0xf8, 0x32, 0x9d, 0x06, 0xb1, 0x2f, 0x53, 0x8b, 0xf1, 0x3b, 0x32, 0x4e, 0x1b, + 0xc6, 0x7b, 0x09, 0x15, 0x4b, 0x30, 0x3e, 0x88, 0xeb, 0x7b, 0x72, 0x8d, 0x49, 0x53, 0xb2, 0x02, + 0x93, 0x85, 0xa4, 0x95, 0x67, 0x5a, 0x45, 0xb1, 0x17, 0x49, 0x8b, 0xe6, 0x87, 0x42, 0x53, 0x5b, + 0x9f, 0x40, 0x6c, 0xa9, 0xa4, 0x84, 0x80, 0x11, 0xfc, 0xa6, 0x2d, 0x5b, 0xa1, 0xc5, 0xf0, 0x23, + 0x05, 0x52, 0xae, 0x17, 0x67, 0x60, 0x06, 0xaf, 0xcf, 0x79, 0x61, 0x2e, 0xcd, 0x48, 0x0e, 0xf5, + 0xf5, 0x9c, 0xc1, 0x65, 0x2c, 0xfb, 0xe9, 0xe2, 0x50, 0x11, 0xce, 0x74, 0x29, 0x30, 0x62, 0x32, + 0xaa, 0xe8, 0x4b, 0xad, 0x65, 0x9a, 0x35, 0xbc, 0xb0, 0x5f, 0x78, 0x27, 0x82, 0xb0, 0x34, 0x5e, + 0xda, 0xae, 0x56, 0x71, 0xa5, 0x43, 0x2e, 0x86, 0xa1, 0xd8, 0x80, 0x9b, 0xfa, 0x3c, 0x15, 0x0e, + 0xce, 0xcb, 0xe4, 0x9c, 0xd9, 0xf3, 0x64, 0xa0, 0x76, 0x0d, 0xf8, 0xfb, 0xb2, 0x96, 0x0e, 0xce, + 0xd7, 0xc8, 0x59, 0x27, 0x96, 0x4b, 0x8a, 0xc6, 0x53, 0x30, 0x75, 0x4e, 0xa6, 0x4d, 0x95, 0xc9, + 0x86, 0x7c, 0x24, 0xf7, 0x42, 0x07, 0xdd, 0x15, 0xd2, 0x4d, 0x12, 0xb8, 0x8c, 0x1c, 0xba, 0x8e, + 0xc2, 0xc8, 0xa6, 0xd7, 0x92, 0x0e, 0x8a, 0xab, 0xa4, 0x18, 0xc6, 0xf5, 0x88, 0x2e, 0xc2, 0x98, + 0xaf, 0x3a, 0xb7, 0xe4, 0x80, 0x5f, 0x23, 0x7c, 0x94, 0x19, 0x52, 0x24, 0x2a, 0xc9, 0x43, 0x4f, + 0xbb, 0x44, 0xf0, 0x3a, 0x2b, 0x98, 0x21, 0xc5, 0x00, 0x69, 0x7d, 0x83, 0x15, 0x99, 0x91, 0xcf, + 0x05, 0x18, 0x55, 0x71, 0xb8, 0xa5, 0x62, 0x97, 0x20, 0xde, 0x24, 0x03, 0x10, 0x82, 0x82, 0x79, + 0xa8, 0xb9, 0x16, 0xe2, 0xad, 0x6d, 0xde, 0x1e, 0x5c, 0x81, 0x15, 0x98, 0xe4, 0x06, 0x15, 0xa8, + 0xd8, 0x41, 0xf1, 0x36, 0x29, 0x26, 0x0c, 0x8c, 0x6e, 0x43, 0xcb, 0x4c, 0xfb, 0xd2, 0x45, 0xf2, + 0x0e, 0xdf, 0x06, 0x21, 0x94, 0xca, 0xa6, 0x8c, 0x5b, 0x67, 0xdd, 0x0c, 0xef, 0x72, 0x2a, 0x99, + 0x41, 0xc5, 0x12, 0x8c, 0x47, 0x5e, 0x9a, 0x9d, 0xf5, 0x42, 0xa7, 0x72, 0xbc, 0x47, 0x8e, 0xb1, + 0x12, 0xa2, 0x8c, 0xe4, 0xf1, 0x20, 0x9a, 0xf7, 0x39, 0x23, 0x06, 0x46, 0x5b, 0x2f, 0xd3, 0x5e, + 0x33, 0x94, 0x8d, 0x41, 0x6c, 0x1f, 0xf0, 0xd6, 0xeb, 0xb0, 0xab, 0xa6, 0x71, 0x1e, 0x6a, 0x59, + 0x70, 0xc1, 0x49, 0xf3, 0x21, 0x57, 0xba, 0x00, 0x10, 0x7e, 0x00, 0x6e, 0xee, 0x3b, 0x26, 0x1c, + 0x64, 0x1f, 0x91, 0x6c, 0xb6, 0xcf, 0xa8, 0xa0, 0x96, 0x30, 0xa8, 0xf2, 0x63, 0x6e, 0x09, 0xb2, + 0xc7, 0xb5, 0x06, 0x33, 0x79, 0x9c, 0x79, 0x9b, 0x83, 0x65, 0xed, 0x13, 0xce, 0x5a, 0x87, 0xad, + 0x64, 0xed, 0x34, 0xcc, 0x92, 0x71, 0xb0, 0xba, 0x7e, 0xca, 0x8d, 0xb5, 0x43, 0x6f, 0x54, 0xab, + 0xfb, 0x20, 0x1c, 0x28, 0xd3, 0x79, 0x5e, 0xcb, 0x38, 0x43, 0xa6, 0x11, 0x79, 0x89, 0x83, 0xf9, + 0x3a, 0x99, 0xb9, 0xe3, 0x2f, 0x97, 0x82, 0x55, 0x2f, 0x41, 0xf9, 0xfd, 0xb0, 0x9f, 0xe5, 0x79, + 0x9c, 0xca, 0x96, 0xf2, 0xe3, 0xe0, 0x82, 0x6c, 0x3b, 0xa8, 0x3f, 0xeb, 0x29, 0xd5, 0x86, 0x81, + 0xa3, 0xf9, 0x24, 0xdc, 0x50, 0x9e, 0x55, 0x1a, 0x41, 0x94, 0xa8, 0x54, 0x5b, 0x8c, 0x9f, 0x73, + 0xa5, 0x4a, 0xee, 0x64, 0x81, 0x89, 0x65, 0x98, 0x28, 0x3e, 0xba, 0x3e, 0x92, 0x5f, 0x90, 0x68, + 0xbc, 0x4b, 0x51, 0xe3, 0x68, 0xa9, 0x28, 0xf1, 0x52, 0x97, 0xfe, 0xf7, 0x25, 0x37, 0x0e, 0x42, + 0xa8, 0x71, 0xe8, 0xad, 0x44, 0xe2, 0xb4, 0x77, 0x30, 0x7c, 0xc5, 0x8d, 0x83, 0x19, 0x52, 0xf0, + 0x81, 0xc1, 0x41, 0xf1, 0x35, 0x2b, 0x98, 0x41, 0xc5, 0x3d, 0xdd, 0x41, 0x9b, 0x4a, 0x3f, 0xc8, + 0x74, 0xea, 0xe1, 0x6a, 0x8b, 0xea, 0x9b, 0xed, 0xea, 0x21, 0x6c, 0xdd, 0x40, 0xc5, 0x29, 0x98, + 0xec, 0x39, 0x62, 0xd4, 0x6f, 0xdb, 0x63, 0x5b, 0x95, 0x59, 0xe6, 0xf9, 0xa5, 0xf0, 0xd1, 0x1d, + 0x6a, 0x46, 0xd5, 0x13, 0x86, 0xb8, 0x13, 0xeb, 0x5e, 0x3d, 0x07, 0xd8, 0x65, 0x17, 0x77, 0xca, + 0xd2, 0x57, 0x8e, 0x01, 0xe2, 0x04, 0x8c, 0x57, 0xce, 0x00, 0x76, 0xd5, 0x63, 0xa4, 0x1a, 0x33, + 0x8f, 0x00, 0xe2, 0x08, 0x0c, 0xe1, 0x3c, 0xb7, 0xe3, 0x8f, 0x13, 0x5e, 0x2c, 0x17, 0xc7, 0x60, + 0x84, 0xe7, 0xb8, 0x1d, 0x7d, 0x82, 0xd0, 0x12, 0x41, 0x9c, 0x67, 0xb8, 0x1d, 0x7f, 0x92, 0x71, + 0x46, 0x10, 0x77, 0x4f, 0xe1, 0xb7, 0x4f, 0x0f, 0x51, 0x1f, 0xe6, 0xdc, 0xcd, 0xc3, 0x30, 0x0d, + 0x6f, 0x3b, 0xfd, 0x14, 0xfd, 0x38, 0x13, 0xe2, 0x0e, 0xd8, 0xe7, 0x98, 0xf0, 0x67, 0x08, 0xed, + 0xac, 0x17, 0x4b, 0x30, 0x6a, 0x0c, 0x6c, 0x3b, 0xfe, 0x2c, 0xe1, 0x26, 0x85, 0xa1, 0xd3, 0xc0, + 0xb6, 0x0b, 0x9e, 0xe3, 0xd0, 0x89, 0xc0, 0xb4, 0xf1, 0xac, 0xb6, 0xd3, 0xcf, 0x73, 0xd6, 0x19, + 0x11, 0x0b, 0x50, 0x2b, 0xfb, 0xaf, 0x9d, 0x7f, 0x81, 0xf8, 0x2e, 0x83, 0x19, 0x30, 0xfa, 0xbf, + 0x5d, 0xf1, 0x22, 0x67, 0xc0, 0xa0, 0x70, 0x1b, 0xf5, 0xce, 0x74, 0xbb, 0xe9, 0x25, 0xde, 0x46, + 0x3d, 0x23, 0x1d, 0xab, 0x59, 0xb4, 0x41, 0xbb, 0xe2, 0x65, 0xae, 0x66, 0xb1, 0x1e, 0xc3, 0xe8, + 0x1d, 0x92, 0x76, 0xc7, 0x2b, 0x1c, 0x46, 0xcf, 0x8c, 0x14, 0x6b, 0x50, 0xdf, 0x3b, 0x20, 0xed, + 0xbe, 0x57, 0xc9, 0x37, 0xb5, 0x67, 0x3e, 0x8a, 0xfb, 0x60, 0xb6, 0xff, 0x70, 0xb4, 0x5b, 0x2f, + 0xed, 0xf4, 0xbc, 0xce, 0x98, 0xb3, 0x51, 0x9c, 0xee, 0x76, 0x59, 0x73, 0x30, 0xda, 0xb5, 0x97, + 0x77, 0xaa, 0x8d, 0xd6, 0x9c, 0x8b, 0x62, 0x11, 0xa0, 0x3b, 0x93, 0xec, 0xae, 0x2b, 0xe4, 0x32, + 0x20, 0xdc, 0x1a, 0x34, 0x92, 0xec, 0xfc, 0x55, 0xde, 0x1a, 0x44, 0xe0, 0xd6, 0xe0, 0x69, 0x64, + 0xa7, 0xaf, 0xf1, 0xd6, 0x60, 0x44, 0xcc, 0xc3, 0x48, 0x9c, 0x87, 0x21, 0x3e, 0x5b, 0xf5, 0x5b, + 0xfb, 0x8c, 0x1b, 0x19, 0xb6, 0x19, 0xfe, 0x65, 0x97, 0x60, 0x06, 0xc4, 0x11, 0xd8, 0x27, 0xa3, + 0xa6, 0x6c, 0xdb, 0xc8, 0x5f, 0x77, 0xb9, 0x9f, 0xe0, 0x6a, 0xb1, 0x00, 0xd0, 0x79, 0x99, 0xc6, + 0x28, 0x6c, 0xec, 0x6f, 0xbb, 0x9d, 0xf7, 0x7a, 0x03, 0xe9, 0x0a, 0x8a, 0xb7, 0x71, 0x8b, 0x60, + 0xbb, 0x2a, 0x28, 0x5e, 0xc0, 0x8f, 0xc2, 0xf0, 0x43, 0x99, 0x8a, 0xb5, 0xe7, 0xdb, 0xe8, 0xdf, + 0x89, 0xe6, 0xf5, 0x98, 0xb0, 0x48, 0xa5, 0x52, 0x7b, 0x7e, 0x66, 0x63, 0xff, 0x20, 0xb6, 0x04, + 0x10, 0x6e, 0x79, 0x99, 0x76, 0xb9, 0xef, 0x3f, 0x19, 0x66, 0x00, 0x83, 0xc6, 0xeb, 0x87, 0xe5, + 0x96, 0x8d, 0xfd, 0x8b, 0x83, 0xa6, 0xf5, 0xe2, 0x18, 0xd4, 0xf0, 0xb2, 0xf8, 0x3f, 0x84, 0x0d, + 0xfe, 0x9b, 0xe0, 0x2e, 0x81, 0xbf, 0x9c, 0xe9, 0xb6, 0x0e, 0xec, 0xc9, 0xfe, 0x87, 0x2a, 0xcd, + 0xeb, 0xc5, 0x22, 0x8c, 0x66, 0xba, 0xdd, 0xce, 0xe9, 0x44, 0x63, 0xc1, 0xff, 0xdd, 0x2d, 0x5f, + 0x72, 0x4b, 0xe6, 0xf8, 0x21, 0x98, 0x6e, 0xa9, 0xa8, 0x17, 0x3c, 0x0e, 0x2b, 0x6a, 0x45, 0xad, + 0x15, 0xbb, 0xe8, 0xbf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x0a, 0x9c, 0xec, 0xd8, 0x50, 0x13, 0x00, + 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.golden b/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.golden new file mode 100644 index 00000000..f6502e4b --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/gogo.pb.golden @@ -0,0 +1,45 @@ +// Code generated by protoc-gen-go. +// source: gogo.proto +// DO NOT EDIT! + +package gogoproto + +import proto "github.com/gogo/protobuf/proto" +import json "encoding/json" +import math "math" +import google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" + +// Reference proto, json, and math imports to suppress error if they are not otherwise used. +var _ = proto.Marshal +var _ = &json.SyntaxError{} +var _ = math.Inf + +var E_Nullable = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 51235, + Name: "gogoproto.nullable", + Tag: "varint,51235,opt,name=nullable", +} + +var E_Embed = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*bool)(nil), + Field: 51236, + Name: "gogoproto.embed", + Tag: "varint,51236,opt,name=embed", +} + +var E_Customtype = &proto.ExtensionDesc{ + ExtendedType: (*google_protobuf.FieldOptions)(nil), + ExtensionType: (*string)(nil), + Field: 51237, + Name: "gogoproto.customtype", + Tag: "bytes,51237,opt,name=customtype", +} + +func init() { + proto.RegisterExtension(E_Nullable) + proto.RegisterExtension(E_Embed) + proto.RegisterExtension(E_Customtype) +} diff --git a/vendor/github.com/gogo/protobuf/gogoproto/gogo.proto b/vendor/github.com/gogo/protobuf/gogoproto/gogo.proto new file mode 100644 index 00000000..fbca44cd --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/gogo.proto @@ -0,0 +1,132 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto2"; +package gogoproto; + +import "google/protobuf/descriptor.proto"; + +option java_package = "com.google.protobuf"; +option java_outer_classname = "GoGoProtos"; + +extend google.protobuf.EnumOptions { + optional bool goproto_enum_prefix = 62001; + optional bool goproto_enum_stringer = 62021; + optional bool enum_stringer = 62022; + optional string enum_customname = 62023; + optional bool enumdecl = 62024; +} + +extend google.protobuf.EnumValueOptions { + optional string enumvalue_customname = 66001; +} + +extend google.protobuf.FileOptions { + optional bool goproto_getters_all = 63001; + optional bool goproto_enum_prefix_all = 63002; + optional bool goproto_stringer_all = 63003; + optional bool verbose_equal_all = 63004; + optional bool face_all = 63005; + optional bool gostring_all = 63006; + optional bool populate_all = 63007; + optional bool stringer_all = 63008; + optional bool onlyone_all = 63009; + + optional bool equal_all = 63013; + optional bool description_all = 63014; + optional bool testgen_all = 63015; + optional bool benchgen_all = 63016; + optional bool marshaler_all = 63017; + optional bool unmarshaler_all = 63018; + optional bool stable_marshaler_all = 63019; + + optional bool sizer_all = 63020; + + optional bool goproto_enum_stringer_all = 63021; + optional bool enum_stringer_all = 63022; + + optional bool unsafe_marshaler_all = 63023; + optional bool unsafe_unmarshaler_all = 63024; + + optional bool goproto_extensions_map_all = 63025; + optional bool goproto_unrecognized_all = 63026; + optional bool gogoproto_import = 63027; + optional bool protosizer_all = 63028; + optional bool compare_all = 63029; + optional bool typedecl_all = 63030; + optional bool enumdecl_all = 63031; + + optional bool goproto_registration = 63032; +} + +extend google.protobuf.MessageOptions { + optional bool goproto_getters = 64001; + optional bool goproto_stringer = 64003; + optional bool verbose_equal = 64004; + optional bool face = 64005; + optional bool gostring = 64006; + optional bool populate = 64007; + optional bool stringer = 67008; + optional bool onlyone = 64009; + + optional bool equal = 64013; + optional bool description = 64014; + optional bool testgen = 64015; + optional bool benchgen = 64016; + optional bool marshaler = 64017; + optional bool unmarshaler = 64018; + optional bool stable_marshaler = 64019; + + optional bool sizer = 64020; + + optional bool unsafe_marshaler = 64023; + optional bool unsafe_unmarshaler = 64024; + + optional bool goproto_extensions_map = 64025; + optional bool goproto_unrecognized = 64026; + + optional bool protosizer = 64028; + optional bool compare = 64029; + + optional bool typedecl = 64030; +} + +extend google.protobuf.FieldOptions { + optional bool nullable = 65001; + optional bool embed = 65002; + optional string customtype = 65003; + optional string customname = 65004; + optional string jsontag = 65005; + optional string moretags = 65006; + optional string casttype = 65007; + optional string castkey = 65008; + optional string castvalue = 65009; + + optional bool stdtime = 65010; + optional bool stdduration = 65011; +} diff --git a/vendor/github.com/gogo/protobuf/gogoproto/helper.go b/vendor/github.com/gogo/protobuf/gogoproto/helper.go new file mode 100644 index 00000000..6b851c56 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/gogoproto/helper.go @@ -0,0 +1,357 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package gogoproto + +import google_protobuf "github.com/gogo/protobuf/protoc-gen-gogo/descriptor" +import proto "github.com/gogo/protobuf/proto" + +func IsEmbed(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Embed, false) +} + +func IsNullable(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Nullable, true) +} + +func IsStdTime(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Stdtime, false) +} + +func IsStdDuration(field *google_protobuf.FieldDescriptorProto) bool { + return proto.GetBoolExtension(field.Options, E_Stdduration, false) +} + +func NeedsNilCheck(proto3 bool, field *google_protobuf.FieldDescriptorProto) bool { + nullable := IsNullable(field) + if field.IsMessage() || IsCustomType(field) { + return nullable + } + if proto3 { + return false + } + return nullable || *field.Type == google_protobuf.FieldDescriptorProto_TYPE_BYTES +} + +func IsCustomType(field *google_protobuf.FieldDescriptorProto) bool { + typ := GetCustomType(field) + if len(typ) > 0 { + return true + } + return false +} + +func IsCastType(field *google_protobuf.FieldDescriptorProto) bool { + typ := GetCastType(field) + if len(typ) > 0 { + return true + } + return false +} + +func IsCastKey(field *google_protobuf.FieldDescriptorProto) bool { + typ := GetCastKey(field) + if len(typ) > 0 { + return true + } + return false +} + +func IsCastValue(field *google_protobuf.FieldDescriptorProto) bool { + typ := GetCastValue(field) + if len(typ) > 0 { + return true + } + return false +} + +func HasEnumDecl(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { + return proto.GetBoolExtension(enum.Options, E_Enumdecl, proto.GetBoolExtension(file.Options, E_EnumdeclAll, true)) +} + +func HasTypeDecl(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Typedecl, proto.GetBoolExtension(file.Options, E_TypedeclAll, true)) +} + +func GetCustomType(field *google_protobuf.FieldDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Customtype) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func GetCastType(field *google_protobuf.FieldDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Casttype) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func GetCastKey(field *google_protobuf.FieldDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Castkey) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func GetCastValue(field *google_protobuf.FieldDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Castvalue) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func IsCustomName(field *google_protobuf.FieldDescriptorProto) bool { + name := GetCustomName(field) + if len(name) > 0 { + return true + } + return false +} + +func IsEnumCustomName(field *google_protobuf.EnumDescriptorProto) bool { + name := GetEnumCustomName(field) + if len(name) > 0 { + return true + } + return false +} + +func IsEnumValueCustomName(field *google_protobuf.EnumValueDescriptorProto) bool { + name := GetEnumValueCustomName(field) + if len(name) > 0 { + return true + } + return false +} + +func GetCustomName(field *google_protobuf.FieldDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Customname) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func GetEnumCustomName(field *google_protobuf.EnumDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_EnumCustomname) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func GetEnumValueCustomName(field *google_protobuf.EnumValueDescriptorProto) string { + if field == nil { + return "" + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_EnumvalueCustomname) + if err == nil && v.(*string) != nil { + return *(v.(*string)) + } + } + return "" +} + +func GetJsonTag(field *google_protobuf.FieldDescriptorProto) *string { + if field == nil { + return nil + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Jsontag) + if err == nil && v.(*string) != nil { + return (v.(*string)) + } + } + return nil +} + +func GetMoreTags(field *google_protobuf.FieldDescriptorProto) *string { + if field == nil { + return nil + } + if field.Options != nil { + v, err := proto.GetExtension(field.Options, E_Moretags) + if err == nil && v.(*string) != nil { + return (v.(*string)) + } + } + return nil +} + +type EnableFunc func(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool + +func EnabledGoEnumPrefix(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { + return proto.GetBoolExtension(enum.Options, E_GoprotoEnumPrefix, proto.GetBoolExtension(file.Options, E_GoprotoEnumPrefixAll, true)) +} + +func EnabledGoStringer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_GoprotoStringer, proto.GetBoolExtension(file.Options, E_GoprotoStringerAll, true)) +} + +func HasGoGetters(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_GoprotoGetters, proto.GetBoolExtension(file.Options, E_GoprotoGettersAll, true)) +} + +func IsUnion(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Onlyone, proto.GetBoolExtension(file.Options, E_OnlyoneAll, false)) +} + +func HasGoString(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Gostring, proto.GetBoolExtension(file.Options, E_GostringAll, false)) +} + +func HasEqual(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Equal, proto.GetBoolExtension(file.Options, E_EqualAll, false)) +} + +func HasVerboseEqual(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_VerboseEqual, proto.GetBoolExtension(file.Options, E_VerboseEqualAll, false)) +} + +func IsStringer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Stringer, proto.GetBoolExtension(file.Options, E_StringerAll, false)) +} + +func IsFace(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Face, proto.GetBoolExtension(file.Options, E_FaceAll, false)) +} + +func HasDescription(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Description, proto.GetBoolExtension(file.Options, E_DescriptionAll, false)) +} + +func HasPopulate(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Populate, proto.GetBoolExtension(file.Options, E_PopulateAll, false)) +} + +func HasTestGen(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Testgen, proto.GetBoolExtension(file.Options, E_TestgenAll, false)) +} + +func HasBenchGen(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Benchgen, proto.GetBoolExtension(file.Options, E_BenchgenAll, false)) +} + +func IsMarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Marshaler, proto.GetBoolExtension(file.Options, E_MarshalerAll, false)) +} + +func IsUnmarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Unmarshaler, proto.GetBoolExtension(file.Options, E_UnmarshalerAll, false)) +} + +func IsStableMarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_StableMarshaler, proto.GetBoolExtension(file.Options, E_StableMarshalerAll, false)) +} + +func IsSizer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Sizer, proto.GetBoolExtension(file.Options, E_SizerAll, false)) +} + +func IsProtoSizer(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Protosizer, proto.GetBoolExtension(file.Options, E_ProtosizerAll, false)) +} + +func IsGoEnumStringer(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { + return proto.GetBoolExtension(enum.Options, E_GoprotoEnumStringer, proto.GetBoolExtension(file.Options, E_GoprotoEnumStringerAll, true)) +} + +func IsEnumStringer(file *google_protobuf.FileDescriptorProto, enum *google_protobuf.EnumDescriptorProto) bool { + return proto.GetBoolExtension(enum.Options, E_EnumStringer, proto.GetBoolExtension(file.Options, E_EnumStringerAll, false)) +} + +func IsUnsafeMarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_UnsafeMarshaler, proto.GetBoolExtension(file.Options, E_UnsafeMarshalerAll, false)) +} + +func IsUnsafeUnmarshaler(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_UnsafeUnmarshaler, proto.GetBoolExtension(file.Options, E_UnsafeUnmarshalerAll, false)) +} + +func HasExtensionsMap(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_GoprotoExtensionsMap, proto.GetBoolExtension(file.Options, E_GoprotoExtensionsMapAll, true)) +} + +func HasUnrecognized(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + if IsProto3(file) { + return false + } + return proto.GetBoolExtension(message.Options, E_GoprotoUnrecognized, proto.GetBoolExtension(file.Options, E_GoprotoUnrecognizedAll, true)) +} + +func IsProto3(file *google_protobuf.FileDescriptorProto) bool { + return file.GetSyntax() == "proto3" +} + +func ImportsGoGoProto(file *google_protobuf.FileDescriptorProto) bool { + return proto.GetBoolExtension(file.Options, E_GogoprotoImport, true) +} + +func HasCompare(file *google_protobuf.FileDescriptorProto, message *google_protobuf.DescriptorProto) bool { + return proto.GetBoolExtension(message.Options, E_Compare, proto.GetBoolExtension(file.Options, E_CompareAll, false)) +} + +func RegistersGolangProto(file *google_protobuf.FileDescriptorProto) bool { + return proto.GetBoolExtension(file.Options, E_GoprotoRegistration, false) +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/Makefile b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/Makefile new file mode 100644 index 00000000..3496dc99 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/Makefile @@ -0,0 +1,36 @@ +# Go support for Protocol Buffers - Google's data interchange format +# +# Copyright 2010 The Go Authors. All rights reserved. +# https://github.com/golang/protobuf +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +regenerate: + go install github.com/gogo/protobuf/protoc-gen-gogo + go install github.com/gogo/protobuf/protoc-gen-gostring + protoc --gogo_out=. -I=../../protobuf/google/protobuf ../../protobuf/google/protobuf/descriptor.proto + protoc --gostring_out=. -I=../../protobuf/google/protobuf ../../protobuf/google/protobuf/descriptor.proto diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.go new file mode 100644 index 00000000..a85bf198 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.go @@ -0,0 +1,118 @@ +// Go support for Protocol Buffers - Google's data interchange format +// +// Copyright 2016 The Go Authors. All rights reserved. +// https://github.com/golang/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Package descriptor provides functions for obtaining protocol buffer +// descriptors for generated Go types. +// +// These functions cannot go in package proto because they depend on the +// generated protobuf descriptor messages, which themselves depend on proto. +package descriptor + +import ( + "bytes" + "compress/gzip" + "fmt" + "io/ioutil" + + "github.com/gogo/protobuf/proto" +) + +// extractFile extracts a FileDescriptorProto from a gzip'd buffer. +func extractFile(gz []byte) (*FileDescriptorProto, error) { + r, err := gzip.NewReader(bytes.NewReader(gz)) + if err != nil { + return nil, fmt.Errorf("failed to open gzip reader: %v", err) + } + defer r.Close() + + b, err := ioutil.ReadAll(r) + if err != nil { + return nil, fmt.Errorf("failed to uncompress descriptor: %v", err) + } + + fd := new(FileDescriptorProto) + if err := proto.Unmarshal(b, fd); err != nil { + return nil, fmt.Errorf("malformed FileDescriptorProto: %v", err) + } + + return fd, nil +} + +// Message is a proto.Message with a method to return its descriptor. +// +// Message types generated by the protocol compiler always satisfy +// the Message interface. +type Message interface { + proto.Message + Descriptor() ([]byte, []int) +} + +// ForMessage returns a FileDescriptorProto and a DescriptorProto from within it +// describing the given message. +func ForMessage(msg Message) (fd *FileDescriptorProto, md *DescriptorProto) { + gz, path := msg.Descriptor() + fd, err := extractFile(gz) + if err != nil { + panic(fmt.Sprintf("invalid FileDescriptorProto for %T: %v", msg, err)) + } + + md = fd.MessageType[path[0]] + for _, i := range path[1:] { + md = md.NestedType[i] + } + return fd, md +} + +// Is this field a scalar numeric type? +func (field *FieldDescriptorProto) IsScalar() bool { + if field.Type == nil { + return false + } + switch *field.Type { + case FieldDescriptorProto_TYPE_DOUBLE, + FieldDescriptorProto_TYPE_FLOAT, + FieldDescriptorProto_TYPE_INT64, + FieldDescriptorProto_TYPE_UINT64, + FieldDescriptorProto_TYPE_INT32, + FieldDescriptorProto_TYPE_FIXED64, + FieldDescriptorProto_TYPE_FIXED32, + FieldDescriptorProto_TYPE_BOOL, + FieldDescriptorProto_TYPE_UINT32, + FieldDescriptorProto_TYPE_ENUM, + FieldDescriptorProto_TYPE_SFIXED32, + FieldDescriptorProto_TYPE_SFIXED64, + FieldDescriptorProto_TYPE_SINT32, + FieldDescriptorProto_TYPE_SINT64: + return true + default: + return false + } +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go new file mode 100644 index 00000000..e2703901 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor.pb.go @@ -0,0 +1,2150 @@ +// Code generated by protoc-gen-gogo. +// source: descriptor.proto +// DO NOT EDIT! + +/* +Package descriptor is a generated protocol buffer package. + +It is generated from these files: + descriptor.proto + +It has these top-level messages: + FileDescriptorSet + FileDescriptorProto + DescriptorProto + FieldDescriptorProto + OneofDescriptorProto + EnumDescriptorProto + EnumValueDescriptorProto + ServiceDescriptorProto + MethodDescriptorProto + FileOptions + MessageOptions + FieldOptions + OneofOptions + EnumOptions + EnumValueOptions + ServiceOptions + MethodOptions + UninterpretedOption + SourceCodeInfo + GeneratedCodeInfo +*/ +package descriptor + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +type FieldDescriptorProto_Type int32 + +const ( + // 0 is reserved for errors. + // Order is weird for historical reasons. + FieldDescriptorProto_TYPE_DOUBLE FieldDescriptorProto_Type = 1 + FieldDescriptorProto_TYPE_FLOAT FieldDescriptorProto_Type = 2 + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT64 if + // negative values are likely. + FieldDescriptorProto_TYPE_INT64 FieldDescriptorProto_Type = 3 + FieldDescriptorProto_TYPE_UINT64 FieldDescriptorProto_Type = 4 + // Not ZigZag encoded. Negative numbers take 10 bytes. Use TYPE_SINT32 if + // negative values are likely. + FieldDescriptorProto_TYPE_INT32 FieldDescriptorProto_Type = 5 + FieldDescriptorProto_TYPE_FIXED64 FieldDescriptorProto_Type = 6 + FieldDescriptorProto_TYPE_FIXED32 FieldDescriptorProto_Type = 7 + FieldDescriptorProto_TYPE_BOOL FieldDescriptorProto_Type = 8 + FieldDescriptorProto_TYPE_STRING FieldDescriptorProto_Type = 9 + // Tag-delimited aggregate. + // Group type is deprecated and not supported in proto3. However, Proto3 + // implementations should still be able to parse the group wire format and + // treat group fields as unknown fields. + FieldDescriptorProto_TYPE_GROUP FieldDescriptorProto_Type = 10 + FieldDescriptorProto_TYPE_MESSAGE FieldDescriptorProto_Type = 11 + // New in version 2. + FieldDescriptorProto_TYPE_BYTES FieldDescriptorProto_Type = 12 + FieldDescriptorProto_TYPE_UINT32 FieldDescriptorProto_Type = 13 + FieldDescriptorProto_TYPE_ENUM FieldDescriptorProto_Type = 14 + FieldDescriptorProto_TYPE_SFIXED32 FieldDescriptorProto_Type = 15 + FieldDescriptorProto_TYPE_SFIXED64 FieldDescriptorProto_Type = 16 + FieldDescriptorProto_TYPE_SINT32 FieldDescriptorProto_Type = 17 + FieldDescriptorProto_TYPE_SINT64 FieldDescriptorProto_Type = 18 +) + +var FieldDescriptorProto_Type_name = map[int32]string{ + 1: "TYPE_DOUBLE", + 2: "TYPE_FLOAT", + 3: "TYPE_INT64", + 4: "TYPE_UINT64", + 5: "TYPE_INT32", + 6: "TYPE_FIXED64", + 7: "TYPE_FIXED32", + 8: "TYPE_BOOL", + 9: "TYPE_STRING", + 10: "TYPE_GROUP", + 11: "TYPE_MESSAGE", + 12: "TYPE_BYTES", + 13: "TYPE_UINT32", + 14: "TYPE_ENUM", + 15: "TYPE_SFIXED32", + 16: "TYPE_SFIXED64", + 17: "TYPE_SINT32", + 18: "TYPE_SINT64", +} +var FieldDescriptorProto_Type_value = map[string]int32{ + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18, +} + +func (x FieldDescriptorProto_Type) Enum() *FieldDescriptorProto_Type { + p := new(FieldDescriptorProto_Type) + *p = x + return p +} +func (x FieldDescriptorProto_Type) String() string { + return proto.EnumName(FieldDescriptorProto_Type_name, int32(x)) +} +func (x *FieldDescriptorProto_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Type_value, data, "FieldDescriptorProto_Type") + if err != nil { + return err + } + *x = FieldDescriptorProto_Type(value) + return nil +} +func (FieldDescriptorProto_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptorDescriptor, []int{3, 0} +} + +type FieldDescriptorProto_Label int32 + +const ( + // 0 is reserved for errors + FieldDescriptorProto_LABEL_OPTIONAL FieldDescriptorProto_Label = 1 + FieldDescriptorProto_LABEL_REQUIRED FieldDescriptorProto_Label = 2 + FieldDescriptorProto_LABEL_REPEATED FieldDescriptorProto_Label = 3 +) + +var FieldDescriptorProto_Label_name = map[int32]string{ + 1: "LABEL_OPTIONAL", + 2: "LABEL_REQUIRED", + 3: "LABEL_REPEATED", +} +var FieldDescriptorProto_Label_value = map[string]int32{ + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3, +} + +func (x FieldDescriptorProto_Label) Enum() *FieldDescriptorProto_Label { + p := new(FieldDescriptorProto_Label) + *p = x + return p +} +func (x FieldDescriptorProto_Label) String() string { + return proto.EnumName(FieldDescriptorProto_Label_name, int32(x)) +} +func (x *FieldDescriptorProto_Label) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FieldDescriptorProto_Label_value, data, "FieldDescriptorProto_Label") + if err != nil { + return err + } + *x = FieldDescriptorProto_Label(value) + return nil +} +func (FieldDescriptorProto_Label) EnumDescriptor() ([]byte, []int) { + return fileDescriptorDescriptor, []int{3, 1} +} + +// Generated classes can be optimized for speed or code size. +type FileOptions_OptimizeMode int32 + +const ( + FileOptions_SPEED FileOptions_OptimizeMode = 1 + // etc. + FileOptions_CODE_SIZE FileOptions_OptimizeMode = 2 + FileOptions_LITE_RUNTIME FileOptions_OptimizeMode = 3 +) + +var FileOptions_OptimizeMode_name = map[int32]string{ + 1: "SPEED", + 2: "CODE_SIZE", + 3: "LITE_RUNTIME", +} +var FileOptions_OptimizeMode_value = map[string]int32{ + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3, +} + +func (x FileOptions_OptimizeMode) Enum() *FileOptions_OptimizeMode { + p := new(FileOptions_OptimizeMode) + *p = x + return p +} +func (x FileOptions_OptimizeMode) String() string { + return proto.EnumName(FileOptions_OptimizeMode_name, int32(x)) +} +func (x *FileOptions_OptimizeMode) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FileOptions_OptimizeMode_value, data, "FileOptions_OptimizeMode") + if err != nil { + return err + } + *x = FileOptions_OptimizeMode(value) + return nil +} +func (FileOptions_OptimizeMode) EnumDescriptor() ([]byte, []int) { + return fileDescriptorDescriptor, []int{9, 0} +} + +type FieldOptions_CType int32 + +const ( + // Default mode. + FieldOptions_STRING FieldOptions_CType = 0 + FieldOptions_CORD FieldOptions_CType = 1 + FieldOptions_STRING_PIECE FieldOptions_CType = 2 +) + +var FieldOptions_CType_name = map[int32]string{ + 0: "STRING", + 1: "CORD", + 2: "STRING_PIECE", +} +var FieldOptions_CType_value = map[string]int32{ + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2, +} + +func (x FieldOptions_CType) Enum() *FieldOptions_CType { + p := new(FieldOptions_CType) + *p = x + return p +} +func (x FieldOptions_CType) String() string { + return proto.EnumName(FieldOptions_CType_name, int32(x)) +} +func (x *FieldOptions_CType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FieldOptions_CType_value, data, "FieldOptions_CType") + if err != nil { + return err + } + *x = FieldOptions_CType(value) + return nil +} +func (FieldOptions_CType) EnumDescriptor() ([]byte, []int) { + return fileDescriptorDescriptor, []int{11, 0} +} + +type FieldOptions_JSType int32 + +const ( + // Use the default type. + FieldOptions_JS_NORMAL FieldOptions_JSType = 0 + // Use JavaScript strings. + FieldOptions_JS_STRING FieldOptions_JSType = 1 + // Use JavaScript numbers. + FieldOptions_JS_NUMBER FieldOptions_JSType = 2 +) + +var FieldOptions_JSType_name = map[int32]string{ + 0: "JS_NORMAL", + 1: "JS_STRING", + 2: "JS_NUMBER", +} +var FieldOptions_JSType_value = map[string]int32{ + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2, +} + +func (x FieldOptions_JSType) Enum() *FieldOptions_JSType { + p := new(FieldOptions_JSType) + *p = x + return p +} +func (x FieldOptions_JSType) String() string { + return proto.EnumName(FieldOptions_JSType_name, int32(x)) +} +func (x *FieldOptions_JSType) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FieldOptions_JSType_value, data, "FieldOptions_JSType") + if err != nil { + return err + } + *x = FieldOptions_JSType(value) + return nil +} +func (FieldOptions_JSType) EnumDescriptor() ([]byte, []int) { + return fileDescriptorDescriptor, []int{11, 1} +} + +// Is this method side-effect-free (or safe in HTTP parlance), or idempotent, +// or neither? HTTP based RPC implementation may choose GET verb for safe +// methods, and PUT verb for idempotent methods instead of the default POST. +type MethodOptions_IdempotencyLevel int32 + +const ( + MethodOptions_IDEMPOTENCY_UNKNOWN MethodOptions_IdempotencyLevel = 0 + MethodOptions_NO_SIDE_EFFECTS MethodOptions_IdempotencyLevel = 1 + MethodOptions_IDEMPOTENT MethodOptions_IdempotencyLevel = 2 +) + +var MethodOptions_IdempotencyLevel_name = map[int32]string{ + 0: "IDEMPOTENCY_UNKNOWN", + 1: "NO_SIDE_EFFECTS", + 2: "IDEMPOTENT", +} +var MethodOptions_IdempotencyLevel_value = map[string]int32{ + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2, +} + +func (x MethodOptions_IdempotencyLevel) Enum() *MethodOptions_IdempotencyLevel { + p := new(MethodOptions_IdempotencyLevel) + *p = x + return p +} +func (x MethodOptions_IdempotencyLevel) String() string { + return proto.EnumName(MethodOptions_IdempotencyLevel_name, int32(x)) +} +func (x *MethodOptions_IdempotencyLevel) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MethodOptions_IdempotencyLevel_value, data, "MethodOptions_IdempotencyLevel") + if err != nil { + return err + } + *x = MethodOptions_IdempotencyLevel(value) + return nil +} +func (MethodOptions_IdempotencyLevel) EnumDescriptor() ([]byte, []int) { + return fileDescriptorDescriptor, []int{16, 0} +} + +// The protocol compiler can output a FileDescriptorSet containing the .proto +// files it parses. +type FileDescriptorSet struct { + File []*FileDescriptorProto `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FileDescriptorSet) Reset() { *m = FileDescriptorSet{} } +func (m *FileDescriptorSet) String() string { return proto.CompactTextString(m) } +func (*FileDescriptorSet) ProtoMessage() {} +func (*FileDescriptorSet) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{0} } + +func (m *FileDescriptorSet) GetFile() []*FileDescriptorProto { + if m != nil { + return m.File + } + return nil +} + +// Describes a complete .proto file. +type FileDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Package *string `protobuf:"bytes,2,opt,name=package" json:"package,omitempty"` + // Names of files imported by this file. + Dependency []string `protobuf:"bytes,3,rep,name=dependency" json:"dependency,omitempty"` + // Indexes of the public imported files in the dependency list above. + PublicDependency []int32 `protobuf:"varint,10,rep,name=public_dependency,json=publicDependency" json:"public_dependency,omitempty"` + // Indexes of the weak imported files in the dependency list. + // For Google-internal migration only. Do not use. + WeakDependency []int32 `protobuf:"varint,11,rep,name=weak_dependency,json=weakDependency" json:"weak_dependency,omitempty"` + // All top-level definitions in this file. + MessageType []*DescriptorProto `protobuf:"bytes,4,rep,name=message_type,json=messageType" json:"message_type,omitempty"` + EnumType []*EnumDescriptorProto `protobuf:"bytes,5,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"` + Service []*ServiceDescriptorProto `protobuf:"bytes,6,rep,name=service" json:"service,omitempty"` + Extension []*FieldDescriptorProto `protobuf:"bytes,7,rep,name=extension" json:"extension,omitempty"` + Options *FileOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"` + // This field contains optional information about the original source code. + // You may safely remove this entire field without harming runtime + // functionality of the descriptors -- the information is needed only by + // development tools. + SourceCodeInfo *SourceCodeInfo `protobuf:"bytes,9,opt,name=source_code_info,json=sourceCodeInfo" json:"source_code_info,omitempty"` + // The syntax of the proto file. + // The supported values are "proto2" and "proto3". + Syntax *string `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FileDescriptorProto) Reset() { *m = FileDescriptorProto{} } +func (m *FileDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*FileDescriptorProto) ProtoMessage() {} +func (*FileDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{1} } + +func (m *FileDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *FileDescriptorProto) GetPackage() string { + if m != nil && m.Package != nil { + return *m.Package + } + return "" +} + +func (m *FileDescriptorProto) GetDependency() []string { + if m != nil { + return m.Dependency + } + return nil +} + +func (m *FileDescriptorProto) GetPublicDependency() []int32 { + if m != nil { + return m.PublicDependency + } + return nil +} + +func (m *FileDescriptorProto) GetWeakDependency() []int32 { + if m != nil { + return m.WeakDependency + } + return nil +} + +func (m *FileDescriptorProto) GetMessageType() []*DescriptorProto { + if m != nil { + return m.MessageType + } + return nil +} + +func (m *FileDescriptorProto) GetEnumType() []*EnumDescriptorProto { + if m != nil { + return m.EnumType + } + return nil +} + +func (m *FileDescriptorProto) GetService() []*ServiceDescriptorProto { + if m != nil { + return m.Service + } + return nil +} + +func (m *FileDescriptorProto) GetExtension() []*FieldDescriptorProto { + if m != nil { + return m.Extension + } + return nil +} + +func (m *FileDescriptorProto) GetOptions() *FileOptions { + if m != nil { + return m.Options + } + return nil +} + +func (m *FileDescriptorProto) GetSourceCodeInfo() *SourceCodeInfo { + if m != nil { + return m.SourceCodeInfo + } + return nil +} + +func (m *FileDescriptorProto) GetSyntax() string { + if m != nil && m.Syntax != nil { + return *m.Syntax + } + return "" +} + +// Describes a message type. +type DescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Field []*FieldDescriptorProto `protobuf:"bytes,2,rep,name=field" json:"field,omitempty"` + Extension []*FieldDescriptorProto `protobuf:"bytes,6,rep,name=extension" json:"extension,omitempty"` + NestedType []*DescriptorProto `protobuf:"bytes,3,rep,name=nested_type,json=nestedType" json:"nested_type,omitempty"` + EnumType []*EnumDescriptorProto `protobuf:"bytes,4,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"` + ExtensionRange []*DescriptorProto_ExtensionRange `protobuf:"bytes,5,rep,name=extension_range,json=extensionRange" json:"extension_range,omitempty"` + OneofDecl []*OneofDescriptorProto `protobuf:"bytes,8,rep,name=oneof_decl,json=oneofDecl" json:"oneof_decl,omitempty"` + Options *MessageOptions `protobuf:"bytes,7,opt,name=options" json:"options,omitempty"` + ReservedRange []*DescriptorProto_ReservedRange `protobuf:"bytes,9,rep,name=reserved_range,json=reservedRange" json:"reserved_range,omitempty"` + // Reserved field names, which may not be used by fields in the same message. + // A given name may only be reserved once. + ReservedName []string `protobuf:"bytes,10,rep,name=reserved_name,json=reservedName" json:"reserved_name,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DescriptorProto) Reset() { *m = DescriptorProto{} } +func (m *DescriptorProto) String() string { return proto.CompactTextString(m) } +func (*DescriptorProto) ProtoMessage() {} +func (*DescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{2} } + +func (m *DescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *DescriptorProto) GetField() []*FieldDescriptorProto { + if m != nil { + return m.Field + } + return nil +} + +func (m *DescriptorProto) GetExtension() []*FieldDescriptorProto { + if m != nil { + return m.Extension + } + return nil +} + +func (m *DescriptorProto) GetNestedType() []*DescriptorProto { + if m != nil { + return m.NestedType + } + return nil +} + +func (m *DescriptorProto) GetEnumType() []*EnumDescriptorProto { + if m != nil { + return m.EnumType + } + return nil +} + +func (m *DescriptorProto) GetExtensionRange() []*DescriptorProto_ExtensionRange { + if m != nil { + return m.ExtensionRange + } + return nil +} + +func (m *DescriptorProto) GetOneofDecl() []*OneofDescriptorProto { + if m != nil { + return m.OneofDecl + } + return nil +} + +func (m *DescriptorProto) GetOptions() *MessageOptions { + if m != nil { + return m.Options + } + return nil +} + +func (m *DescriptorProto) GetReservedRange() []*DescriptorProto_ReservedRange { + if m != nil { + return m.ReservedRange + } + return nil +} + +func (m *DescriptorProto) GetReservedName() []string { + if m != nil { + return m.ReservedName + } + return nil +} + +type DescriptorProto_ExtensionRange struct { + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DescriptorProto_ExtensionRange) Reset() { *m = DescriptorProto_ExtensionRange{} } +func (m *DescriptorProto_ExtensionRange) String() string { return proto.CompactTextString(m) } +func (*DescriptorProto_ExtensionRange) ProtoMessage() {} +func (*DescriptorProto_ExtensionRange) Descriptor() ([]byte, []int) { + return fileDescriptorDescriptor, []int{2, 0} +} + +func (m *DescriptorProto_ExtensionRange) GetStart() int32 { + if m != nil && m.Start != nil { + return *m.Start + } + return 0 +} + +func (m *DescriptorProto_ExtensionRange) GetEnd() int32 { + if m != nil && m.End != nil { + return *m.End + } + return 0 +} + +// Range of reserved tag numbers. Reserved tag numbers may not be used by +// fields or extension ranges in the same message. Reserved ranges may +// not overlap. +type DescriptorProto_ReservedRange struct { + Start *int32 `protobuf:"varint,1,opt,name=start" json:"start,omitempty"` + End *int32 `protobuf:"varint,2,opt,name=end" json:"end,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *DescriptorProto_ReservedRange) Reset() { *m = DescriptorProto_ReservedRange{} } +func (m *DescriptorProto_ReservedRange) String() string { return proto.CompactTextString(m) } +func (*DescriptorProto_ReservedRange) ProtoMessage() {} +func (*DescriptorProto_ReservedRange) Descriptor() ([]byte, []int) { + return fileDescriptorDescriptor, []int{2, 1} +} + +func (m *DescriptorProto_ReservedRange) GetStart() int32 { + if m != nil && m.Start != nil { + return *m.Start + } + return 0 +} + +func (m *DescriptorProto_ReservedRange) GetEnd() int32 { + if m != nil && m.End != nil { + return *m.End + } + return 0 +} + +// Describes a field within a message. +type FieldDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Number *int32 `protobuf:"varint,3,opt,name=number" json:"number,omitempty"` + Label *FieldDescriptorProto_Label `protobuf:"varint,4,opt,name=label,enum=google.protobuf.FieldDescriptorProto_Label" json:"label,omitempty"` + // If type_name is set, this need not be set. If both this and type_name + // are set, this must be one of TYPE_ENUM, TYPE_MESSAGE or TYPE_GROUP. + Type *FieldDescriptorProto_Type `protobuf:"varint,5,opt,name=type,enum=google.protobuf.FieldDescriptorProto_Type" json:"type,omitempty"` + // For message and enum types, this is the name of the type. If the name + // starts with a '.', it is fully-qualified. Otherwise, C++-like scoping + // rules are used to find the type (i.e. first the nested types within this + // message are searched, then within the parent, on up to the root + // namespace). + TypeName *string `protobuf:"bytes,6,opt,name=type_name,json=typeName" json:"type_name,omitempty"` + // For extensions, this is the name of the type being extended. It is + // resolved in the same manner as type_name. + Extendee *string `protobuf:"bytes,2,opt,name=extendee" json:"extendee,omitempty"` + // For numeric types, contains the original text representation of the value. + // For booleans, "true" or "false". + // For strings, contains the default text contents (not escaped in any way). + // For bytes, contains the C escaped value. All bytes >= 128 are escaped. + // TODO(kenton): Base-64 encode? + DefaultValue *string `protobuf:"bytes,7,opt,name=default_value,json=defaultValue" json:"default_value,omitempty"` + // If set, gives the index of a oneof in the containing type's oneof_decl + // list. This field is a member of that oneof. + OneofIndex *int32 `protobuf:"varint,9,opt,name=oneof_index,json=oneofIndex" json:"oneof_index,omitempty"` + // JSON name of this field. The value is set by protocol compiler. If the + // user has set a "json_name" option on this field, that option's value + // will be used. Otherwise, it's deduced from the field's name by converting + // it to camelCase. + JsonName *string `protobuf:"bytes,10,opt,name=json_name,json=jsonName" json:"json_name,omitempty"` + Options *FieldOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FieldDescriptorProto) Reset() { *m = FieldDescriptorProto{} } +func (m *FieldDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*FieldDescriptorProto) ProtoMessage() {} +func (*FieldDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{3} } + +func (m *FieldDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *FieldDescriptorProto) GetNumber() int32 { + if m != nil && m.Number != nil { + return *m.Number + } + return 0 +} + +func (m *FieldDescriptorProto) GetLabel() FieldDescriptorProto_Label { + if m != nil && m.Label != nil { + return *m.Label + } + return FieldDescriptorProto_LABEL_OPTIONAL +} + +func (m *FieldDescriptorProto) GetType() FieldDescriptorProto_Type { + if m != nil && m.Type != nil { + return *m.Type + } + return FieldDescriptorProto_TYPE_DOUBLE +} + +func (m *FieldDescriptorProto) GetTypeName() string { + if m != nil && m.TypeName != nil { + return *m.TypeName + } + return "" +} + +func (m *FieldDescriptorProto) GetExtendee() string { + if m != nil && m.Extendee != nil { + return *m.Extendee + } + return "" +} + +func (m *FieldDescriptorProto) GetDefaultValue() string { + if m != nil && m.DefaultValue != nil { + return *m.DefaultValue + } + return "" +} + +func (m *FieldDescriptorProto) GetOneofIndex() int32 { + if m != nil && m.OneofIndex != nil { + return *m.OneofIndex + } + return 0 +} + +func (m *FieldDescriptorProto) GetJsonName() string { + if m != nil && m.JsonName != nil { + return *m.JsonName + } + return "" +} + +func (m *FieldDescriptorProto) GetOptions() *FieldOptions { + if m != nil { + return m.Options + } + return nil +} + +// Describes a oneof. +type OneofDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Options *OneofOptions `protobuf:"bytes,2,opt,name=options" json:"options,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OneofDescriptorProto) Reset() { *m = OneofDescriptorProto{} } +func (m *OneofDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*OneofDescriptorProto) ProtoMessage() {} +func (*OneofDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{4} } + +func (m *OneofDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *OneofDescriptorProto) GetOptions() *OneofOptions { + if m != nil { + return m.Options + } + return nil +} + +// Describes an enum type. +type EnumDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Value []*EnumValueDescriptorProto `protobuf:"bytes,2,rep,name=value" json:"value,omitempty"` + Options *EnumOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *EnumDescriptorProto) Reset() { *m = EnumDescriptorProto{} } +func (m *EnumDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*EnumDescriptorProto) ProtoMessage() {} +func (*EnumDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{5} } + +func (m *EnumDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *EnumDescriptorProto) GetValue() []*EnumValueDescriptorProto { + if m != nil { + return m.Value + } + return nil +} + +func (m *EnumDescriptorProto) GetOptions() *EnumOptions { + if m != nil { + return m.Options + } + return nil +} + +// Describes a value within an enum. +type EnumValueDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Number *int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"` + Options *EnumValueOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *EnumValueDescriptorProto) Reset() { *m = EnumValueDescriptorProto{} } +func (m *EnumValueDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*EnumValueDescriptorProto) ProtoMessage() {} +func (*EnumValueDescriptorProto) Descriptor() ([]byte, []int) { + return fileDescriptorDescriptor, []int{6} +} + +func (m *EnumValueDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *EnumValueDescriptorProto) GetNumber() int32 { + if m != nil && m.Number != nil { + return *m.Number + } + return 0 +} + +func (m *EnumValueDescriptorProto) GetOptions() *EnumValueOptions { + if m != nil { + return m.Options + } + return nil +} + +// Describes a service. +type ServiceDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + Method []*MethodDescriptorProto `protobuf:"bytes,2,rep,name=method" json:"method,omitempty"` + Options *ServiceOptions `protobuf:"bytes,3,opt,name=options" json:"options,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ServiceDescriptorProto) Reset() { *m = ServiceDescriptorProto{} } +func (m *ServiceDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*ServiceDescriptorProto) ProtoMessage() {} +func (*ServiceDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{7} } + +func (m *ServiceDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *ServiceDescriptorProto) GetMethod() []*MethodDescriptorProto { + if m != nil { + return m.Method + } + return nil +} + +func (m *ServiceDescriptorProto) GetOptions() *ServiceOptions { + if m != nil { + return m.Options + } + return nil +} + +// Describes a method of a service. +type MethodDescriptorProto struct { + Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` + // Input and output type names. These are resolved in the same way as + // FieldDescriptorProto.type_name, but must refer to a message type. + InputType *string `protobuf:"bytes,2,opt,name=input_type,json=inputType" json:"input_type,omitempty"` + OutputType *string `protobuf:"bytes,3,opt,name=output_type,json=outputType" json:"output_type,omitempty"` + Options *MethodOptions `protobuf:"bytes,4,opt,name=options" json:"options,omitempty"` + // Identifies if client streams multiple client messages + ClientStreaming *bool `protobuf:"varint,5,opt,name=client_streaming,json=clientStreaming,def=0" json:"client_streaming,omitempty"` + // Identifies if server streams multiple server messages + ServerStreaming *bool `protobuf:"varint,6,opt,name=server_streaming,json=serverStreaming,def=0" json:"server_streaming,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MethodDescriptorProto) Reset() { *m = MethodDescriptorProto{} } +func (m *MethodDescriptorProto) String() string { return proto.CompactTextString(m) } +func (*MethodDescriptorProto) ProtoMessage() {} +func (*MethodDescriptorProto) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{8} } + +const Default_MethodDescriptorProto_ClientStreaming bool = false +const Default_MethodDescriptorProto_ServerStreaming bool = false + +func (m *MethodDescriptorProto) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *MethodDescriptorProto) GetInputType() string { + if m != nil && m.InputType != nil { + return *m.InputType + } + return "" +} + +func (m *MethodDescriptorProto) GetOutputType() string { + if m != nil && m.OutputType != nil { + return *m.OutputType + } + return "" +} + +func (m *MethodDescriptorProto) GetOptions() *MethodOptions { + if m != nil { + return m.Options + } + return nil +} + +func (m *MethodDescriptorProto) GetClientStreaming() bool { + if m != nil && m.ClientStreaming != nil { + return *m.ClientStreaming + } + return Default_MethodDescriptorProto_ClientStreaming +} + +func (m *MethodDescriptorProto) GetServerStreaming() bool { + if m != nil && m.ServerStreaming != nil { + return *m.ServerStreaming + } + return Default_MethodDescriptorProto_ServerStreaming +} + +type FileOptions struct { + // Sets the Java package where classes generated from this .proto will be + // placed. By default, the proto package is used, but this is often + // inappropriate because proto packages do not normally start with backwards + // domain names. + JavaPackage *string `protobuf:"bytes,1,opt,name=java_package,json=javaPackage" json:"java_package,omitempty"` + // If set, all the classes from the .proto file are wrapped in a single + // outer class with the given name. This applies to both Proto1 + // (equivalent to the old "--one_java_file" option) and Proto2 (where + // a .proto always translates to a single class, but you may want to + // explicitly choose the class name). + JavaOuterClassname *string `protobuf:"bytes,8,opt,name=java_outer_classname,json=javaOuterClassname" json:"java_outer_classname,omitempty"` + // If set true, then the Java code generator will generate a separate .java + // file for each top-level message, enum, and service defined in the .proto + // file. Thus, these types will *not* be nested inside the outer class + // named by java_outer_classname. However, the outer class will still be + // generated to contain the file's getDescriptor() method as well as any + // top-level extensions defined in the file. + JavaMultipleFiles *bool `protobuf:"varint,10,opt,name=java_multiple_files,json=javaMultipleFiles,def=0" json:"java_multiple_files,omitempty"` + // This option does nothing. + JavaGenerateEqualsAndHash *bool `protobuf:"varint,20,opt,name=java_generate_equals_and_hash,json=javaGenerateEqualsAndHash" json:"java_generate_equals_and_hash,omitempty"` + // If set true, then the Java2 code generator will generate code that + // throws an exception whenever an attempt is made to assign a non-UTF-8 + // byte sequence to a string field. + // Message reflection will do the same. + // However, an extension field still accepts non-UTF-8 byte sequences. + // This option has no effect on when used with the lite runtime. + JavaStringCheckUtf8 *bool `protobuf:"varint,27,opt,name=java_string_check_utf8,json=javaStringCheckUtf8,def=0" json:"java_string_check_utf8,omitempty"` + OptimizeFor *FileOptions_OptimizeMode `protobuf:"varint,9,opt,name=optimize_for,json=optimizeFor,enum=google.protobuf.FileOptions_OptimizeMode,def=1" json:"optimize_for,omitempty"` + // Sets the Go package where structs generated from this .proto will be + // placed. If omitted, the Go package will be derived from the following: + // - The basename of the package import path, if provided. + // - Otherwise, the package statement in the .proto file, if present. + // - Otherwise, the basename of the .proto file, without extension. + GoPackage *string `protobuf:"bytes,11,opt,name=go_package,json=goPackage" json:"go_package,omitempty"` + // Should generic services be generated in each language? "Generic" services + // are not specific to any particular RPC system. They are generated by the + // main code generators in each language (without additional plugins). + // Generic services were the only kind of service generation supported by + // early versions of google.protobuf. + // + // Generic services are now considered deprecated in favor of using plugins + // that generate code specific to your particular RPC system. Therefore, + // these default to false. Old code which depends on generic services should + // explicitly set them to true. + CcGenericServices *bool `protobuf:"varint,16,opt,name=cc_generic_services,json=ccGenericServices,def=0" json:"cc_generic_services,omitempty"` + JavaGenericServices *bool `protobuf:"varint,17,opt,name=java_generic_services,json=javaGenericServices,def=0" json:"java_generic_services,omitempty"` + PyGenericServices *bool `protobuf:"varint,18,opt,name=py_generic_services,json=pyGenericServices,def=0" json:"py_generic_services,omitempty"` + // Is this file deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for everything in the file, or it will be completely ignored; in the very + // least, this is a formalization for deprecating files. + Deprecated *bool `protobuf:"varint,23,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // Enables the use of arenas for the proto messages in this file. This applies + // only to generated classes for C++. + CcEnableArenas *bool `protobuf:"varint,31,opt,name=cc_enable_arenas,json=ccEnableArenas,def=0" json:"cc_enable_arenas,omitempty"` + // Sets the objective c class prefix which is prepended to all objective c + // generated classes from this .proto. There is no default. + ObjcClassPrefix *string `protobuf:"bytes,36,opt,name=objc_class_prefix,json=objcClassPrefix" json:"objc_class_prefix,omitempty"` + // Namespace for generated classes; defaults to the package. + CsharpNamespace *string `protobuf:"bytes,37,opt,name=csharp_namespace,json=csharpNamespace" json:"csharp_namespace,omitempty"` + // By default Swift generators will take the proto package and CamelCase it + // replacing '.' with underscore and use that to prefix the types/symbols + // defined. When this options is provided, they will use this value instead + // to prefix the types/symbols defined. + SwiftPrefix *string `protobuf:"bytes,39,opt,name=swift_prefix,json=swiftPrefix" json:"swift_prefix,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FileOptions) Reset() { *m = FileOptions{} } +func (m *FileOptions) String() string { return proto.CompactTextString(m) } +func (*FileOptions) ProtoMessage() {} +func (*FileOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{9} } + +var extRange_FileOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*FileOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_FileOptions +} + +const Default_FileOptions_JavaMultipleFiles bool = false +const Default_FileOptions_JavaStringCheckUtf8 bool = false +const Default_FileOptions_OptimizeFor FileOptions_OptimizeMode = FileOptions_SPEED +const Default_FileOptions_CcGenericServices bool = false +const Default_FileOptions_JavaGenericServices bool = false +const Default_FileOptions_PyGenericServices bool = false +const Default_FileOptions_Deprecated bool = false +const Default_FileOptions_CcEnableArenas bool = false + +func (m *FileOptions) GetJavaPackage() string { + if m != nil && m.JavaPackage != nil { + return *m.JavaPackage + } + return "" +} + +func (m *FileOptions) GetJavaOuterClassname() string { + if m != nil && m.JavaOuterClassname != nil { + return *m.JavaOuterClassname + } + return "" +} + +func (m *FileOptions) GetJavaMultipleFiles() bool { + if m != nil && m.JavaMultipleFiles != nil { + return *m.JavaMultipleFiles + } + return Default_FileOptions_JavaMultipleFiles +} + +func (m *FileOptions) GetJavaGenerateEqualsAndHash() bool { + if m != nil && m.JavaGenerateEqualsAndHash != nil { + return *m.JavaGenerateEqualsAndHash + } + return false +} + +func (m *FileOptions) GetJavaStringCheckUtf8() bool { + if m != nil && m.JavaStringCheckUtf8 != nil { + return *m.JavaStringCheckUtf8 + } + return Default_FileOptions_JavaStringCheckUtf8 +} + +func (m *FileOptions) GetOptimizeFor() FileOptions_OptimizeMode { + if m != nil && m.OptimizeFor != nil { + return *m.OptimizeFor + } + return Default_FileOptions_OptimizeFor +} + +func (m *FileOptions) GetGoPackage() string { + if m != nil && m.GoPackage != nil { + return *m.GoPackage + } + return "" +} + +func (m *FileOptions) GetCcGenericServices() bool { + if m != nil && m.CcGenericServices != nil { + return *m.CcGenericServices + } + return Default_FileOptions_CcGenericServices +} + +func (m *FileOptions) GetJavaGenericServices() bool { + if m != nil && m.JavaGenericServices != nil { + return *m.JavaGenericServices + } + return Default_FileOptions_JavaGenericServices +} + +func (m *FileOptions) GetPyGenericServices() bool { + if m != nil && m.PyGenericServices != nil { + return *m.PyGenericServices + } + return Default_FileOptions_PyGenericServices +} + +func (m *FileOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_FileOptions_Deprecated +} + +func (m *FileOptions) GetCcEnableArenas() bool { + if m != nil && m.CcEnableArenas != nil { + return *m.CcEnableArenas + } + return Default_FileOptions_CcEnableArenas +} + +func (m *FileOptions) GetObjcClassPrefix() string { + if m != nil && m.ObjcClassPrefix != nil { + return *m.ObjcClassPrefix + } + return "" +} + +func (m *FileOptions) GetCsharpNamespace() string { + if m != nil && m.CsharpNamespace != nil { + return *m.CsharpNamespace + } + return "" +} + +func (m *FileOptions) GetSwiftPrefix() string { + if m != nil && m.SwiftPrefix != nil { + return *m.SwiftPrefix + } + return "" +} + +func (m *FileOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type MessageOptions struct { + // Set true to use the old proto1 MessageSet wire format for extensions. + // This is provided for backwards-compatibility with the MessageSet wire + // format. You should not use this for any other reason: It's less + // efficient, has fewer features, and is more complicated. + // + // The message must be defined exactly as follows: + // message Foo { + // option message_set_wire_format = true; + // extensions 4 to max; + // } + // Note that the message cannot have any defined fields; MessageSets only + // have extensions. + // + // All extensions of your type must be singular messages; e.g. they cannot + // be int32s, enums, or repeated messages. + // + // Because this is an option, the above two restrictions are not enforced by + // the protocol compiler. + MessageSetWireFormat *bool `protobuf:"varint,1,opt,name=message_set_wire_format,json=messageSetWireFormat,def=0" json:"message_set_wire_format,omitempty"` + // Disables the generation of the standard "descriptor()" accessor, which can + // conflict with a field of the same name. This is meant to make migration + // from proto1 easier; new code should avoid fields named "descriptor". + NoStandardDescriptorAccessor *bool `protobuf:"varint,2,opt,name=no_standard_descriptor_accessor,json=noStandardDescriptorAccessor,def=0" json:"no_standard_descriptor_accessor,omitempty"` + // Is this message deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the message, or it will be completely ignored; in the very least, + // this is a formalization for deprecating messages. + Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // Whether the message is an automatically generated map entry type for the + // maps field. + // + // For maps fields: + // map map_field = 1; + // The parsed descriptor looks like: + // message MapFieldEntry { + // option map_entry = true; + // optional KeyType key = 1; + // optional ValueType value = 2; + // } + // repeated MapFieldEntry map_field = 1; + // + // Implementations may choose not to generate the map_entry=true message, but + // use a native map in the target language to hold the keys and values. + // The reflection APIs in such implementions still need to work as + // if the field is a repeated message field. + // + // NOTE: Do not set the option in .proto files. Always use the maps syntax + // instead. The option should only be implicitly set by the proto compiler + // parser. + MapEntry *bool `protobuf:"varint,7,opt,name=map_entry,json=mapEntry" json:"map_entry,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MessageOptions) Reset() { *m = MessageOptions{} } +func (m *MessageOptions) String() string { return proto.CompactTextString(m) } +func (*MessageOptions) ProtoMessage() {} +func (*MessageOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{10} } + +var extRange_MessageOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*MessageOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MessageOptions +} + +const Default_MessageOptions_MessageSetWireFormat bool = false +const Default_MessageOptions_NoStandardDescriptorAccessor bool = false +const Default_MessageOptions_Deprecated bool = false + +func (m *MessageOptions) GetMessageSetWireFormat() bool { + if m != nil && m.MessageSetWireFormat != nil { + return *m.MessageSetWireFormat + } + return Default_MessageOptions_MessageSetWireFormat +} + +func (m *MessageOptions) GetNoStandardDescriptorAccessor() bool { + if m != nil && m.NoStandardDescriptorAccessor != nil { + return *m.NoStandardDescriptorAccessor + } + return Default_MessageOptions_NoStandardDescriptorAccessor +} + +func (m *MessageOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_MessageOptions_Deprecated +} + +func (m *MessageOptions) GetMapEntry() bool { + if m != nil && m.MapEntry != nil { + return *m.MapEntry + } + return false +} + +func (m *MessageOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type FieldOptions struct { + // The ctype option instructs the C++ code generator to use a different + // representation of the field than it normally would. See the specific + // options below. This option is not yet implemented in the open source + // release -- sorry, we'll try to include it in a future version! + Ctype *FieldOptions_CType `protobuf:"varint,1,opt,name=ctype,enum=google.protobuf.FieldOptions_CType,def=0" json:"ctype,omitempty"` + // The packed option can be enabled for repeated primitive fields to enable + // a more efficient representation on the wire. Rather than repeatedly + // writing the tag and type for each element, the entire array is encoded as + // a single length-delimited blob. In proto3, only explicit setting it to + // false will avoid using packed encoding. + Packed *bool `protobuf:"varint,2,opt,name=packed" json:"packed,omitempty"` + // The jstype option determines the JavaScript type used for values of the + // field. The option is permitted only for 64 bit integral and fixed types + // (int64, uint64, sint64, fixed64, sfixed64). By default these types are + // represented as JavaScript strings. This avoids loss of precision that can + // happen when a large value is converted to a floating point JavaScript + // numbers. Specifying JS_NUMBER for the jstype causes the generated + // JavaScript code to use the JavaScript "number" type instead of strings. + // This option is an enum to permit additional types to be added, + // e.g. goog.math.Integer. + Jstype *FieldOptions_JSType `protobuf:"varint,6,opt,name=jstype,enum=google.protobuf.FieldOptions_JSType,def=0" json:"jstype,omitempty"` + // Should this field be parsed lazily? Lazy applies only to message-type + // fields. It means that when the outer message is initially parsed, the + // inner message's contents will not be parsed but instead stored in encoded + // form. The inner message will actually be parsed when it is first accessed. + // + // This is only a hint. Implementations are free to choose whether to use + // eager or lazy parsing regardless of the value of this option. However, + // setting this option true suggests that the protocol author believes that + // using lazy parsing on this field is worth the additional bookkeeping + // overhead typically needed to implement it. + // + // This option does not affect the public interface of any generated code; + // all method signatures remain the same. Furthermore, thread-safety of the + // interface is not affected by this option; const methods remain safe to + // call from multiple threads concurrently, while non-const methods continue + // to require exclusive access. + // + // + // Note that implementations may choose not to check required fields within + // a lazy sub-message. That is, calling IsInitialized() on the outer message + // may return true even if the inner message has missing required fields. + // This is necessary because otherwise the inner message would have to be + // parsed in order to perform the check, defeating the purpose of lazy + // parsing. An implementation which chooses not to check required fields + // must be consistent about it. That is, for any particular sub-message, the + // implementation must either *always* check its required fields, or *never* + // check its required fields, regardless of whether or not the message has + // been parsed. + Lazy *bool `protobuf:"varint,5,opt,name=lazy,def=0" json:"lazy,omitempty"` + // Is this field deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for accessors, or it will be completely ignored; in the very least, this + // is a formalization for deprecating fields. + Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // For Google-internal migration only. Do not use. + Weak *bool `protobuf:"varint,10,opt,name=weak,def=0" json:"weak,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *FieldOptions) Reset() { *m = FieldOptions{} } +func (m *FieldOptions) String() string { return proto.CompactTextString(m) } +func (*FieldOptions) ProtoMessage() {} +func (*FieldOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{11} } + +var extRange_FieldOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*FieldOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_FieldOptions +} + +const Default_FieldOptions_Ctype FieldOptions_CType = FieldOptions_STRING +const Default_FieldOptions_Jstype FieldOptions_JSType = FieldOptions_JS_NORMAL +const Default_FieldOptions_Lazy bool = false +const Default_FieldOptions_Deprecated bool = false +const Default_FieldOptions_Weak bool = false + +func (m *FieldOptions) GetCtype() FieldOptions_CType { + if m != nil && m.Ctype != nil { + return *m.Ctype + } + return Default_FieldOptions_Ctype +} + +func (m *FieldOptions) GetPacked() bool { + if m != nil && m.Packed != nil { + return *m.Packed + } + return false +} + +func (m *FieldOptions) GetJstype() FieldOptions_JSType { + if m != nil && m.Jstype != nil { + return *m.Jstype + } + return Default_FieldOptions_Jstype +} + +func (m *FieldOptions) GetLazy() bool { + if m != nil && m.Lazy != nil { + return *m.Lazy + } + return Default_FieldOptions_Lazy +} + +func (m *FieldOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_FieldOptions_Deprecated +} + +func (m *FieldOptions) GetWeak() bool { + if m != nil && m.Weak != nil { + return *m.Weak + } + return Default_FieldOptions_Weak +} + +func (m *FieldOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type OneofOptions struct { + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *OneofOptions) Reset() { *m = OneofOptions{} } +func (m *OneofOptions) String() string { return proto.CompactTextString(m) } +func (*OneofOptions) ProtoMessage() {} +func (*OneofOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{12} } + +var extRange_OneofOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*OneofOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_OneofOptions +} + +func (m *OneofOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type EnumOptions struct { + // Set this option to true to allow mapping different tag names to the same + // value. + AllowAlias *bool `protobuf:"varint,2,opt,name=allow_alias,json=allowAlias" json:"allow_alias,omitempty"` + // Is this enum deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the enum, or it will be completely ignored; in the very least, this + // is a formalization for deprecating enums. + Deprecated *bool `protobuf:"varint,3,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *EnumOptions) Reset() { *m = EnumOptions{} } +func (m *EnumOptions) String() string { return proto.CompactTextString(m) } +func (*EnumOptions) ProtoMessage() {} +func (*EnumOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{13} } + +var extRange_EnumOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*EnumOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_EnumOptions +} + +const Default_EnumOptions_Deprecated bool = false + +func (m *EnumOptions) GetAllowAlias() bool { + if m != nil && m.AllowAlias != nil { + return *m.AllowAlias + } + return false +} + +func (m *EnumOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_EnumOptions_Deprecated +} + +func (m *EnumOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type EnumValueOptions struct { + // Is this enum value deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the enum value, or it will be completely ignored; in the very least, + // this is a formalization for deprecating enum values. + Deprecated *bool `protobuf:"varint,1,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *EnumValueOptions) Reset() { *m = EnumValueOptions{} } +func (m *EnumValueOptions) String() string { return proto.CompactTextString(m) } +func (*EnumValueOptions) ProtoMessage() {} +func (*EnumValueOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{14} } + +var extRange_EnumValueOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*EnumValueOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_EnumValueOptions +} + +const Default_EnumValueOptions_Deprecated bool = false + +func (m *EnumValueOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_EnumValueOptions_Deprecated +} + +func (m *EnumValueOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type ServiceOptions struct { + // Is this service deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the service, or it will be completely ignored; in the very least, + // this is a formalization for deprecating services. + Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *ServiceOptions) Reset() { *m = ServiceOptions{} } +func (m *ServiceOptions) String() string { return proto.CompactTextString(m) } +func (*ServiceOptions) ProtoMessage() {} +func (*ServiceOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{15} } + +var extRange_ServiceOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*ServiceOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_ServiceOptions +} + +const Default_ServiceOptions_Deprecated bool = false + +func (m *ServiceOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_ServiceOptions_Deprecated +} + +func (m *ServiceOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +type MethodOptions struct { + // Is this method deprecated? + // Depending on the target platform, this can emit Deprecated annotations + // for the method, or it will be completely ignored; in the very least, + // this is a formalization for deprecating methods. + Deprecated *bool `protobuf:"varint,33,opt,name=deprecated,def=0" json:"deprecated,omitempty"` + IdempotencyLevel *MethodOptions_IdempotencyLevel `protobuf:"varint,34,opt,name=idempotency_level,json=idempotencyLevel,enum=google.protobuf.MethodOptions_IdempotencyLevel,def=0" json:"idempotency_level,omitempty"` + // The parser stores options it doesn't recognize here. See above. + UninterpretedOption []*UninterpretedOption `protobuf:"bytes,999,rep,name=uninterpreted_option,json=uninterpretedOption" json:"uninterpreted_option,omitempty"` + proto.XXX_InternalExtensions `json:"-"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *MethodOptions) Reset() { *m = MethodOptions{} } +func (m *MethodOptions) String() string { return proto.CompactTextString(m) } +func (*MethodOptions) ProtoMessage() {} +func (*MethodOptions) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{16} } + +var extRange_MethodOptions = []proto.ExtensionRange{ + {Start: 1000, End: 536870911}, +} + +func (*MethodOptions) ExtensionRangeArray() []proto.ExtensionRange { + return extRange_MethodOptions +} + +const Default_MethodOptions_Deprecated bool = false +const Default_MethodOptions_IdempotencyLevel MethodOptions_IdempotencyLevel = MethodOptions_IDEMPOTENCY_UNKNOWN + +func (m *MethodOptions) GetDeprecated() bool { + if m != nil && m.Deprecated != nil { + return *m.Deprecated + } + return Default_MethodOptions_Deprecated +} + +func (m *MethodOptions) GetIdempotencyLevel() MethodOptions_IdempotencyLevel { + if m != nil && m.IdempotencyLevel != nil { + return *m.IdempotencyLevel + } + return Default_MethodOptions_IdempotencyLevel +} + +func (m *MethodOptions) GetUninterpretedOption() []*UninterpretedOption { + if m != nil { + return m.UninterpretedOption + } + return nil +} + +// A message representing a option the parser does not recognize. This only +// appears in options protos created by the compiler::Parser class. +// DescriptorPool resolves these when building Descriptor objects. Therefore, +// options protos in descriptor objects (e.g. returned by Descriptor::options(), +// or produced by Descriptor::CopyTo()) will never have UninterpretedOptions +// in them. +type UninterpretedOption struct { + Name []*UninterpretedOption_NamePart `protobuf:"bytes,2,rep,name=name" json:"name,omitempty"` + // The value of the uninterpreted option, in whatever type the tokenizer + // identified it as during parsing. Exactly one of these should be set. + IdentifierValue *string `protobuf:"bytes,3,opt,name=identifier_value,json=identifierValue" json:"identifier_value,omitempty"` + PositiveIntValue *uint64 `protobuf:"varint,4,opt,name=positive_int_value,json=positiveIntValue" json:"positive_int_value,omitempty"` + NegativeIntValue *int64 `protobuf:"varint,5,opt,name=negative_int_value,json=negativeIntValue" json:"negative_int_value,omitempty"` + DoubleValue *float64 `protobuf:"fixed64,6,opt,name=double_value,json=doubleValue" json:"double_value,omitempty"` + StringValue []byte `protobuf:"bytes,7,opt,name=string_value,json=stringValue" json:"string_value,omitempty"` + AggregateValue *string `protobuf:"bytes,8,opt,name=aggregate_value,json=aggregateValue" json:"aggregate_value,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UninterpretedOption) Reset() { *m = UninterpretedOption{} } +func (m *UninterpretedOption) String() string { return proto.CompactTextString(m) } +func (*UninterpretedOption) ProtoMessage() {} +func (*UninterpretedOption) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{17} } + +func (m *UninterpretedOption) GetName() []*UninterpretedOption_NamePart { + if m != nil { + return m.Name + } + return nil +} + +func (m *UninterpretedOption) GetIdentifierValue() string { + if m != nil && m.IdentifierValue != nil { + return *m.IdentifierValue + } + return "" +} + +func (m *UninterpretedOption) GetPositiveIntValue() uint64 { + if m != nil && m.PositiveIntValue != nil { + return *m.PositiveIntValue + } + return 0 +} + +func (m *UninterpretedOption) GetNegativeIntValue() int64 { + if m != nil && m.NegativeIntValue != nil { + return *m.NegativeIntValue + } + return 0 +} + +func (m *UninterpretedOption) GetDoubleValue() float64 { + if m != nil && m.DoubleValue != nil { + return *m.DoubleValue + } + return 0 +} + +func (m *UninterpretedOption) GetStringValue() []byte { + if m != nil { + return m.StringValue + } + return nil +} + +func (m *UninterpretedOption) GetAggregateValue() string { + if m != nil && m.AggregateValue != nil { + return *m.AggregateValue + } + return "" +} + +// The name of the uninterpreted option. Each string represents a segment in +// a dot-separated name. is_extension is true iff a segment represents an +// extension (denoted with parentheses in options specs in .proto files). +// E.g.,{ ["foo", false], ["bar.baz", true], ["qux", false] } represents +// "foo.(bar.baz).qux". +type UninterpretedOption_NamePart struct { + NamePart *string `protobuf:"bytes,1,req,name=name_part,json=namePart" json:"name_part,omitempty"` + IsExtension *bool `protobuf:"varint,2,req,name=is_extension,json=isExtension" json:"is_extension,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *UninterpretedOption_NamePart) Reset() { *m = UninterpretedOption_NamePart{} } +func (m *UninterpretedOption_NamePart) String() string { return proto.CompactTextString(m) } +func (*UninterpretedOption_NamePart) ProtoMessage() {} +func (*UninterpretedOption_NamePart) Descriptor() ([]byte, []int) { + return fileDescriptorDescriptor, []int{17, 0} +} + +func (m *UninterpretedOption_NamePart) GetNamePart() string { + if m != nil && m.NamePart != nil { + return *m.NamePart + } + return "" +} + +func (m *UninterpretedOption_NamePart) GetIsExtension() bool { + if m != nil && m.IsExtension != nil { + return *m.IsExtension + } + return false +} + +// Encapsulates information about the original source file from which a +// FileDescriptorProto was generated. +type SourceCodeInfo struct { + // A Location identifies a piece of source code in a .proto file which + // corresponds to a particular definition. This information is intended + // to be useful to IDEs, code indexers, documentation generators, and similar + // tools. + // + // For example, say we have a file like: + // message Foo { + // optional string foo = 1; + // } + // Let's look at just the field definition: + // optional string foo = 1; + // ^ ^^ ^^ ^ ^^^ + // a bc de f ghi + // We have the following locations: + // span path represents + // [a,i) [ 4, 0, 2, 0 ] The whole field definition. + // [a,b) [ 4, 0, 2, 0, 4 ] The label (optional). + // [c,d) [ 4, 0, 2, 0, 5 ] The type (string). + // [e,f) [ 4, 0, 2, 0, 1 ] The name (foo). + // [g,h) [ 4, 0, 2, 0, 3 ] The number (1). + // + // Notes: + // - A location may refer to a repeated field itself (i.e. not to any + // particular index within it). This is used whenever a set of elements are + // logically enclosed in a single code segment. For example, an entire + // extend block (possibly containing multiple extension definitions) will + // have an outer location whose path refers to the "extensions" repeated + // field without an index. + // - Multiple locations may have the same path. This happens when a single + // logical declaration is spread out across multiple places. The most + // obvious example is the "extend" block again -- there may be multiple + // extend blocks in the same scope, each of which will have the same path. + // - A location's span is not always a subset of its parent's span. For + // example, the "extendee" of an extension declaration appears at the + // beginning of the "extend" block and is shared by all extensions within + // the block. + // - Just because a location's span is a subset of some other location's span + // does not mean that it is a descendent. For example, a "group" defines + // both a type and a field in a single declaration. Thus, the locations + // corresponding to the type and field and their components will overlap. + // - Code which tries to interpret locations should probably be designed to + // ignore those that it doesn't understand, as more types of locations could + // be recorded in the future. + Location []*SourceCodeInfo_Location `protobuf:"bytes,1,rep,name=location" json:"location,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SourceCodeInfo) Reset() { *m = SourceCodeInfo{} } +func (m *SourceCodeInfo) String() string { return proto.CompactTextString(m) } +func (*SourceCodeInfo) ProtoMessage() {} +func (*SourceCodeInfo) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{18} } + +func (m *SourceCodeInfo) GetLocation() []*SourceCodeInfo_Location { + if m != nil { + return m.Location + } + return nil +} + +type SourceCodeInfo_Location struct { + // Identifies which part of the FileDescriptorProto was defined at this + // location. + // + // Each element is a field number or an index. They form a path from + // the root FileDescriptorProto to the place where the definition. For + // example, this path: + // [ 4, 3, 2, 7, 1 ] + // refers to: + // file.message_type(3) // 4, 3 + // .field(7) // 2, 7 + // .name() // 1 + // This is because FileDescriptorProto.message_type has field number 4: + // repeated DescriptorProto message_type = 4; + // and DescriptorProto.field has field number 2: + // repeated FieldDescriptorProto field = 2; + // and FieldDescriptorProto.name has field number 1: + // optional string name = 1; + // + // Thus, the above path gives the location of a field name. If we removed + // the last element: + // [ 4, 3, 2, 7 ] + // this path refers to the whole field declaration (from the beginning + // of the label to the terminating semicolon). + Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"` + // Always has exactly three or four elements: start line, start column, + // end line (optional, otherwise assumed same as start line), end column. + // These are packed into a single field for efficiency. Note that line + // and column numbers are zero-based -- typically you will want to add + // 1 to each before displaying to a user. + Span []int32 `protobuf:"varint,2,rep,packed,name=span" json:"span,omitempty"` + // If this SourceCodeInfo represents a complete declaration, these are any + // comments appearing before and after the declaration which appear to be + // attached to the declaration. + // + // A series of line comments appearing on consecutive lines, with no other + // tokens appearing on those lines, will be treated as a single comment. + // + // leading_detached_comments will keep paragraphs of comments that appear + // before (but not connected to) the current element. Each paragraph, + // separated by empty lines, will be one comment element in the repeated + // field. + // + // Only the comment content is provided; comment markers (e.g. //) are + // stripped out. For block comments, leading whitespace and an asterisk + // will be stripped from the beginning of each line other than the first. + // Newlines are included in the output. + // + // Examples: + // + // optional int32 foo = 1; // Comment attached to foo. + // // Comment attached to bar. + // optional int32 bar = 2; + // + // optional string baz = 3; + // // Comment attached to baz. + // // Another line attached to baz. + // + // // Comment attached to qux. + // // + // // Another line attached to qux. + // optional double qux = 4; + // + // // Detached comment for corge. This is not leading or trailing comments + // // to qux or corge because there are blank lines separating it from + // // both. + // + // // Detached comment for corge paragraph 2. + // + // optional string corge = 5; + // /* Block comment attached + // * to corge. Leading asterisks + // * will be removed. */ + // /* Block comment attached to + // * grault. */ + // optional int32 grault = 6; + // + // // ignored detached comments. + LeadingComments *string `protobuf:"bytes,3,opt,name=leading_comments,json=leadingComments" json:"leading_comments,omitempty"` + TrailingComments *string `protobuf:"bytes,4,opt,name=trailing_comments,json=trailingComments" json:"trailing_comments,omitempty"` + LeadingDetachedComments []string `protobuf:"bytes,6,rep,name=leading_detached_comments,json=leadingDetachedComments" json:"leading_detached_comments,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *SourceCodeInfo_Location) Reset() { *m = SourceCodeInfo_Location{} } +func (m *SourceCodeInfo_Location) String() string { return proto.CompactTextString(m) } +func (*SourceCodeInfo_Location) ProtoMessage() {} +func (*SourceCodeInfo_Location) Descriptor() ([]byte, []int) { + return fileDescriptorDescriptor, []int{18, 0} +} + +func (m *SourceCodeInfo_Location) GetPath() []int32 { + if m != nil { + return m.Path + } + return nil +} + +func (m *SourceCodeInfo_Location) GetSpan() []int32 { + if m != nil { + return m.Span + } + return nil +} + +func (m *SourceCodeInfo_Location) GetLeadingComments() string { + if m != nil && m.LeadingComments != nil { + return *m.LeadingComments + } + return "" +} + +func (m *SourceCodeInfo_Location) GetTrailingComments() string { + if m != nil && m.TrailingComments != nil { + return *m.TrailingComments + } + return "" +} + +func (m *SourceCodeInfo_Location) GetLeadingDetachedComments() []string { + if m != nil { + return m.LeadingDetachedComments + } + return nil +} + +// Describes the relationship between generated code and its original source +// file. A GeneratedCodeInfo message is associated with only one generated +// source file, but may contain references to different source .proto files. +type GeneratedCodeInfo struct { + // An Annotation connects some span of text in generated code to an element + // of its generating .proto file. + Annotation []*GeneratedCodeInfo_Annotation `protobuf:"bytes,1,rep,name=annotation" json:"annotation,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GeneratedCodeInfo) Reset() { *m = GeneratedCodeInfo{} } +func (m *GeneratedCodeInfo) String() string { return proto.CompactTextString(m) } +func (*GeneratedCodeInfo) ProtoMessage() {} +func (*GeneratedCodeInfo) Descriptor() ([]byte, []int) { return fileDescriptorDescriptor, []int{19} } + +func (m *GeneratedCodeInfo) GetAnnotation() []*GeneratedCodeInfo_Annotation { + if m != nil { + return m.Annotation + } + return nil +} + +type GeneratedCodeInfo_Annotation struct { + // Identifies the element in the original source .proto file. This field + // is formatted the same as SourceCodeInfo.Location.path. + Path []int32 `protobuf:"varint,1,rep,packed,name=path" json:"path,omitempty"` + // Identifies the filesystem path to the original source .proto. + SourceFile *string `protobuf:"bytes,2,opt,name=source_file,json=sourceFile" json:"source_file,omitempty"` + // Identifies the starting offset in bytes in the generated code + // that relates to the identified object. + Begin *int32 `protobuf:"varint,3,opt,name=begin" json:"begin,omitempty"` + // Identifies the ending offset in bytes in the generated code that + // relates to the identified offset. The end offset should be one past + // the last relevant byte (so the length of the text = end - begin). + End *int32 `protobuf:"varint,4,opt,name=end" json:"end,omitempty"` + XXX_unrecognized []byte `json:"-"` +} + +func (m *GeneratedCodeInfo_Annotation) Reset() { *m = GeneratedCodeInfo_Annotation{} } +func (m *GeneratedCodeInfo_Annotation) String() string { return proto.CompactTextString(m) } +func (*GeneratedCodeInfo_Annotation) ProtoMessage() {} +func (*GeneratedCodeInfo_Annotation) Descriptor() ([]byte, []int) { + return fileDescriptorDescriptor, []int{19, 0} +} + +func (m *GeneratedCodeInfo_Annotation) GetPath() []int32 { + if m != nil { + return m.Path + } + return nil +} + +func (m *GeneratedCodeInfo_Annotation) GetSourceFile() string { + if m != nil && m.SourceFile != nil { + return *m.SourceFile + } + return "" +} + +func (m *GeneratedCodeInfo_Annotation) GetBegin() int32 { + if m != nil && m.Begin != nil { + return *m.Begin + } + return 0 +} + +func (m *GeneratedCodeInfo_Annotation) GetEnd() int32 { + if m != nil && m.End != nil { + return *m.End + } + return 0 +} + +func init() { + proto.RegisterType((*FileDescriptorSet)(nil), "google.protobuf.FileDescriptorSet") + proto.RegisterType((*FileDescriptorProto)(nil), "google.protobuf.FileDescriptorProto") + proto.RegisterType((*DescriptorProto)(nil), "google.protobuf.DescriptorProto") + proto.RegisterType((*DescriptorProto_ExtensionRange)(nil), "google.protobuf.DescriptorProto.ExtensionRange") + proto.RegisterType((*DescriptorProto_ReservedRange)(nil), "google.protobuf.DescriptorProto.ReservedRange") + proto.RegisterType((*FieldDescriptorProto)(nil), "google.protobuf.FieldDescriptorProto") + proto.RegisterType((*OneofDescriptorProto)(nil), "google.protobuf.OneofDescriptorProto") + proto.RegisterType((*EnumDescriptorProto)(nil), "google.protobuf.EnumDescriptorProto") + proto.RegisterType((*EnumValueDescriptorProto)(nil), "google.protobuf.EnumValueDescriptorProto") + proto.RegisterType((*ServiceDescriptorProto)(nil), "google.protobuf.ServiceDescriptorProto") + proto.RegisterType((*MethodDescriptorProto)(nil), "google.protobuf.MethodDescriptorProto") + proto.RegisterType((*FileOptions)(nil), "google.protobuf.FileOptions") + proto.RegisterType((*MessageOptions)(nil), "google.protobuf.MessageOptions") + proto.RegisterType((*FieldOptions)(nil), "google.protobuf.FieldOptions") + proto.RegisterType((*OneofOptions)(nil), "google.protobuf.OneofOptions") + proto.RegisterType((*EnumOptions)(nil), "google.protobuf.EnumOptions") + proto.RegisterType((*EnumValueOptions)(nil), "google.protobuf.EnumValueOptions") + proto.RegisterType((*ServiceOptions)(nil), "google.protobuf.ServiceOptions") + proto.RegisterType((*MethodOptions)(nil), "google.protobuf.MethodOptions") + proto.RegisterType((*UninterpretedOption)(nil), "google.protobuf.UninterpretedOption") + proto.RegisterType((*UninterpretedOption_NamePart)(nil), "google.protobuf.UninterpretedOption.NamePart") + proto.RegisterType((*SourceCodeInfo)(nil), "google.protobuf.SourceCodeInfo") + proto.RegisterType((*SourceCodeInfo_Location)(nil), "google.protobuf.SourceCodeInfo.Location") + proto.RegisterType((*GeneratedCodeInfo)(nil), "google.protobuf.GeneratedCodeInfo") + proto.RegisterType((*GeneratedCodeInfo_Annotation)(nil), "google.protobuf.GeneratedCodeInfo.Annotation") + proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Type", FieldDescriptorProto_Type_name, FieldDescriptorProto_Type_value) + proto.RegisterEnum("google.protobuf.FieldDescriptorProto_Label", FieldDescriptorProto_Label_name, FieldDescriptorProto_Label_value) + proto.RegisterEnum("google.protobuf.FileOptions_OptimizeMode", FileOptions_OptimizeMode_name, FileOptions_OptimizeMode_value) + proto.RegisterEnum("google.protobuf.FieldOptions_CType", FieldOptions_CType_name, FieldOptions_CType_value) + proto.RegisterEnum("google.protobuf.FieldOptions_JSType", FieldOptions_JSType_name, FieldOptions_JSType_value) + proto.RegisterEnum("google.protobuf.MethodOptions_IdempotencyLevel", MethodOptions_IdempotencyLevel_name, MethodOptions_IdempotencyLevel_value) +} + +func init() { proto.RegisterFile("descriptor.proto", fileDescriptorDescriptor) } + +var fileDescriptorDescriptor = []byte{ + // 2379 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x59, 0xcd, 0x73, 0xdb, 0xc6, + 0x15, 0x37, 0xc1, 0x0f, 0x91, 0x8f, 0x14, 0xb5, 0x5a, 0x29, 0x36, 0x2c, 0xc7, 0xb1, 0xcc, 0xd8, + 0xb5, 0x6c, 0xb7, 0x74, 0x46, 0xfe, 0x88, 0xa3, 0x74, 0xd2, 0xa1, 0x48, 0x58, 0xa1, 0x4b, 0x91, + 0x2c, 0x48, 0x35, 0x76, 0x2e, 0x98, 0x15, 0xb0, 0xa4, 0x60, 0x83, 0x00, 0x02, 0x80, 0xb6, 0x95, + 0x93, 0x67, 0x7a, 0xea, 0x7f, 0xd0, 0xe9, 0x74, 0x7a, 0xc8, 0x25, 0x33, 0xed, 0xbd, 0x87, 0xde, + 0x7b, 0xed, 0x4c, 0xef, 0x3d, 0xf4, 0xd0, 0x99, 0xf6, 0x3f, 0xe8, 0xb5, 0xb3, 0xbb, 0x00, 0x08, + 0x7e, 0xd9, 0x4a, 0x66, 0x9c, 0x9c, 0xa4, 0xfd, 0xbd, 0xdf, 0x7b, 0x78, 0xfb, 0xf6, 0x87, 0xdd, + 0x87, 0x25, 0x20, 0x83, 0xfa, 0xba, 0x67, 0xba, 0x81, 0xe3, 0x55, 0x5d, 0xcf, 0x09, 0x1c, 0xbc, + 0x36, 0x74, 0x9c, 0xa1, 0x45, 0xc5, 0xe8, 0x78, 0x3c, 0xa8, 0x1c, 0xc2, 0xfa, 0x23, 0xd3, 0xa2, + 0x8d, 0x98, 0xd8, 0xa3, 0x01, 0x7e, 0x08, 0x99, 0x81, 0x69, 0x51, 0x39, 0xb5, 0x9d, 0xde, 0x29, + 0xee, 0x5e, 0xab, 0xce, 0x38, 0x55, 0xa7, 0x3d, 0xba, 0x0c, 0x56, 0xb9, 0x47, 0xe5, 0xdf, 0x19, + 0xd8, 0x58, 0x60, 0xc5, 0x18, 0x32, 0x36, 0x19, 0xb1, 0x88, 0xa9, 0x9d, 0x82, 0xca, 0xff, 0xc7, + 0x32, 0xac, 0xb8, 0x44, 0x7f, 0x4e, 0x86, 0x54, 0x96, 0x38, 0x1c, 0x0d, 0xf1, 0x07, 0x00, 0x06, + 0x75, 0xa9, 0x6d, 0x50, 0x5b, 0x3f, 0x95, 0xd3, 0xdb, 0xe9, 0x9d, 0x82, 0x9a, 0x40, 0xf0, 0x6d, + 0x58, 0x77, 0xc7, 0xc7, 0x96, 0xa9, 0x6b, 0x09, 0x1a, 0x6c, 0xa7, 0x77, 0xb2, 0x2a, 0x12, 0x86, + 0xc6, 0x84, 0x7c, 0x03, 0xd6, 0x5e, 0x52, 0xf2, 0x3c, 0x49, 0x2d, 0x72, 0x6a, 0x99, 0xc1, 0x09, + 0x62, 0x1d, 0x4a, 0x23, 0xea, 0xfb, 0x64, 0x48, 0xb5, 0xe0, 0xd4, 0xa5, 0x72, 0x86, 0xcf, 0x7e, + 0x7b, 0x6e, 0xf6, 0xb3, 0x33, 0x2f, 0x86, 0x5e, 0xfd, 0x53, 0x97, 0xe2, 0x1a, 0x14, 0xa8, 0x3d, + 0x1e, 0x89, 0x08, 0xd9, 0x25, 0xf5, 0x53, 0xec, 0xf1, 0x68, 0x36, 0x4a, 0x9e, 0xb9, 0x85, 0x21, + 0x56, 0x7c, 0xea, 0xbd, 0x30, 0x75, 0x2a, 0xe7, 0x78, 0x80, 0x1b, 0x73, 0x01, 0x7a, 0xc2, 0x3e, + 0x1b, 0x23, 0xf2, 0xc3, 0x75, 0x28, 0xd0, 0x57, 0x01, 0xb5, 0x7d, 0xd3, 0xb1, 0xe5, 0x15, 0x1e, + 0xe4, 0xfa, 0x82, 0x55, 0xa4, 0x96, 0x31, 0x1b, 0x62, 0xe2, 0x87, 0x1f, 0xc0, 0x8a, 0xe3, 0x06, + 0xa6, 0x63, 0xfb, 0x72, 0x7e, 0x3b, 0xb5, 0x53, 0xdc, 0x7d, 0x7f, 0xa1, 0x10, 0x3a, 0x82, 0xa3, + 0x46, 0x64, 0xdc, 0x04, 0xe4, 0x3b, 0x63, 0x4f, 0xa7, 0x9a, 0xee, 0x18, 0x54, 0x33, 0xed, 0x81, + 0x23, 0x17, 0x78, 0x80, 0x2b, 0xf3, 0x13, 0xe1, 0xc4, 0xba, 0x63, 0xd0, 0xa6, 0x3d, 0x70, 0xd4, + 0xb2, 0x3f, 0x35, 0xc6, 0xe7, 0x21, 0xe7, 0x9f, 0xda, 0x01, 0x79, 0x25, 0x97, 0xb8, 0x42, 0xc2, + 0x51, 0xe5, 0x7f, 0x59, 0x58, 0x3b, 0x8b, 0xc4, 0x3e, 0x85, 0xec, 0x80, 0xcd, 0x52, 0x96, 0xbe, + 0x4b, 0x0d, 0x84, 0xcf, 0x74, 0x11, 0x73, 0xdf, 0xb3, 0x88, 0x35, 0x28, 0xda, 0xd4, 0x0f, 0xa8, + 0x21, 0x14, 0x91, 0x3e, 0xa3, 0xa6, 0x40, 0x38, 0xcd, 0x4b, 0x2a, 0xf3, 0xbd, 0x24, 0xf5, 0x04, + 0xd6, 0xe2, 0x94, 0x34, 0x8f, 0xd8, 0xc3, 0x48, 0x9b, 0x77, 0xde, 0x96, 0x49, 0x55, 0x89, 0xfc, + 0x54, 0xe6, 0xa6, 0x96, 0xe9, 0xd4, 0x18, 0x37, 0x00, 0x1c, 0x9b, 0x3a, 0x03, 0xcd, 0xa0, 0xba, + 0x25, 0xe7, 0x97, 0x54, 0xa9, 0xc3, 0x28, 0x73, 0x55, 0x72, 0x04, 0xaa, 0x5b, 0xf8, 0x93, 0x89, + 0xd4, 0x56, 0x96, 0x28, 0xe5, 0x50, 0xbc, 0x64, 0x73, 0x6a, 0x3b, 0x82, 0xb2, 0x47, 0x99, 0xee, + 0xa9, 0x11, 0xce, 0xac, 0xc0, 0x93, 0xa8, 0xbe, 0x75, 0x66, 0x6a, 0xe8, 0x26, 0x26, 0xb6, 0xea, + 0x25, 0x87, 0xf8, 0x43, 0x88, 0x01, 0x8d, 0xcb, 0x0a, 0xf8, 0x2e, 0x54, 0x8a, 0xc0, 0x36, 0x19, + 0xd1, 0xad, 0x87, 0x50, 0x9e, 0x2e, 0x0f, 0xde, 0x84, 0xac, 0x1f, 0x10, 0x2f, 0xe0, 0x2a, 0xcc, + 0xaa, 0x62, 0x80, 0x11, 0xa4, 0xa9, 0x6d, 0xf0, 0x5d, 0x2e, 0xab, 0xb2, 0x7f, 0xb7, 0x3e, 0x86, + 0xd5, 0xa9, 0xc7, 0x9f, 0xd5, 0xb1, 0xf2, 0xbb, 0x1c, 0x6c, 0x2e, 0xd2, 0xdc, 0x42, 0xf9, 0x9f, + 0x87, 0x9c, 0x3d, 0x1e, 0x1d, 0x53, 0x4f, 0x4e, 0xf3, 0x08, 0xe1, 0x08, 0xd7, 0x20, 0x6b, 0x91, + 0x63, 0x6a, 0xc9, 0x99, 0xed, 0xd4, 0x4e, 0x79, 0xf7, 0xf6, 0x99, 0x54, 0x5d, 0x6d, 0x31, 0x17, + 0x55, 0x78, 0xe2, 0xcf, 0x20, 0x13, 0x6e, 0x71, 0x2c, 0xc2, 0xad, 0xb3, 0x45, 0x60, 0x5a, 0x54, + 0xb9, 0x1f, 0xbe, 0x04, 0x05, 0xf6, 0x57, 0xd4, 0x36, 0xc7, 0x73, 0xce, 0x33, 0x80, 0xd5, 0x15, + 0x6f, 0x41, 0x9e, 0xcb, 0xcc, 0xa0, 0xd1, 0xd1, 0x10, 0x8f, 0xd9, 0xc2, 0x18, 0x74, 0x40, 0xc6, + 0x56, 0xa0, 0xbd, 0x20, 0xd6, 0x98, 0x72, 0xc1, 0x14, 0xd4, 0x52, 0x08, 0xfe, 0x9a, 0x61, 0xf8, + 0x0a, 0x14, 0x85, 0x2a, 0x4d, 0xdb, 0xa0, 0xaf, 0xf8, 0xee, 0x93, 0x55, 0x85, 0x50, 0x9b, 0x0c, + 0x61, 0x8f, 0x7f, 0xe6, 0x3b, 0x76, 0xb4, 0xb4, 0xfc, 0x11, 0x0c, 0xe0, 0x8f, 0xff, 0x78, 0x76, + 0xe3, 0xbb, 0xbc, 0x78, 0x7a, 0xb3, 0x5a, 0xac, 0xfc, 0x45, 0x82, 0x0c, 0x7f, 0xdf, 0xd6, 0xa0, + 0xd8, 0x7f, 0xda, 0x55, 0xb4, 0x46, 0xe7, 0x68, 0xbf, 0xa5, 0xa0, 0x14, 0x2e, 0x03, 0x70, 0xe0, + 0x51, 0xab, 0x53, 0xeb, 0x23, 0x29, 0x1e, 0x37, 0xdb, 0xfd, 0x07, 0xf7, 0x50, 0x3a, 0x76, 0x38, + 0x12, 0x40, 0x26, 0x49, 0xb8, 0xbb, 0x8b, 0xb2, 0x18, 0x41, 0x49, 0x04, 0x68, 0x3e, 0x51, 0x1a, + 0x0f, 0xee, 0xa1, 0xdc, 0x34, 0x72, 0x77, 0x17, 0xad, 0xe0, 0x55, 0x28, 0x70, 0x64, 0xbf, 0xd3, + 0x69, 0xa1, 0x7c, 0x1c, 0xb3, 0xd7, 0x57, 0x9b, 0xed, 0x03, 0x54, 0x88, 0x63, 0x1e, 0xa8, 0x9d, + 0xa3, 0x2e, 0x82, 0x38, 0xc2, 0xa1, 0xd2, 0xeb, 0xd5, 0x0e, 0x14, 0x54, 0x8c, 0x19, 0xfb, 0x4f, + 0xfb, 0x4a, 0x0f, 0x95, 0xa6, 0xd2, 0xba, 0xbb, 0x8b, 0x56, 0xe3, 0x47, 0x28, 0xed, 0xa3, 0x43, + 0x54, 0xc6, 0xeb, 0xb0, 0x2a, 0x1e, 0x11, 0x25, 0xb1, 0x36, 0x03, 0x3d, 0xb8, 0x87, 0xd0, 0x24, + 0x11, 0x11, 0x65, 0x7d, 0x0a, 0x78, 0x70, 0x0f, 0xe1, 0x4a, 0x1d, 0xb2, 0x5c, 0x5d, 0x18, 0x43, + 0xb9, 0x55, 0xdb, 0x57, 0x5a, 0x5a, 0xa7, 0xdb, 0x6f, 0x76, 0xda, 0xb5, 0x16, 0x4a, 0x4d, 0x30, + 0x55, 0xf9, 0xd5, 0x51, 0x53, 0x55, 0x1a, 0x48, 0x4a, 0x62, 0x5d, 0xa5, 0xd6, 0x57, 0x1a, 0x28, + 0x5d, 0xd1, 0x61, 0x73, 0xd1, 0x3e, 0xb3, 0xf0, 0xcd, 0x48, 0x2c, 0xb1, 0xb4, 0x64, 0x89, 0x79, + 0xac, 0xb9, 0x25, 0xfe, 0x26, 0x05, 0x1b, 0x0b, 0xf6, 0xda, 0x85, 0x0f, 0xf9, 0x05, 0x64, 0x85, + 0x44, 0xc5, 0xe9, 0x73, 0x73, 0xe1, 0xa6, 0xcd, 0x05, 0x3b, 0x77, 0x02, 0x71, 0xbf, 0xe4, 0x09, + 0x9c, 0x5e, 0x72, 0x02, 0xb3, 0x10, 0x73, 0x49, 0xfe, 0x26, 0x05, 0xf2, 0xb2, 0xd8, 0x6f, 0xd9, + 0x28, 0xa4, 0xa9, 0x8d, 0xe2, 0xd3, 0xd9, 0x04, 0xae, 0x2e, 0x9f, 0xc3, 0x5c, 0x16, 0xdf, 0xa6, + 0xe0, 0xfc, 0xe2, 0x46, 0x65, 0x61, 0x0e, 0x9f, 0x41, 0x6e, 0x44, 0x83, 0x13, 0x27, 0x3a, 0xac, + 0x7f, 0xb2, 0xe0, 0x08, 0x60, 0xe6, 0xd9, 0x5a, 0x85, 0x5e, 0xc9, 0x33, 0x24, 0xbd, 0xac, 0xdb, + 0x10, 0xd9, 0xcc, 0x65, 0xfa, 0x5b, 0x09, 0xde, 0x5b, 0x18, 0x7c, 0x61, 0xa2, 0x97, 0x01, 0x4c, + 0xdb, 0x1d, 0x07, 0xe2, 0x40, 0x16, 0xfb, 0x53, 0x81, 0x23, 0xfc, 0xdd, 0x67, 0x7b, 0xcf, 0x38, + 0x88, 0xed, 0x69, 0x6e, 0x07, 0x01, 0x71, 0xc2, 0xc3, 0x49, 0xa2, 0x19, 0x9e, 0xe8, 0x07, 0x4b, + 0x66, 0x3a, 0x77, 0xd6, 0x7d, 0x04, 0x48, 0xb7, 0x4c, 0x6a, 0x07, 0x9a, 0x1f, 0x78, 0x94, 0x8c, + 0x4c, 0x7b, 0xc8, 0x37, 0xe0, 0xfc, 0x5e, 0x76, 0x40, 0x2c, 0x9f, 0xaa, 0x6b, 0xc2, 0xdc, 0x8b, + 0xac, 0xcc, 0x83, 0x9f, 0x32, 0x5e, 0xc2, 0x23, 0x37, 0xe5, 0x21, 0xcc, 0xb1, 0x47, 0xe5, 0xcf, + 0x2b, 0x50, 0x4c, 0xb4, 0x75, 0xf8, 0x2a, 0x94, 0x9e, 0x91, 0x17, 0x44, 0x8b, 0x5a, 0x75, 0x51, + 0x89, 0x22, 0xc3, 0xba, 0x61, 0xbb, 0xfe, 0x11, 0x6c, 0x72, 0x8a, 0x33, 0x0e, 0xa8, 0xa7, 0xe9, + 0x16, 0xf1, 0x7d, 0x5e, 0xb4, 0x3c, 0xa7, 0x62, 0x66, 0xeb, 0x30, 0x53, 0x3d, 0xb2, 0xe0, 0xfb, + 0xb0, 0xc1, 0x3d, 0x46, 0x63, 0x2b, 0x30, 0x5d, 0x8b, 0x6a, 0xec, 0xe3, 0xc1, 0xe7, 0x1b, 0x71, + 0x9c, 0xd9, 0x3a, 0x63, 0x1c, 0x86, 0x04, 0x96, 0x91, 0x8f, 0x1b, 0x70, 0x99, 0xbb, 0x0d, 0xa9, + 0x4d, 0x3d, 0x12, 0x50, 0x8d, 0x7e, 0x35, 0x26, 0x96, 0xaf, 0x11, 0xdb, 0xd0, 0x4e, 0x88, 0x7f, + 0x22, 0x6f, 0xb2, 0x00, 0xfb, 0x92, 0x9c, 0x52, 0x2f, 0x32, 0xe2, 0x41, 0xc8, 0x53, 0x38, 0xad, + 0x66, 0x1b, 0x9f, 0x13, 0xff, 0x04, 0xef, 0xc1, 0x79, 0x1e, 0xc5, 0x0f, 0x3c, 0xd3, 0x1e, 0x6a, + 0xfa, 0x09, 0xd5, 0x9f, 0x6b, 0xe3, 0x60, 0xf0, 0x50, 0xbe, 0x94, 0x7c, 0x3e, 0xcf, 0xb0, 0xc7, + 0x39, 0x75, 0x46, 0x39, 0x0a, 0x06, 0x0f, 0x71, 0x0f, 0x4a, 0x6c, 0x31, 0x46, 0xe6, 0xd7, 0x54, + 0x1b, 0x38, 0x1e, 0x3f, 0x59, 0xca, 0x0b, 0xde, 0xec, 0x44, 0x05, 0xab, 0x9d, 0xd0, 0xe1, 0xd0, + 0x31, 0xe8, 0x5e, 0xb6, 0xd7, 0x55, 0x94, 0x86, 0x5a, 0x8c, 0xa2, 0x3c, 0x72, 0x3c, 0x26, 0xa8, + 0xa1, 0x13, 0x17, 0xb8, 0x28, 0x04, 0x35, 0x74, 0xa2, 0xf2, 0xde, 0x87, 0x0d, 0x5d, 0x17, 0x73, + 0x36, 0x75, 0x2d, 0x6c, 0xf1, 0x7d, 0x19, 0x4d, 0x15, 0x4b, 0xd7, 0x0f, 0x04, 0x21, 0xd4, 0xb8, + 0x8f, 0x3f, 0x81, 0xf7, 0x26, 0xc5, 0x4a, 0x3a, 0xae, 0xcf, 0xcd, 0x72, 0xd6, 0xf5, 0x3e, 0x6c, + 0xb8, 0xa7, 0xf3, 0x8e, 0x78, 0xea, 0x89, 0xee, 0xe9, 0xac, 0xdb, 0x75, 0xfe, 0xd9, 0xe6, 0x51, + 0x9d, 0x04, 0xd4, 0x90, 0x2f, 0x24, 0xd9, 0x09, 0x03, 0xbe, 0x03, 0x48, 0xd7, 0x35, 0x6a, 0x93, + 0x63, 0x8b, 0x6a, 0xc4, 0xa3, 0x36, 0xf1, 0xe5, 0x2b, 0x49, 0x72, 0x59, 0xd7, 0x15, 0x6e, 0xad, + 0x71, 0x23, 0xbe, 0x05, 0xeb, 0xce, 0xf1, 0x33, 0x5d, 0x28, 0x4b, 0x73, 0x3d, 0x3a, 0x30, 0x5f, + 0xc9, 0xd7, 0x78, 0x99, 0xd6, 0x98, 0x81, 0xeb, 0xaa, 0xcb, 0x61, 0x7c, 0x13, 0x90, 0xee, 0x9f, + 0x10, 0xcf, 0xe5, 0x47, 0xbb, 0xef, 0x12, 0x9d, 0xca, 0xd7, 0x05, 0x55, 0xe0, 0xed, 0x08, 0x66, + 0xca, 0xf6, 0x5f, 0x9a, 0x83, 0x20, 0x8a, 0x78, 0x43, 0x28, 0x9b, 0x63, 0x61, 0xb4, 0x27, 0xb0, + 0x39, 0xb6, 0x4d, 0x3b, 0xa0, 0x9e, 0xeb, 0x51, 0xd6, 0xc4, 0x8b, 0x37, 0x51, 0xfe, 0xcf, 0xca, + 0x92, 0x36, 0xfc, 0x28, 0xc9, 0x16, 0x02, 0x50, 0x37, 0xc6, 0xf3, 0x60, 0x65, 0x0f, 0x4a, 0x49, + 0x5d, 0xe0, 0x02, 0x08, 0x65, 0xa0, 0x14, 0x3b, 0x63, 0xeb, 0x9d, 0x06, 0x3b, 0x1d, 0xbf, 0x54, + 0x90, 0xc4, 0x4e, 0xe9, 0x56, 0xb3, 0xaf, 0x68, 0xea, 0x51, 0xbb, 0xdf, 0x3c, 0x54, 0x50, 0xfa, + 0x56, 0x21, 0xff, 0xdf, 0x15, 0xf4, 0xfa, 0xf5, 0xeb, 0xd7, 0x52, 0xe5, 0x6f, 0x12, 0x94, 0xa7, + 0x3b, 0x63, 0xfc, 0x73, 0xb8, 0x10, 0x7d, 0xc6, 0xfa, 0x34, 0xd0, 0x5e, 0x9a, 0x1e, 0x97, 0xea, + 0x88, 0x88, 0xde, 0x32, 0xae, 0xf2, 0x66, 0xc8, 0xea, 0xd1, 0xe0, 0x0b, 0xd3, 0x63, 0x42, 0x1c, + 0x91, 0x00, 0xb7, 0xe0, 0x8a, 0xed, 0x68, 0x7e, 0x40, 0x6c, 0x83, 0x78, 0x86, 0x36, 0xb9, 0x40, + 0xd0, 0x88, 0xae, 0x53, 0xdf, 0x77, 0xc4, 0x11, 0x11, 0x47, 0x79, 0xdf, 0x76, 0x7a, 0x21, 0x79, + 0xb2, 0x77, 0xd6, 0x42, 0xea, 0x8c, 0x22, 0xd2, 0xcb, 0x14, 0x71, 0x09, 0x0a, 0x23, 0xe2, 0x6a, + 0xd4, 0x0e, 0xbc, 0x53, 0xde, 0xcf, 0xe5, 0xd5, 0xfc, 0x88, 0xb8, 0x0a, 0x1b, 0xbf, 0xbb, 0x35, + 0x48, 0xd6, 0xf1, 0x9f, 0x69, 0x28, 0x25, 0x7b, 0x3a, 0xd6, 0x22, 0xeb, 0x7c, 0xff, 0x4e, 0xf1, + 0x37, 0xfc, 0xc3, 0x37, 0x76, 0x80, 0xd5, 0x3a, 0xdb, 0xd8, 0xf7, 0x72, 0xa2, 0xd3, 0x52, 0x85, + 0x27, 0x3b, 0x54, 0xd9, 0x3b, 0x4d, 0x45, 0xff, 0x9e, 0x57, 0xc3, 0x11, 0x3e, 0x80, 0xdc, 0x33, + 0x9f, 0xc7, 0xce, 0xf1, 0xd8, 0xd7, 0xde, 0x1c, 0xfb, 0x71, 0x8f, 0x07, 0x2f, 0x3c, 0xee, 0x69, + 0xed, 0x8e, 0x7a, 0x58, 0x6b, 0xa9, 0xa1, 0x3b, 0xbe, 0x08, 0x19, 0x8b, 0x7c, 0x7d, 0x3a, 0x7d, + 0x04, 0x70, 0xe8, 0xac, 0x85, 0xbf, 0x08, 0x99, 0x97, 0x94, 0x3c, 0x9f, 0xde, 0x78, 0x39, 0xf4, + 0x0e, 0xa5, 0x7f, 0x07, 0xb2, 0xbc, 0x5e, 0x18, 0x20, 0xac, 0x18, 0x3a, 0x87, 0xf3, 0x90, 0xa9, + 0x77, 0x54, 0x26, 0x7f, 0x04, 0x25, 0x81, 0x6a, 0xdd, 0xa6, 0x52, 0x57, 0x90, 0x54, 0xb9, 0x0f, + 0x39, 0x51, 0x04, 0xf6, 0x6a, 0xc4, 0x65, 0x40, 0xe7, 0xc2, 0x61, 0x18, 0x23, 0x15, 0x59, 0x8f, + 0x0e, 0xf7, 0x15, 0x15, 0x49, 0xc9, 0xe5, 0xf5, 0xa1, 0x94, 0x6c, 0xe7, 0x7e, 0x18, 0x4d, 0xfd, + 0x35, 0x05, 0xc5, 0x44, 0x7b, 0xc6, 0x1a, 0x03, 0x62, 0x59, 0xce, 0x4b, 0x8d, 0x58, 0x26, 0xf1, + 0x43, 0x51, 0x00, 0x87, 0x6a, 0x0c, 0x39, 0xeb, 0xa2, 0xfd, 0x20, 0xc9, 0xff, 0x31, 0x05, 0x68, + 0xb6, 0xb5, 0x9b, 0x49, 0x30, 0xf5, 0xa3, 0x26, 0xf8, 0x87, 0x14, 0x94, 0xa7, 0xfb, 0xb9, 0x99, + 0xf4, 0xae, 0xfe, 0xa8, 0xe9, 0xfd, 0x4b, 0x82, 0xd5, 0xa9, 0x2e, 0xee, 0xac, 0xd9, 0x7d, 0x05, + 0xeb, 0xa6, 0x41, 0x47, 0xae, 0x13, 0x50, 0x5b, 0x3f, 0xd5, 0x2c, 0xfa, 0x82, 0x5a, 0x72, 0x85, + 0x6f, 0x14, 0x77, 0xde, 0xdc, 0x27, 0x56, 0x9b, 0x13, 0xbf, 0x16, 0x73, 0xdb, 0xdb, 0x68, 0x36, + 0x94, 0xc3, 0x6e, 0xa7, 0xaf, 0xb4, 0xeb, 0x4f, 0xb5, 0xa3, 0xf6, 0x2f, 0xdb, 0x9d, 0x2f, 0xda, + 0x2a, 0x32, 0x67, 0x68, 0xef, 0xf0, 0x55, 0xef, 0x02, 0x9a, 0x4d, 0x0a, 0x5f, 0x80, 0x45, 0x69, + 0xa1, 0x73, 0x78, 0x03, 0xd6, 0xda, 0x1d, 0xad, 0xd7, 0x6c, 0x28, 0x9a, 0xf2, 0xe8, 0x91, 0x52, + 0xef, 0xf7, 0xc4, 0x87, 0x73, 0xcc, 0xee, 0x4f, 0xbf, 0xd4, 0xbf, 0x4f, 0xc3, 0xc6, 0x82, 0x4c, + 0x70, 0x2d, 0xec, 0xd9, 0xc5, 0x67, 0xc4, 0xcf, 0xce, 0x92, 0x7d, 0x95, 0x75, 0x05, 0x5d, 0xe2, + 0x05, 0x61, 0x8b, 0x7f, 0x13, 0x58, 0x95, 0xec, 0xc0, 0x1c, 0x98, 0xd4, 0x0b, 0xef, 0x19, 0x44, + 0x23, 0xbf, 0x36, 0xc1, 0xc5, 0x55, 0xc3, 0x4f, 0x01, 0xbb, 0x8e, 0x6f, 0x06, 0xe6, 0x0b, 0xaa, + 0x99, 0x76, 0x74, 0x29, 0xc1, 0x1a, 0xfb, 0x8c, 0x8a, 0x22, 0x4b, 0xd3, 0x0e, 0x62, 0xb6, 0x4d, + 0x87, 0x64, 0x86, 0xcd, 0x36, 0xf0, 0xb4, 0x8a, 0x22, 0x4b, 0xcc, 0xbe, 0x0a, 0x25, 0xc3, 0x19, + 0xb3, 0x36, 0x49, 0xf0, 0xd8, 0x79, 0x91, 0x52, 0x8b, 0x02, 0x8b, 0x29, 0x61, 0x1f, 0x3b, 0xb9, + 0x0d, 0x29, 0xa9, 0x45, 0x81, 0x09, 0xca, 0x0d, 0x58, 0x23, 0xc3, 0xa1, 0xc7, 0x82, 0x47, 0x81, + 0x44, 0x67, 0x5e, 0x8e, 0x61, 0x4e, 0xdc, 0x7a, 0x0c, 0xf9, 0xa8, 0x0e, 0xec, 0x48, 0x66, 0x95, + 0xd0, 0x5c, 0x71, 0x27, 0x25, 0xed, 0x14, 0xd4, 0xbc, 0x1d, 0x19, 0xaf, 0x42, 0xc9, 0xf4, 0xb5, + 0xc9, 0xe5, 0xa8, 0xb4, 0x2d, 0xed, 0xe4, 0xd5, 0xa2, 0xe9, 0xc7, 0xb7, 0x61, 0x95, 0x6f, 0x25, + 0x28, 0x4f, 0x5f, 0xee, 0xe2, 0x06, 0xe4, 0x2d, 0x47, 0x27, 0x5c, 0x5a, 0xe2, 0x97, 0x85, 0x9d, + 0xb7, 0xdc, 0x07, 0x57, 0x5b, 0x21, 0x5f, 0x8d, 0x3d, 0xb7, 0xfe, 0x9e, 0x82, 0x7c, 0x04, 0xe3, + 0xf3, 0x90, 0x71, 0x49, 0x70, 0xc2, 0xc3, 0x65, 0xf7, 0x25, 0x94, 0x52, 0xf9, 0x98, 0xe1, 0xbe, + 0x4b, 0x6c, 0x2e, 0x81, 0x10, 0x67, 0x63, 0xb6, 0xae, 0x16, 0x25, 0x06, 0x6f, 0xfb, 0x9d, 0xd1, + 0x88, 0xda, 0x81, 0x1f, 0xad, 0x6b, 0x88, 0xd7, 0x43, 0x18, 0xdf, 0x86, 0xf5, 0xc0, 0x23, 0xa6, + 0x35, 0xc5, 0xcd, 0x70, 0x2e, 0x8a, 0x0c, 0x31, 0x79, 0x0f, 0x2e, 0x46, 0x71, 0x0d, 0x1a, 0x10, + 0xfd, 0x84, 0x1a, 0x13, 0xa7, 0x1c, 0xbf, 0x39, 0xbc, 0x10, 0x12, 0x1a, 0xa1, 0x3d, 0xf2, 0xad, + 0xfc, 0x23, 0x05, 0xeb, 0xd1, 0x87, 0x8a, 0x11, 0x17, 0xeb, 0x10, 0x80, 0xd8, 0xb6, 0x13, 0x24, + 0xcb, 0x35, 0x2f, 0xe5, 0x39, 0xbf, 0x6a, 0x2d, 0x76, 0x52, 0x13, 0x01, 0xb6, 0x46, 0x00, 0x13, + 0xcb, 0xd2, 0xb2, 0x5d, 0x81, 0x62, 0x78, 0x73, 0xcf, 0x7f, 0xfe, 0x11, 0x9f, 0xb6, 0x20, 0x20, + 0xf6, 0x45, 0x83, 0x37, 0x21, 0x7b, 0x4c, 0x87, 0xa6, 0x1d, 0xde, 0x27, 0x8a, 0x41, 0x74, 0x4b, + 0x99, 0x89, 0x6f, 0x29, 0xf7, 0x9f, 0xc0, 0x86, 0xee, 0x8c, 0x66, 0xd3, 0xdd, 0x47, 0x33, 0x9f, + 0xd7, 0xfe, 0xe7, 0xa9, 0x2f, 0x61, 0xd2, 0x62, 0x7e, 0x23, 0xa5, 0x0f, 0xba, 0xfb, 0x7f, 0x92, + 0xb6, 0x0e, 0x84, 0x5f, 0x37, 0x9a, 0xa6, 0x4a, 0x07, 0x16, 0xd5, 0x59, 0xea, 0xff, 0x0f, 0x00, + 0x00, 0xff, 0xff, 0xa0, 0xbf, 0x63, 0x15, 0xd3, 0x1a, 0x00, 0x00, +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go new file mode 100644 index 00000000..bac9913e --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/descriptor_gostring.gen.go @@ -0,0 +1,721 @@ +// Code generated by protoc-gen-gogo. +// source: descriptor.proto +// DO NOT EDIT! + +/* +Package descriptor is a generated protocol buffer package. + +It is generated from these files: + descriptor.proto + +It has these top-level messages: + FileDescriptorSet + FileDescriptorProto + DescriptorProto + FieldDescriptorProto + OneofDescriptorProto + EnumDescriptorProto + EnumValueDescriptorProto + ServiceDescriptorProto + MethodDescriptorProto + FileOptions + MessageOptions + FieldOptions + OneofOptions + EnumOptions + EnumValueOptions + ServiceOptions + MethodOptions + UninterpretedOption + SourceCodeInfo + GeneratedCodeInfo +*/ +package descriptor + +import fmt "fmt" +import strings "strings" +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" +import sort "sort" +import strconv "strconv" +import reflect "reflect" +import proto "github.com/gogo/protobuf/proto" +import math "math" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +func (this *FileDescriptorSet) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&descriptor.FileDescriptorSet{") + if this.File != nil { + s = append(s, "File: "+fmt.Sprintf("%#v", this.File)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FileDescriptorProto) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 16) + s = append(s, "&descriptor.FileDescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") + } + if this.Package != nil { + s = append(s, "Package: "+valueToGoStringDescriptor(this.Package, "string")+",\n") + } + if this.Dependency != nil { + s = append(s, "Dependency: "+fmt.Sprintf("%#v", this.Dependency)+",\n") + } + if this.PublicDependency != nil { + s = append(s, "PublicDependency: "+fmt.Sprintf("%#v", this.PublicDependency)+",\n") + } + if this.WeakDependency != nil { + s = append(s, "WeakDependency: "+fmt.Sprintf("%#v", this.WeakDependency)+",\n") + } + if this.MessageType != nil { + s = append(s, "MessageType: "+fmt.Sprintf("%#v", this.MessageType)+",\n") + } + if this.EnumType != nil { + s = append(s, "EnumType: "+fmt.Sprintf("%#v", this.EnumType)+",\n") + } + if this.Service != nil { + s = append(s, "Service: "+fmt.Sprintf("%#v", this.Service)+",\n") + } + if this.Extension != nil { + s = append(s, "Extension: "+fmt.Sprintf("%#v", this.Extension)+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.SourceCodeInfo != nil { + s = append(s, "SourceCodeInfo: "+fmt.Sprintf("%#v", this.SourceCodeInfo)+",\n") + } + if this.Syntax != nil { + s = append(s, "Syntax: "+valueToGoStringDescriptor(this.Syntax, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DescriptorProto) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&descriptor.DescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") + } + if this.Field != nil { + s = append(s, "Field: "+fmt.Sprintf("%#v", this.Field)+",\n") + } + if this.Extension != nil { + s = append(s, "Extension: "+fmt.Sprintf("%#v", this.Extension)+",\n") + } + if this.NestedType != nil { + s = append(s, "NestedType: "+fmt.Sprintf("%#v", this.NestedType)+",\n") + } + if this.EnumType != nil { + s = append(s, "EnumType: "+fmt.Sprintf("%#v", this.EnumType)+",\n") + } + if this.ExtensionRange != nil { + s = append(s, "ExtensionRange: "+fmt.Sprintf("%#v", this.ExtensionRange)+",\n") + } + if this.OneofDecl != nil { + s = append(s, "OneofDecl: "+fmt.Sprintf("%#v", this.OneofDecl)+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.ReservedRange != nil { + s = append(s, "ReservedRange: "+fmt.Sprintf("%#v", this.ReservedRange)+",\n") + } + if this.ReservedName != nil { + s = append(s, "ReservedName: "+fmt.Sprintf("%#v", this.ReservedName)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DescriptorProto_ExtensionRange) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&descriptor.DescriptorProto_ExtensionRange{") + if this.Start != nil { + s = append(s, "Start: "+valueToGoStringDescriptor(this.Start, "int32")+",\n") + } + if this.End != nil { + s = append(s, "End: "+valueToGoStringDescriptor(this.End, "int32")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DescriptorProto_ReservedRange) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&descriptor.DescriptorProto_ReservedRange{") + if this.Start != nil { + s = append(s, "Start: "+valueToGoStringDescriptor(this.Start, "int32")+",\n") + } + if this.End != nil { + s = append(s, "End: "+valueToGoStringDescriptor(this.End, "int32")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FieldDescriptorProto) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&descriptor.FieldDescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") + } + if this.Number != nil { + s = append(s, "Number: "+valueToGoStringDescriptor(this.Number, "int32")+",\n") + } + if this.Label != nil { + s = append(s, "Label: "+valueToGoStringDescriptor(this.Label, "descriptor.FieldDescriptorProto_Label")+",\n") + } + if this.Type != nil { + s = append(s, "Type: "+valueToGoStringDescriptor(this.Type, "descriptor.FieldDescriptorProto_Type")+",\n") + } + if this.TypeName != nil { + s = append(s, "TypeName: "+valueToGoStringDescriptor(this.TypeName, "string")+",\n") + } + if this.Extendee != nil { + s = append(s, "Extendee: "+valueToGoStringDescriptor(this.Extendee, "string")+",\n") + } + if this.DefaultValue != nil { + s = append(s, "DefaultValue: "+valueToGoStringDescriptor(this.DefaultValue, "string")+",\n") + } + if this.OneofIndex != nil { + s = append(s, "OneofIndex: "+valueToGoStringDescriptor(this.OneofIndex, "int32")+",\n") + } + if this.JsonName != nil { + s = append(s, "JsonName: "+valueToGoStringDescriptor(this.JsonName, "string")+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OneofDescriptorProto) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&descriptor.OneofDescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *EnumDescriptorProto) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&descriptor.EnumDescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *EnumValueDescriptorProto) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&descriptor.EnumValueDescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") + } + if this.Number != nil { + s = append(s, "Number: "+valueToGoStringDescriptor(this.Number, "int32")+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ServiceDescriptorProto) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&descriptor.ServiceDescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") + } + if this.Method != nil { + s = append(s, "Method: "+fmt.Sprintf("%#v", this.Method)+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MethodDescriptorProto) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&descriptor.MethodDescriptorProto{") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringDescriptor(this.Name, "string")+",\n") + } + if this.InputType != nil { + s = append(s, "InputType: "+valueToGoStringDescriptor(this.InputType, "string")+",\n") + } + if this.OutputType != nil { + s = append(s, "OutputType: "+valueToGoStringDescriptor(this.OutputType, "string")+",\n") + } + if this.Options != nil { + s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") + } + if this.ClientStreaming != nil { + s = append(s, "ClientStreaming: "+valueToGoStringDescriptor(this.ClientStreaming, "bool")+",\n") + } + if this.ServerStreaming != nil { + s = append(s, "ServerStreaming: "+valueToGoStringDescriptor(this.ServerStreaming, "bool")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FileOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&descriptor.FileOptions{") + if this.JavaPackage != nil { + s = append(s, "JavaPackage: "+valueToGoStringDescriptor(this.JavaPackage, "string")+",\n") + } + if this.JavaOuterClassname != nil { + s = append(s, "JavaOuterClassname: "+valueToGoStringDescriptor(this.JavaOuterClassname, "string")+",\n") + } + if this.JavaMultipleFiles != nil { + s = append(s, "JavaMultipleFiles: "+valueToGoStringDescriptor(this.JavaMultipleFiles, "bool")+",\n") + } + if this.JavaGenerateEqualsAndHash != nil { + s = append(s, "JavaGenerateEqualsAndHash: "+valueToGoStringDescriptor(this.JavaGenerateEqualsAndHash, "bool")+",\n") + } + if this.JavaStringCheckUtf8 != nil { + s = append(s, "JavaStringCheckUtf8: "+valueToGoStringDescriptor(this.JavaStringCheckUtf8, "bool")+",\n") + } + if this.OptimizeFor != nil { + s = append(s, "OptimizeFor: "+valueToGoStringDescriptor(this.OptimizeFor, "descriptor.FileOptions_OptimizeMode")+",\n") + } + if this.GoPackage != nil { + s = append(s, "GoPackage: "+valueToGoStringDescriptor(this.GoPackage, "string")+",\n") + } + if this.CcGenericServices != nil { + s = append(s, "CcGenericServices: "+valueToGoStringDescriptor(this.CcGenericServices, "bool")+",\n") + } + if this.JavaGenericServices != nil { + s = append(s, "JavaGenericServices: "+valueToGoStringDescriptor(this.JavaGenericServices, "bool")+",\n") + } + if this.PyGenericServices != nil { + s = append(s, "PyGenericServices: "+valueToGoStringDescriptor(this.PyGenericServices, "bool")+",\n") + } + if this.Deprecated != nil { + s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") + } + if this.CcEnableArenas != nil { + s = append(s, "CcEnableArenas: "+valueToGoStringDescriptor(this.CcEnableArenas, "bool")+",\n") + } + if this.ObjcClassPrefix != nil { + s = append(s, "ObjcClassPrefix: "+valueToGoStringDescriptor(this.ObjcClassPrefix, "string")+",\n") + } + if this.CsharpNamespace != nil { + s = append(s, "CsharpNamespace: "+valueToGoStringDescriptor(this.CsharpNamespace, "string")+",\n") + } + if this.SwiftPrefix != nil { + s = append(s, "SwiftPrefix: "+valueToGoStringDescriptor(this.SwiftPrefix, "string")+",\n") + } + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MessageOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&descriptor.MessageOptions{") + if this.MessageSetWireFormat != nil { + s = append(s, "MessageSetWireFormat: "+valueToGoStringDescriptor(this.MessageSetWireFormat, "bool")+",\n") + } + if this.NoStandardDescriptorAccessor != nil { + s = append(s, "NoStandardDescriptorAccessor: "+valueToGoStringDescriptor(this.NoStandardDescriptorAccessor, "bool")+",\n") + } + if this.Deprecated != nil { + s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") + } + if this.MapEntry != nil { + s = append(s, "MapEntry: "+valueToGoStringDescriptor(this.MapEntry, "bool")+",\n") + } + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FieldOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 11) + s = append(s, "&descriptor.FieldOptions{") + if this.Ctype != nil { + s = append(s, "Ctype: "+valueToGoStringDescriptor(this.Ctype, "descriptor.FieldOptions_CType")+",\n") + } + if this.Packed != nil { + s = append(s, "Packed: "+valueToGoStringDescriptor(this.Packed, "bool")+",\n") + } + if this.Jstype != nil { + s = append(s, "Jstype: "+valueToGoStringDescriptor(this.Jstype, "descriptor.FieldOptions_JSType")+",\n") + } + if this.Lazy != nil { + s = append(s, "Lazy: "+valueToGoStringDescriptor(this.Lazy, "bool")+",\n") + } + if this.Deprecated != nil { + s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") + } + if this.Weak != nil { + s = append(s, "Weak: "+valueToGoStringDescriptor(this.Weak, "bool")+",\n") + } + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OneofOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&descriptor.OneofOptions{") + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *EnumOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&descriptor.EnumOptions{") + if this.AllowAlias != nil { + s = append(s, "AllowAlias: "+valueToGoStringDescriptor(this.AllowAlias, "bool")+",\n") + } + if this.Deprecated != nil { + s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") + } + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *EnumValueOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&descriptor.EnumValueOptions{") + if this.Deprecated != nil { + s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") + } + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ServiceOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&descriptor.ServiceOptions{") + if this.Deprecated != nil { + s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") + } + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MethodOptions) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&descriptor.MethodOptions{") + if this.Deprecated != nil { + s = append(s, "Deprecated: "+valueToGoStringDescriptor(this.Deprecated, "bool")+",\n") + } + if this.IdempotencyLevel != nil { + s = append(s, "IdempotencyLevel: "+valueToGoStringDescriptor(this.IdempotencyLevel, "descriptor.MethodOptions_IdempotencyLevel")+",\n") + } + if this.UninterpretedOption != nil { + s = append(s, "UninterpretedOption: "+fmt.Sprintf("%#v", this.UninterpretedOption)+",\n") + } + s = append(s, "XXX_InternalExtensions: "+extensionToGoStringDescriptor(this)+",\n") + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UninterpretedOption) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 11) + s = append(s, "&descriptor.UninterpretedOption{") + if this.Name != nil { + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + } + if this.IdentifierValue != nil { + s = append(s, "IdentifierValue: "+valueToGoStringDescriptor(this.IdentifierValue, "string")+",\n") + } + if this.PositiveIntValue != nil { + s = append(s, "PositiveIntValue: "+valueToGoStringDescriptor(this.PositiveIntValue, "uint64")+",\n") + } + if this.NegativeIntValue != nil { + s = append(s, "NegativeIntValue: "+valueToGoStringDescriptor(this.NegativeIntValue, "int64")+",\n") + } + if this.DoubleValue != nil { + s = append(s, "DoubleValue: "+valueToGoStringDescriptor(this.DoubleValue, "float64")+",\n") + } + if this.StringValue != nil { + s = append(s, "StringValue: "+valueToGoStringDescriptor(this.StringValue, "byte")+",\n") + } + if this.AggregateValue != nil { + s = append(s, "AggregateValue: "+valueToGoStringDescriptor(this.AggregateValue, "string")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UninterpretedOption_NamePart) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&descriptor.UninterpretedOption_NamePart{") + if this.NamePart != nil { + s = append(s, "NamePart: "+valueToGoStringDescriptor(this.NamePart, "string")+",\n") + } + if this.IsExtension != nil { + s = append(s, "IsExtension: "+valueToGoStringDescriptor(this.IsExtension, "bool")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SourceCodeInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&descriptor.SourceCodeInfo{") + if this.Location != nil { + s = append(s, "Location: "+fmt.Sprintf("%#v", this.Location)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SourceCodeInfo_Location) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&descriptor.SourceCodeInfo_Location{") + if this.Path != nil { + s = append(s, "Path: "+fmt.Sprintf("%#v", this.Path)+",\n") + } + if this.Span != nil { + s = append(s, "Span: "+fmt.Sprintf("%#v", this.Span)+",\n") + } + if this.LeadingComments != nil { + s = append(s, "LeadingComments: "+valueToGoStringDescriptor(this.LeadingComments, "string")+",\n") + } + if this.TrailingComments != nil { + s = append(s, "TrailingComments: "+valueToGoStringDescriptor(this.TrailingComments, "string")+",\n") + } + if this.LeadingDetachedComments != nil { + s = append(s, "LeadingDetachedComments: "+fmt.Sprintf("%#v", this.LeadingDetachedComments)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GeneratedCodeInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&descriptor.GeneratedCodeInfo{") + if this.Annotation != nil { + s = append(s, "Annotation: "+fmt.Sprintf("%#v", this.Annotation)+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *GeneratedCodeInfo_Annotation) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&descriptor.GeneratedCodeInfo_Annotation{") + if this.Path != nil { + s = append(s, "Path: "+fmt.Sprintf("%#v", this.Path)+",\n") + } + if this.SourceFile != nil { + s = append(s, "SourceFile: "+valueToGoStringDescriptor(this.SourceFile, "string")+",\n") + } + if this.Begin != nil { + s = append(s, "Begin: "+valueToGoStringDescriptor(this.Begin, "int32")+",\n") + } + if this.End != nil { + s = append(s, "End: "+valueToGoStringDescriptor(this.End, "int32")+",\n") + } + if this.XXX_unrecognized != nil { + s = append(s, "XXX_unrecognized:"+fmt.Sprintf("%#v", this.XXX_unrecognized)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringDescriptor(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func extensionToGoStringDescriptor(m github_com_gogo_protobuf_proto.Message) string { + e := github_com_gogo_protobuf_proto.GetUnsafeExtensionsMap(m) + if e == nil { + return "nil" + } + s := "proto.NewUnsafeXXX_InternalExtensions(map[int32]proto.Extension{" + keys := make([]int, 0, len(e)) + for k := range e { + keys = append(keys, int(k)) + } + sort.Ints(keys) + ss := []string{} + for _, k := range keys { + ss = append(ss, strconv.Itoa(k)+": "+e[int32(k)].GoString()) + } + s += strings.Join(ss, ",") + "})" + return s +} diff --git a/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/helper.go b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/helper.go new file mode 100644 index 00000000..e0846a35 --- /dev/null +++ b/vendor/github.com/gogo/protobuf/protoc-gen-gogo/descriptor/helper.go @@ -0,0 +1,390 @@ +// Protocol Buffers for Go with Gadgets +// +// Copyright (c) 2013, The GoGo Authors. All rights reserved. +// http://github.com/gogo/protobuf +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +package descriptor + +import ( + "strings" +) + +func (msg *DescriptorProto) GetMapFields() (*FieldDescriptorProto, *FieldDescriptorProto) { + if !msg.GetOptions().GetMapEntry() { + return nil, nil + } + return msg.GetField()[0], msg.GetField()[1] +} + +func dotToUnderscore(r rune) rune { + if r == '.' { + return '_' + } + return r +} + +func (field *FieldDescriptorProto) WireType() (wire int) { + switch *field.Type { + case FieldDescriptorProto_TYPE_DOUBLE: + return 1 + case FieldDescriptorProto_TYPE_FLOAT: + return 5 + case FieldDescriptorProto_TYPE_INT64: + return 0 + case FieldDescriptorProto_TYPE_UINT64: + return 0 + case FieldDescriptorProto_TYPE_INT32: + return 0 + case FieldDescriptorProto_TYPE_UINT32: + return 0 + case FieldDescriptorProto_TYPE_FIXED64: + return 1 + case FieldDescriptorProto_TYPE_FIXED32: + return 5 + case FieldDescriptorProto_TYPE_BOOL: + return 0 + case FieldDescriptorProto_TYPE_STRING: + return 2 + case FieldDescriptorProto_TYPE_GROUP: + return 2 + case FieldDescriptorProto_TYPE_MESSAGE: + return 2 + case FieldDescriptorProto_TYPE_BYTES: + return 2 + case FieldDescriptorProto_TYPE_ENUM: + return 0 + case FieldDescriptorProto_TYPE_SFIXED32: + return 5 + case FieldDescriptorProto_TYPE_SFIXED64: + return 1 + case FieldDescriptorProto_TYPE_SINT32: + return 0 + case FieldDescriptorProto_TYPE_SINT64: + return 0 + } + panic("unreachable") +} + +func (field *FieldDescriptorProto) GetKeyUint64() (x uint64) { + packed := field.IsPacked() + wireType := field.WireType() + fieldNumber := field.GetNumber() + if packed { + wireType = 2 + } + x = uint64(uint32(fieldNumber)<<3 | uint32(wireType)) + return x +} + +func (field *FieldDescriptorProto) GetKey3Uint64() (x uint64) { + packed := field.IsPacked3() + wireType := field.WireType() + fieldNumber := field.GetNumber() + if packed { + wireType = 2 + } + x = uint64(uint32(fieldNumber)<<3 | uint32(wireType)) + return x +} + +func (field *FieldDescriptorProto) GetKey() []byte { + x := field.GetKeyUint64() + i := 0 + keybuf := make([]byte, 0) + for i = 0; x > 127; i++ { + keybuf = append(keybuf, 0x80|uint8(x&0x7F)) + x >>= 7 + } + keybuf = append(keybuf, uint8(x)) + return keybuf +} + +func (field *FieldDescriptorProto) GetKey3() []byte { + x := field.GetKey3Uint64() + i := 0 + keybuf := make([]byte, 0) + for i = 0; x > 127; i++ { + keybuf = append(keybuf, 0x80|uint8(x&0x7F)) + x >>= 7 + } + keybuf = append(keybuf, uint8(x)) + return keybuf +} + +func (desc *FileDescriptorSet) GetField(packageName, messageName, fieldName string) *FieldDescriptorProto { + msg := desc.GetMessage(packageName, messageName) + if msg == nil { + return nil + } + for _, field := range msg.GetField() { + if field.GetName() == fieldName { + return field + } + } + return nil +} + +func (file *FileDescriptorProto) GetMessage(typeName string) *DescriptorProto { + for _, msg := range file.GetMessageType() { + if msg.GetName() == typeName { + return msg + } + nes := file.GetNestedMessage(msg, strings.TrimPrefix(typeName, msg.GetName()+".")) + if nes != nil { + return nes + } + } + return nil +} + +func (file *FileDescriptorProto) GetNestedMessage(msg *DescriptorProto, typeName string) *DescriptorProto { + for _, nes := range msg.GetNestedType() { + if nes.GetName() == typeName { + return nes + } + res := file.GetNestedMessage(nes, strings.TrimPrefix(typeName, nes.GetName()+".")) + if res != nil { + return res + } + } + return nil +} + +func (desc *FileDescriptorSet) GetMessage(packageName string, typeName string) *DescriptorProto { + for _, file := range desc.GetFile() { + if strings.Map(dotToUnderscore, file.GetPackage()) != strings.Map(dotToUnderscore, packageName) { + continue + } + for _, msg := range file.GetMessageType() { + if msg.GetName() == typeName { + return msg + } + } + for _, msg := range file.GetMessageType() { + for _, nes := range msg.GetNestedType() { + if nes.GetName() == typeName { + return nes + } + if msg.GetName()+"."+nes.GetName() == typeName { + return nes + } + } + } + } + return nil +} + +func (desc *FileDescriptorSet) IsProto3(packageName string, typeName string) bool { + for _, file := range desc.GetFile() { + if strings.Map(dotToUnderscore, file.GetPackage()) != strings.Map(dotToUnderscore, packageName) { + continue + } + for _, msg := range file.GetMessageType() { + if msg.GetName() == typeName { + return file.GetSyntax() == "proto3" + } + } + for _, msg := range file.GetMessageType() { + for _, nes := range msg.GetNestedType() { + if nes.GetName() == typeName { + return file.GetSyntax() == "proto3" + } + if msg.GetName()+"."+nes.GetName() == typeName { + return file.GetSyntax() == "proto3" + } + } + } + } + return false +} + +func (msg *DescriptorProto) IsExtendable() bool { + return len(msg.GetExtensionRange()) > 0 +} + +func (desc *FileDescriptorSet) FindExtension(packageName string, typeName string, fieldName string) (extPackageName string, field *FieldDescriptorProto) { + parent := desc.GetMessage(packageName, typeName) + if parent == nil { + return "", nil + } + if !parent.IsExtendable() { + return "", nil + } + extendee := "." + packageName + "." + typeName + for _, file := range desc.GetFile() { + for _, ext := range file.GetExtension() { + if strings.Map(dotToUnderscore, file.GetPackage()) == strings.Map(dotToUnderscore, packageName) { + if !(ext.GetExtendee() == typeName || ext.GetExtendee() == extendee) { + continue + } + } else { + if ext.GetExtendee() != extendee { + continue + } + } + if ext.GetName() == fieldName { + return file.GetPackage(), ext + } + } + } + return "", nil +} + +func (desc *FileDescriptorSet) FindExtensionByFieldNumber(packageName string, typeName string, fieldNum int32) (extPackageName string, field *FieldDescriptorProto) { + parent := desc.GetMessage(packageName, typeName) + if parent == nil { + return "", nil + } + if !parent.IsExtendable() { + return "", nil + } + extendee := "." + packageName + "." + typeName + for _, file := range desc.GetFile() { + for _, ext := range file.GetExtension() { + if strings.Map(dotToUnderscore, file.GetPackage()) == strings.Map(dotToUnderscore, packageName) { + if !(ext.GetExtendee() == typeName || ext.GetExtendee() == extendee) { + continue + } + } else { + if ext.GetExtendee() != extendee { + continue + } + } + if ext.GetNumber() == fieldNum { + return file.GetPackage(), ext + } + } + } + return "", nil +} + +func (desc *FileDescriptorSet) FindMessage(packageName string, typeName string, fieldName string) (msgPackageName string, msgName string) { + parent := desc.GetMessage(packageName, typeName) + if parent == nil { + return "", "" + } + field := parent.GetFieldDescriptor(fieldName) + if field == nil { + var extPackageName string + extPackageName, field = desc.FindExtension(packageName, typeName, fieldName) + if field == nil { + return "", "" + } + packageName = extPackageName + } + typeNames := strings.Split(field.GetTypeName(), ".") + if len(typeNames) == 1 { + msg := desc.GetMessage(packageName, typeName) + if msg == nil { + return "", "" + } + return packageName, msg.GetName() + } + if len(typeNames) > 2 { + for i := 1; i < len(typeNames)-1; i++ { + packageName = strings.Join(typeNames[1:len(typeNames)-i], ".") + typeName = strings.Join(typeNames[len(typeNames)-i:], ".") + msg := desc.GetMessage(packageName, typeName) + if msg != nil { + typeNames := strings.Split(msg.GetName(), ".") + if len(typeNames) == 1 { + return packageName, msg.GetName() + } + return strings.Join(typeNames[1:len(typeNames)-1], "."), typeNames[len(typeNames)-1] + } + } + } + return "", "" +} + +func (msg *DescriptorProto) GetFieldDescriptor(fieldName string) *FieldDescriptorProto { + for _, field := range msg.GetField() { + if field.GetName() == fieldName { + return field + } + } + return nil +} + +func (desc *FileDescriptorSet) GetEnum(packageName string, typeName string) *EnumDescriptorProto { + for _, file := range desc.GetFile() { + if strings.Map(dotToUnderscore, file.GetPackage()) != strings.Map(dotToUnderscore, packageName) { + continue + } + for _, enum := range file.GetEnumType() { + if enum.GetName() == typeName { + return enum + } + } + } + return nil +} + +func (f *FieldDescriptorProto) IsEnum() bool { + return *f.Type == FieldDescriptorProto_TYPE_ENUM +} + +func (f *FieldDescriptorProto) IsMessage() bool { + return *f.Type == FieldDescriptorProto_TYPE_MESSAGE +} + +func (f *FieldDescriptorProto) IsBytes() bool { + return *f.Type == FieldDescriptorProto_TYPE_BYTES +} + +func (f *FieldDescriptorProto) IsRepeated() bool { + return f.Label != nil && *f.Label == FieldDescriptorProto_LABEL_REPEATED +} + +func (f *FieldDescriptorProto) IsString() bool { + return *f.Type == FieldDescriptorProto_TYPE_STRING +} + +func (f *FieldDescriptorProto) IsBool() bool { + return *f.Type == FieldDescriptorProto_TYPE_BOOL +} + +func (f *FieldDescriptorProto) IsRequired() bool { + return f.Label != nil && *f.Label == FieldDescriptorProto_LABEL_REQUIRED +} + +func (f *FieldDescriptorProto) IsPacked() bool { + return f.Options != nil && f.GetOptions().GetPacked() +} + +func (f *FieldDescriptorProto) IsPacked3() bool { + if f.IsRepeated() && f.IsScalar() { + if f.Options == nil || f.GetOptions().Packed == nil { + return true + } + return f.Options != nil && f.GetOptions().GetPacked() + } + return false +} + +func (m *DescriptorProto) HasExtension() bool { + return len(m.ExtensionRange) > 0 +} diff --git a/vendor/github.com/mesos/mesos-go/LICENSE b/vendor/github.com/mesos/mesos-go/LICENSE new file mode 100644 index 00000000..ad410e11 --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/LICENSE @@ -0,0 +1,201 @@ +Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright {yyyy} {name of copyright owner} + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/vendor/github.com/mesos/mesos-go/NOTICE b/vendor/github.com/mesos/mesos-go/NOTICE new file mode 100644 index 00000000..491bbe14 --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/NOTICE @@ -0,0 +1,13 @@ +Copyright 2013-2015, Mesosphere, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/agent/agent.pb.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/agent/agent.pb.go new file mode 100644 index 00000000..9254946a --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/agent/agent.pb.go @@ -0,0 +1,16909 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: agent/agent.proto + +/* + Package agent is a generated protocol buffer package. + + It is generated from these files: + agent/agent.proto + + It has these top-level messages: + Call + Response + ProcessIO +*/ +package agent + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import mesos "github.com/mesos/mesos-go/api/v1/lib" +import _ "github.com/gogo/protobuf/gogoproto" + +import strconv "strconv" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +// If a call of type `Call::FOO` requires additional parameters they can be +// included in the corresponding `Call::Foo` message. Similarly, if a call +// receives a synchronous response it will be returned as a `Response` +// message of type `Response::FOO`; see `Call::LaunchNestedContainerSession` +// and `Call::AttachContainerOutput` for exceptions. +type Call_Type int32 + +const ( + Call_UNKNOWN Call_Type = 0 + Call_GET_HEALTH Call_Type = 1 + Call_GET_FLAGS Call_Type = 2 + Call_GET_VERSION Call_Type = 3 + Call_GET_METRICS Call_Type = 4 + Call_GET_LOGGING_LEVEL Call_Type = 5 + Call_SET_LOGGING_LEVEL Call_Type = 6 + Call_LIST_FILES Call_Type = 7 + Call_READ_FILE Call_Type = 8 + Call_GET_STATE Call_Type = 9 + Call_GET_CONTAINERS Call_Type = 10 + // Retrieves the information about known frameworks. + Call_GET_FRAMEWORKS Call_Type = 11 + // Retrieves the information about known executors. + Call_GET_EXECUTORS Call_Type = 12 + // Retrieves the information about known tasks. + Call_GET_TASKS Call_Type = 13 + // Retrieves the agent information. + Call_GET_AGENT Call_Type = 20 + // Retrieves the information about known resource providers. + Call_GET_RESOURCE_PROVIDERS Call_Type = 26 + // Calls for managing nested containers underneath an executor's container. + // Some of these calls are deprecated in favor of the calls + // for both standalone or nested containers further below. + Call_LAUNCH_NESTED_CONTAINER Call_Type = 14 + Call_WAIT_NESTED_CONTAINER Call_Type = 15 + Call_KILL_NESTED_CONTAINER Call_Type = 16 + Call_REMOVE_NESTED_CONTAINER Call_Type = 21 + // See 'LaunchNestedContainerSession' below. + Call_LAUNCH_NESTED_CONTAINER_SESSION Call_Type = 17 + Call_ATTACH_CONTAINER_INPUT Call_Type = 18 + Call_ATTACH_CONTAINER_OUTPUT Call_Type = 19 + // Calls for managing standalone containers + // or containers nested underneath another container. + Call_LAUNCH_CONTAINER Call_Type = 22 + Call_WAIT_CONTAINER Call_Type = 23 + Call_KILL_CONTAINER Call_Type = 24 + Call_REMOVE_CONTAINER Call_Type = 25 + Call_ADD_RESOURCE_PROVIDER_CONFIG Call_Type = 27 + Call_UPDATE_RESOURCE_PROVIDER_CONFIG Call_Type = 28 + Call_REMOVE_RESOURCE_PROVIDER_CONFIG Call_Type = 29 + // Prune unused container images. + Call_PRUNE_IMAGES Call_Type = 30 +) + +var Call_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "GET_HEALTH", + 2: "GET_FLAGS", + 3: "GET_VERSION", + 4: "GET_METRICS", + 5: "GET_LOGGING_LEVEL", + 6: "SET_LOGGING_LEVEL", + 7: "LIST_FILES", + 8: "READ_FILE", + 9: "GET_STATE", + 10: "GET_CONTAINERS", + 11: "GET_FRAMEWORKS", + 12: "GET_EXECUTORS", + 13: "GET_TASKS", + 20: "GET_AGENT", + 26: "GET_RESOURCE_PROVIDERS", + 14: "LAUNCH_NESTED_CONTAINER", + 15: "WAIT_NESTED_CONTAINER", + 16: "KILL_NESTED_CONTAINER", + 21: "REMOVE_NESTED_CONTAINER", + 17: "LAUNCH_NESTED_CONTAINER_SESSION", + 18: "ATTACH_CONTAINER_INPUT", + 19: "ATTACH_CONTAINER_OUTPUT", + 22: "LAUNCH_CONTAINER", + 23: "WAIT_CONTAINER", + 24: "KILL_CONTAINER", + 25: "REMOVE_CONTAINER", + 27: "ADD_RESOURCE_PROVIDER_CONFIG", + 28: "UPDATE_RESOURCE_PROVIDER_CONFIG", + 29: "REMOVE_RESOURCE_PROVIDER_CONFIG", + 30: "PRUNE_IMAGES", +} +var Call_Type_value = map[string]int32{ + "UNKNOWN": 0, + "GET_HEALTH": 1, + "GET_FLAGS": 2, + "GET_VERSION": 3, + "GET_METRICS": 4, + "GET_LOGGING_LEVEL": 5, + "SET_LOGGING_LEVEL": 6, + "LIST_FILES": 7, + "READ_FILE": 8, + "GET_STATE": 9, + "GET_CONTAINERS": 10, + "GET_FRAMEWORKS": 11, + "GET_EXECUTORS": 12, + "GET_TASKS": 13, + "GET_AGENT": 20, + "GET_RESOURCE_PROVIDERS": 26, + "LAUNCH_NESTED_CONTAINER": 14, + "WAIT_NESTED_CONTAINER": 15, + "KILL_NESTED_CONTAINER": 16, + "REMOVE_NESTED_CONTAINER": 21, + "LAUNCH_NESTED_CONTAINER_SESSION": 17, + "ATTACH_CONTAINER_INPUT": 18, + "ATTACH_CONTAINER_OUTPUT": 19, + "LAUNCH_CONTAINER": 22, + "WAIT_CONTAINER": 23, + "KILL_CONTAINER": 24, + "REMOVE_CONTAINER": 25, + "ADD_RESOURCE_PROVIDER_CONFIG": 27, + "UPDATE_RESOURCE_PROVIDER_CONFIG": 28, + "REMOVE_RESOURCE_PROVIDER_CONFIG": 29, + "PRUNE_IMAGES": 30, +} + +func (x Call_Type) Enum() *Call_Type { + p := new(Call_Type) + *p = x + return p +} +func (x Call_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(Call_Type_name, int32(x)) +} +func (x *Call_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Call_Type_value, data, "Call_Type") + if err != nil { + return err + } + *x = Call_Type(value) + return nil +} +func (Call_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorAgent, []int{0, 0} } + +type Call_AttachContainerInput_Type int32 + +const ( + Call_AttachContainerInput_UNKNOWN Call_AttachContainerInput_Type = 0 + Call_AttachContainerInput_CONTAINER_ID Call_AttachContainerInput_Type = 1 + Call_AttachContainerInput_PROCESS_IO Call_AttachContainerInput_Type = 2 +) + +var Call_AttachContainerInput_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "CONTAINER_ID", + 2: "PROCESS_IO", +} +var Call_AttachContainerInput_Type_value = map[string]int32{ + "UNKNOWN": 0, + "CONTAINER_ID": 1, + "PROCESS_IO": 2, +} + +func (x Call_AttachContainerInput_Type) Enum() *Call_AttachContainerInput_Type { + p := new(Call_AttachContainerInput_Type) + *p = x + return p +} +func (x Call_AttachContainerInput_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(Call_AttachContainerInput_Type_name, int32(x)) +} +func (x *Call_AttachContainerInput_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Call_AttachContainerInput_Type_value, data, "Call_AttachContainerInput_Type") + if err != nil { + return err + } + *x = Call_AttachContainerInput_Type(value) + return nil +} +func (Call_AttachContainerInput_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptorAgent, []int{0, 10, 0} +} + +// Each of the responses of type `FOO` corresponds to `Foo` message below. +type Response_Type int32 + +const ( + Response_UNKNOWN Response_Type = 0 + Response_GET_HEALTH Response_Type = 1 + Response_GET_FLAGS Response_Type = 2 + Response_GET_VERSION Response_Type = 3 + Response_GET_METRICS Response_Type = 4 + Response_GET_LOGGING_LEVEL Response_Type = 5 + Response_LIST_FILES Response_Type = 6 + Response_READ_FILE Response_Type = 7 + Response_GET_STATE Response_Type = 8 + Response_GET_CONTAINERS Response_Type = 9 + Response_GET_FRAMEWORKS Response_Type = 10 + Response_GET_EXECUTORS Response_Type = 11 + Response_GET_TASKS Response_Type = 12 + Response_GET_AGENT Response_Type = 14 + Response_GET_RESOURCE_PROVIDERS Response_Type = 16 + Response_WAIT_NESTED_CONTAINER Response_Type = 13 + Response_WAIT_CONTAINER Response_Type = 15 +) + +var Response_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "GET_HEALTH", + 2: "GET_FLAGS", + 3: "GET_VERSION", + 4: "GET_METRICS", + 5: "GET_LOGGING_LEVEL", + 6: "LIST_FILES", + 7: "READ_FILE", + 8: "GET_STATE", + 9: "GET_CONTAINERS", + 10: "GET_FRAMEWORKS", + 11: "GET_EXECUTORS", + 12: "GET_TASKS", + 14: "GET_AGENT", + 16: "GET_RESOURCE_PROVIDERS", + 13: "WAIT_NESTED_CONTAINER", + 15: "WAIT_CONTAINER", +} +var Response_Type_value = map[string]int32{ + "UNKNOWN": 0, + "GET_HEALTH": 1, + "GET_FLAGS": 2, + "GET_VERSION": 3, + "GET_METRICS": 4, + "GET_LOGGING_LEVEL": 5, + "LIST_FILES": 6, + "READ_FILE": 7, + "GET_STATE": 8, + "GET_CONTAINERS": 9, + "GET_FRAMEWORKS": 10, + "GET_EXECUTORS": 11, + "GET_TASKS": 12, + "GET_AGENT": 14, + "GET_RESOURCE_PROVIDERS": 16, + "WAIT_NESTED_CONTAINER": 13, + "WAIT_CONTAINER": 15, +} + +func (x Response_Type) Enum() *Response_Type { + p := new(Response_Type) + *p = x + return p +} +func (x Response_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(Response_Type_name, int32(x)) +} +func (x *Response_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Response_Type_value, data, "Response_Type") + if err != nil { + return err + } + *x = Response_Type(value) + return nil +} +func (Response_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorAgent, []int{1, 0} } + +type ProcessIO_Type int32 + +const ( + ProcessIO_UNKNOWN ProcessIO_Type = 0 + ProcessIO_DATA ProcessIO_Type = 1 + ProcessIO_CONTROL ProcessIO_Type = 2 +) + +var ProcessIO_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "DATA", + 2: "CONTROL", +} +var ProcessIO_Type_value = map[string]int32{ + "UNKNOWN": 0, + "DATA": 1, + "CONTROL": 2, +} + +func (x ProcessIO_Type) Enum() *ProcessIO_Type { + p := new(ProcessIO_Type) + *p = x + return p +} +func (x ProcessIO_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(ProcessIO_Type_name, int32(x)) +} +func (x *ProcessIO_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(ProcessIO_Type_value, data, "ProcessIO_Type") + if err != nil { + return err + } + *x = ProcessIO_Type(value) + return nil +} +func (ProcessIO_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorAgent, []int{2, 0} } + +type ProcessIO_Data_Type int32 + +const ( + ProcessIO_Data_UNKNOWN ProcessIO_Data_Type = 0 + ProcessIO_Data_STDIN ProcessIO_Data_Type = 1 + ProcessIO_Data_STDOUT ProcessIO_Data_Type = 2 + ProcessIO_Data_STDERR ProcessIO_Data_Type = 3 +) + +var ProcessIO_Data_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "STDIN", + 2: "STDOUT", + 3: "STDERR", +} +var ProcessIO_Data_Type_value = map[string]int32{ + "UNKNOWN": 0, + "STDIN": 1, + "STDOUT": 2, + "STDERR": 3, +} + +func (x ProcessIO_Data_Type) Enum() *ProcessIO_Data_Type { + p := new(ProcessIO_Data_Type) + *p = x + return p +} +func (x ProcessIO_Data_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(ProcessIO_Data_Type_name, int32(x)) +} +func (x *ProcessIO_Data_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(ProcessIO_Data_Type_value, data, "ProcessIO_Data_Type") + if err != nil { + return err + } + *x = ProcessIO_Data_Type(value) + return nil +} +func (ProcessIO_Data_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptorAgent, []int{2, 0, 0} +} + +type ProcessIO_Control_Type int32 + +const ( + ProcessIO_Control_UNKNOWN ProcessIO_Control_Type = 0 + ProcessIO_Control_TTY_INFO ProcessIO_Control_Type = 1 + ProcessIO_Control_HEARTBEAT ProcessIO_Control_Type = 2 +) + +var ProcessIO_Control_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "TTY_INFO", + 2: "HEARTBEAT", +} +var ProcessIO_Control_Type_value = map[string]int32{ + "UNKNOWN": 0, + "TTY_INFO": 1, + "HEARTBEAT": 2, +} + +func (x ProcessIO_Control_Type) Enum() *ProcessIO_Control_Type { + p := new(ProcessIO_Control_Type) + *p = x + return p +} +func (x ProcessIO_Control_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(ProcessIO_Control_Type_name, int32(x)) +} +func (x *ProcessIO_Control_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(ProcessIO_Control_Type_value, data, "ProcessIO_Control_Type") + if err != nil { + return err + } + *x = ProcessIO_Control_Type(value) + return nil +} +func (ProcessIO_Control_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptorAgent, []int{2, 1, 0} +} + +// * +// Calls that can be sent to the v1 agent API. +// +// A call is described using the standard protocol buffer "union" +// trick, see +// https://developers.google.com/protocol-buffers/docs/techniques#union. +type Call struct { + Type Call_Type `protobuf:"varint,1,opt,name=type,enum=mesos.agent.Call_Type" json:"type"` + GetMetrics *Call_GetMetrics `protobuf:"bytes,2,opt,name=get_metrics,json=getMetrics" json:"get_metrics,omitempty"` + SetLoggingLevel *Call_SetLoggingLevel `protobuf:"bytes,3,opt,name=set_logging_level,json=setLoggingLevel" json:"set_logging_level,omitempty"` + ListFiles *Call_ListFiles `protobuf:"bytes,4,opt,name=list_files,json=listFiles" json:"list_files,omitempty"` + ReadFile *Call_ReadFile `protobuf:"bytes,5,opt,name=read_file,json=readFile" json:"read_file,omitempty"` + GetContainers *Call_GetContainers `protobuf:"bytes,20,opt,name=get_containers,json=getContainers" json:"get_containers,omitempty"` + LaunchNestedContainer *Call_LaunchNestedContainer `protobuf:"bytes,6,opt,name=launch_nested_container,json=launchNestedContainer" json:"launch_nested_container,omitempty"` + WaitNestedContainer *Call_WaitNestedContainer `protobuf:"bytes,7,opt,name=wait_nested_container,json=waitNestedContainer" json:"wait_nested_container,omitempty"` + KillNestedContainer *Call_KillNestedContainer `protobuf:"bytes,8,opt,name=kill_nested_container,json=killNestedContainer" json:"kill_nested_container,omitempty"` + RemoveNestedContainer *Call_RemoveNestedContainer `protobuf:"bytes,12,opt,name=remove_nested_container,json=removeNestedContainer" json:"remove_nested_container,omitempty"` + LaunchNestedContainerSession *Call_LaunchNestedContainerSession `protobuf:"bytes,9,opt,name=launch_nested_container_session,json=launchNestedContainerSession" json:"launch_nested_container_session,omitempty"` + AttachContainerInput *Call_AttachContainerInput `protobuf:"bytes,10,opt,name=attach_container_input,json=attachContainerInput" json:"attach_container_input,omitempty"` + AttachContainerOutput *Call_AttachContainerOutput `protobuf:"bytes,11,opt,name=attach_container_output,json=attachContainerOutput" json:"attach_container_output,omitempty"` + LaunchContainer *Call_LaunchContainer `protobuf:"bytes,13,opt,name=launch_container,json=launchContainer" json:"launch_container,omitempty"` + WaitContainer *Call_WaitContainer `protobuf:"bytes,14,opt,name=wait_container,json=waitContainer" json:"wait_container,omitempty"` + KillContainer *Call_KillContainer `protobuf:"bytes,15,opt,name=kill_container,json=killContainer" json:"kill_container,omitempty"` + RemoveContainer *Call_RemoveContainer `protobuf:"bytes,16,opt,name=remove_container,json=removeContainer" json:"remove_container,omitempty"` + AddResourceProviderConfig *Call_AddResourceProviderConfig `protobuf:"bytes,17,opt,name=add_resource_provider_config,json=addResourceProviderConfig" json:"add_resource_provider_config,omitempty"` + UpdateResourceProviderConfig *Call_UpdateResourceProviderConfig `protobuf:"bytes,18,opt,name=update_resource_provider_config,json=updateResourceProviderConfig" json:"update_resource_provider_config,omitempty"` + RemoveResourceProviderConfig *Call_RemoveResourceProviderConfig `protobuf:"bytes,19,opt,name=remove_resource_provider_config,json=removeResourceProviderConfig" json:"remove_resource_provider_config,omitempty"` + PruneImages *Call_PruneImages `protobuf:"bytes,21,opt,name=prune_images,json=pruneImages" json:"prune_images,omitempty"` +} + +func (m *Call) Reset() { *m = Call{} } +func (*Call) ProtoMessage() {} +func (*Call) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{0} } + +func (m *Call) GetType() Call_Type { + if m != nil { + return m.Type + } + return Call_UNKNOWN +} + +func (m *Call) GetGetMetrics() *Call_GetMetrics { + if m != nil { + return m.GetMetrics + } + return nil +} + +func (m *Call) GetSetLoggingLevel() *Call_SetLoggingLevel { + if m != nil { + return m.SetLoggingLevel + } + return nil +} + +func (m *Call) GetListFiles() *Call_ListFiles { + if m != nil { + return m.ListFiles + } + return nil +} + +func (m *Call) GetReadFile() *Call_ReadFile { + if m != nil { + return m.ReadFile + } + return nil +} + +func (m *Call) GetGetContainers() *Call_GetContainers { + if m != nil { + return m.GetContainers + } + return nil +} + +func (m *Call) GetLaunchNestedContainer() *Call_LaunchNestedContainer { + if m != nil { + return m.LaunchNestedContainer + } + return nil +} + +func (m *Call) GetWaitNestedContainer() *Call_WaitNestedContainer { + if m != nil { + return m.WaitNestedContainer + } + return nil +} + +func (m *Call) GetKillNestedContainer() *Call_KillNestedContainer { + if m != nil { + return m.KillNestedContainer + } + return nil +} + +func (m *Call) GetRemoveNestedContainer() *Call_RemoveNestedContainer { + if m != nil { + return m.RemoveNestedContainer + } + return nil +} + +func (m *Call) GetLaunchNestedContainerSession() *Call_LaunchNestedContainerSession { + if m != nil { + return m.LaunchNestedContainerSession + } + return nil +} + +func (m *Call) GetAttachContainerInput() *Call_AttachContainerInput { + if m != nil { + return m.AttachContainerInput + } + return nil +} + +func (m *Call) GetAttachContainerOutput() *Call_AttachContainerOutput { + if m != nil { + return m.AttachContainerOutput + } + return nil +} + +func (m *Call) GetLaunchContainer() *Call_LaunchContainer { + if m != nil { + return m.LaunchContainer + } + return nil +} + +func (m *Call) GetWaitContainer() *Call_WaitContainer { + if m != nil { + return m.WaitContainer + } + return nil +} + +func (m *Call) GetKillContainer() *Call_KillContainer { + if m != nil { + return m.KillContainer + } + return nil +} + +func (m *Call) GetRemoveContainer() *Call_RemoveContainer { + if m != nil { + return m.RemoveContainer + } + return nil +} + +func (m *Call) GetAddResourceProviderConfig() *Call_AddResourceProviderConfig { + if m != nil { + return m.AddResourceProviderConfig + } + return nil +} + +func (m *Call) GetUpdateResourceProviderConfig() *Call_UpdateResourceProviderConfig { + if m != nil { + return m.UpdateResourceProviderConfig + } + return nil +} + +func (m *Call) GetRemoveResourceProviderConfig() *Call_RemoveResourceProviderConfig { + if m != nil { + return m.RemoveResourceProviderConfig + } + return nil +} + +func (m *Call) GetPruneImages() *Call_PruneImages { + if m != nil { + return m.PruneImages + } + return nil +} + +// Provides a snapshot of the current metrics tracked by the agent. +type Call_GetMetrics struct { + // If set, `timeout` would be used to determines the maximum amount of time + // the API will take to respond. If the timeout is exceeded, some metrics + // may not be included in the response. + Timeout *mesos.DurationInfo `protobuf:"bytes,1,opt,name=timeout" json:"timeout,omitempty"` +} + +func (m *Call_GetMetrics) Reset() { *m = Call_GetMetrics{} } +func (*Call_GetMetrics) ProtoMessage() {} +func (*Call_GetMetrics) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{0, 0} } + +func (m *Call_GetMetrics) GetTimeout() *mesos.DurationInfo { + if m != nil { + return m.Timeout + } + return nil +} + +// Sets the logging verbosity level for a specified duration. Mesos uses +// [glog](https://github.com/google/glog) for logging. The library only uses +// verbose logging which means nothing will be output unless the verbosity +// level is set (by default it's 0, libprocess uses levels 1, 2, and 3). +type Call_SetLoggingLevel struct { + // The verbosity level. + Level uint32 `protobuf:"varint,1,req,name=level" json:"level"` + // The duration to keep verbosity level toggled. After this duration, the + // verbosity level of log would revert to the original level. + Duration mesos.DurationInfo `protobuf:"bytes,2,req,name=duration" json:"duration"` +} + +func (m *Call_SetLoggingLevel) Reset() { *m = Call_SetLoggingLevel{} } +func (*Call_SetLoggingLevel) ProtoMessage() {} +func (*Call_SetLoggingLevel) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{0, 1} } + +func (m *Call_SetLoggingLevel) GetLevel() uint32 { + if m != nil { + return m.Level + } + return 0 +} + +func (m *Call_SetLoggingLevel) GetDuration() mesos.DurationInfo { + if m != nil { + return m.Duration + } + return mesos.DurationInfo{} +} + +// Provides the file listing for a directory. +type Call_ListFiles struct { + Path string `protobuf:"bytes,1,req,name=path" json:"path"` +} + +func (m *Call_ListFiles) Reset() { *m = Call_ListFiles{} } +func (*Call_ListFiles) ProtoMessage() {} +func (*Call_ListFiles) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{0, 2} } + +func (m *Call_ListFiles) GetPath() string { + if m != nil { + return m.Path + } + return "" +} + +// Reads data from a file. +type Call_ReadFile struct { + // The path of file. + Path string `protobuf:"bytes,1,req,name=path" json:"path"` + // Initial offset in file to start reading from. + Offset uint64 `protobuf:"varint,2,req,name=offset" json:"offset"` + // The maximum number of bytes to read. The read length is capped at 16 + // memory pages. + Length *uint64 `protobuf:"varint,3,opt,name=length" json:"length,omitempty"` +} + +func (m *Call_ReadFile) Reset() { *m = Call_ReadFile{} } +func (*Call_ReadFile) ProtoMessage() {} +func (*Call_ReadFile) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{0, 3} } + +func (m *Call_ReadFile) GetPath() string { + if m != nil { + return m.Path + } + return "" +} + +func (m *Call_ReadFile) GetOffset() uint64 { + if m != nil { + return m.Offset + } + return 0 +} + +func (m *Call_ReadFile) GetLength() uint64 { + if m != nil && m.Length != nil { + return *m.Length + } + return 0 +} + +// Lists active containers on the agent. +type Call_GetContainers struct { + ShowNested *bool `protobuf:"varint,1,opt,name=show_nested,json=showNested" json:"show_nested,omitempty"` + ShowStandalone *bool `protobuf:"varint,2,opt,name=show_standalone,json=showStandalone" json:"show_standalone,omitempty"` +} + +func (m *Call_GetContainers) Reset() { *m = Call_GetContainers{} } +func (*Call_GetContainers) ProtoMessage() {} +func (*Call_GetContainers) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{0, 4} } + +func (m *Call_GetContainers) GetShowNested() bool { + if m != nil && m.ShowNested != nil { + return *m.ShowNested + } + return false +} + +func (m *Call_GetContainers) GetShowStandalone() bool { + if m != nil && m.ShowStandalone != nil { + return *m.ShowStandalone + } + return false +} + +// Deprecated in favor of `LaunchContainer`. +type Call_LaunchNestedContainer struct { + ContainerID mesos.ContainerID `protobuf:"bytes,1,req,name=container_id,json=containerId" json:"container_id"` + Command *mesos.CommandInfo `protobuf:"bytes,2,opt,name=command" json:"command,omitempty"` + Container *mesos.ContainerInfo `protobuf:"bytes,3,opt,name=container" json:"container,omitempty"` +} + +func (m *Call_LaunchNestedContainer) Reset() { *m = Call_LaunchNestedContainer{} } +func (*Call_LaunchNestedContainer) ProtoMessage() {} +func (*Call_LaunchNestedContainer) Descriptor() ([]byte, []int) { + return fileDescriptorAgent, []int{0, 5} +} + +func (m *Call_LaunchNestedContainer) GetContainerID() mesos.ContainerID { + if m != nil { + return m.ContainerID + } + return mesos.ContainerID{} +} + +func (m *Call_LaunchNestedContainer) GetCommand() *mesos.CommandInfo { + if m != nil { + return m.Command + } + return nil +} + +func (m *Call_LaunchNestedContainer) GetContainer() *mesos.ContainerInfo { + if m != nil { + return m.Container + } + return nil +} + +// Deprecated in favor of `WaitContainer`. +type Call_WaitNestedContainer struct { + ContainerID mesos.ContainerID `protobuf:"bytes,1,req,name=container_id,json=containerId" json:"container_id"` +} + +func (m *Call_WaitNestedContainer) Reset() { *m = Call_WaitNestedContainer{} } +func (*Call_WaitNestedContainer) ProtoMessage() {} +func (*Call_WaitNestedContainer) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{0, 6} } + +func (m *Call_WaitNestedContainer) GetContainerID() mesos.ContainerID { + if m != nil { + return m.ContainerID + } + return mesos.ContainerID{} +} + +// Deprecated in favor of `KillContainer`. +type Call_KillNestedContainer struct { + ContainerID mesos.ContainerID `protobuf:"bytes,1,req,name=container_id,json=containerId" json:"container_id"` + Signal *int32 `protobuf:"varint,2,opt,name=signal" json:"signal,omitempty"` +} + +func (m *Call_KillNestedContainer) Reset() { *m = Call_KillNestedContainer{} } +func (*Call_KillNestedContainer) ProtoMessage() {} +func (*Call_KillNestedContainer) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{0, 7} } + +func (m *Call_KillNestedContainer) GetContainerID() mesos.ContainerID { + if m != nil { + return m.ContainerID + } + return mesos.ContainerID{} +} + +func (m *Call_KillNestedContainer) GetSignal() int32 { + if m != nil && m.Signal != nil { + return *m.Signal + } + return 0 +} + +// Deprecated in favor of `RemoveContainer`. +type Call_RemoveNestedContainer struct { + ContainerID mesos.ContainerID `protobuf:"bytes,1,req,name=container_id,json=containerId" json:"container_id"` +} + +func (m *Call_RemoveNestedContainer) Reset() { *m = Call_RemoveNestedContainer{} } +func (*Call_RemoveNestedContainer) ProtoMessage() {} +func (*Call_RemoveNestedContainer) Descriptor() ([]byte, []int) { + return fileDescriptorAgent, []int{0, 8} +} + +func (m *Call_RemoveNestedContainer) GetContainerID() mesos.ContainerID { + if m != nil { + return m.ContainerID + } + return mesos.ContainerID{} +} + +// Launches a nested container within an executor's tree of containers. +// The differences between this call and `LaunchNestedContainer` are: +// 1) The container's life-cycle is tied to the lifetime of the +// connection used to make this call, i.e., if the connection ever +// breaks, the container will be destroyed. +// 2) The nested container shares the same namespaces and cgroups as +// its parent container. +// 3) Results in a streaming response of type `ProcessIO`. So the call +// needs to be made on a persistent connection. +type Call_LaunchNestedContainerSession struct { + ContainerID mesos.ContainerID `protobuf:"bytes,1,req,name=container_id,json=containerId" json:"container_id"` + Command *mesos.CommandInfo `protobuf:"bytes,2,opt,name=command" json:"command,omitempty"` + Container *mesos.ContainerInfo `protobuf:"bytes,3,opt,name=container" json:"container,omitempty"` +} + +func (m *Call_LaunchNestedContainerSession) Reset() { *m = Call_LaunchNestedContainerSession{} } +func (*Call_LaunchNestedContainerSession) ProtoMessage() {} +func (*Call_LaunchNestedContainerSession) Descriptor() ([]byte, []int) { + return fileDescriptorAgent, []int{0, 9} +} + +func (m *Call_LaunchNestedContainerSession) GetContainerID() mesos.ContainerID { + if m != nil { + return m.ContainerID + } + return mesos.ContainerID{} +} + +func (m *Call_LaunchNestedContainerSession) GetCommand() *mesos.CommandInfo { + if m != nil { + return m.Command + } + return nil +} + +func (m *Call_LaunchNestedContainerSession) GetContainer() *mesos.ContainerInfo { + if m != nil { + return m.Container + } + return nil +} + +// Attaches the caller to the STDIN of the entry point of the container. +// Clients can use this to stream input data to a container. +// Note that this call needs to be made on a persistent connection by +// streaming a CONTAINER_ID message followed by one or more PROCESS_IO +// messages. +type Call_AttachContainerInput struct { + Type Call_AttachContainerInput_Type `protobuf:"varint,1,opt,name=type,enum=mesos.agent.Call_AttachContainerInput_Type" json:"type"` + ContainerID *mesos.ContainerID `protobuf:"bytes,2,opt,name=container_id,json=containerId" json:"container_id,omitempty"` + ProcessIO *ProcessIO `protobuf:"bytes,3,opt,name=process_io,json=processIo" json:"process_io,omitempty"` +} + +func (m *Call_AttachContainerInput) Reset() { *m = Call_AttachContainerInput{} } +func (*Call_AttachContainerInput) ProtoMessage() {} +func (*Call_AttachContainerInput) Descriptor() ([]byte, []int) { + return fileDescriptorAgent, []int{0, 10} +} + +func (m *Call_AttachContainerInput) GetType() Call_AttachContainerInput_Type { + if m != nil { + return m.Type + } + return Call_AttachContainerInput_UNKNOWN +} + +func (m *Call_AttachContainerInput) GetContainerID() *mesos.ContainerID { + if m != nil { + return m.ContainerID + } + return nil +} + +func (m *Call_AttachContainerInput) GetProcessIO() *ProcessIO { + if m != nil { + return m.ProcessIO + } + return nil +} + +// Attaches the caller to the STDOUT and STDERR of the entrypoint of +// the container. Clients can use this to stream output/error from the +// container. This call will result in a streaming response of `ProcessIO`; +// so this call needs to be made on a persistent connection. +type Call_AttachContainerOutput struct { + ContainerID mesos.ContainerID `protobuf:"bytes,1,req,name=container_id,json=containerId" json:"container_id"` +} + +func (m *Call_AttachContainerOutput) Reset() { *m = Call_AttachContainerOutput{} } +func (*Call_AttachContainerOutput) ProtoMessage() {} +func (*Call_AttachContainerOutput) Descriptor() ([]byte, []int) { + return fileDescriptorAgent, []int{0, 11} +} + +func (m *Call_AttachContainerOutput) GetContainerID() mesos.ContainerID { + if m != nil { + return m.ContainerID + } + return mesos.ContainerID{} +} + +// Launches a either a "standalone" container on this agent +// or a nested container within another tree of containers. +// +// A standalone container is launched by specifying a ContainerID +// with no parent. Standalone containers bypass the normal offer cycle +// between the master and agent. Unlike other containers, a standalone +// container does not have an executor or any tasks. This means the +// standalone container does not report back to Mesos or any framework +// and must be supervised separately. +// +// A nested container is launched by specifying a ContainerID with +// another existing container (including standalone containers) +// as the parent. +// +// Returns 200 OK if the new container launch succeeds. +// Returns 202 Accepted if the requested ContainerID is already in use +// by a standalone or nested container. +// Returns 400 Bad Request if the container launch fails. +type Call_LaunchContainer struct { + // NOTE: Some characters cannot be used in the ID. All characters + // must be valid filesystem path characters. In addition, '/' and '.' + // are reserved. + ContainerID mesos.ContainerID `protobuf:"bytes,1,req,name=container_id,json=containerId" json:"container_id"` + Command *mesos.CommandInfo `protobuf:"bytes,2,opt,name=command" json:"command,omitempty"` + // NOTE: Nested containers may not specify resources and instead + // share resources with its parent container. + // + // TODO(josephw): These resources are purely used for isolation + // and are not accounted for by the Mesos master (if connected). + // It is the caller's responsibility to ensure that resources are + // not overcommitted (e.g. CPU and memory) or conflicting (e.g. ports + // and volumes). Once there is support for preempting tasks and a + // way to update the resources advertised by the agent, these standalone + // container resources should be accounted for by the master. + Resources []mesos.Resource `protobuf:"bytes,3,rep,name=resources" json:"resources"` + Container *mesos.ContainerInfo `protobuf:"bytes,4,opt,name=container" json:"container,omitempty"` +} + +func (m *Call_LaunchContainer) Reset() { *m = Call_LaunchContainer{} } +func (*Call_LaunchContainer) ProtoMessage() {} +func (*Call_LaunchContainer) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{0, 12} } + +func (m *Call_LaunchContainer) GetContainerID() mesos.ContainerID { + if m != nil { + return m.ContainerID + } + return mesos.ContainerID{} +} + +func (m *Call_LaunchContainer) GetCommand() *mesos.CommandInfo { + if m != nil { + return m.Command + } + return nil +} + +func (m *Call_LaunchContainer) GetResources() []mesos.Resource { + if m != nil { + return m.Resources + } + return nil +} + +func (m *Call_LaunchContainer) GetContainer() *mesos.ContainerInfo { + if m != nil { + return m.Container + } + return nil +} + +// Waits for the standalone or nested container to terminate +// and returns the exit status. +// +// Returns 200 OK if and when the container exits. +// Returns 404 Not Found if the container does not exist. +type Call_WaitContainer struct { + ContainerID mesos.ContainerID `protobuf:"bytes,1,req,name=container_id,json=containerId" json:"container_id"` +} + +func (m *Call_WaitContainer) Reset() { *m = Call_WaitContainer{} } +func (*Call_WaitContainer) ProtoMessage() {} +func (*Call_WaitContainer) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{0, 13} } + +func (m *Call_WaitContainer) GetContainerID() mesos.ContainerID { + if m != nil { + return m.ContainerID + } + return mesos.ContainerID{} +} + +// Kills the standalone or nested container. The signal to be sent +// to the container can be specified in the 'signal' field. +// +// Returns 200 OK if the signal is sent successfully. +// Returns 404 Not Found if the container does not exist. +type Call_KillContainer struct { + ContainerID mesos.ContainerID `protobuf:"bytes,1,req,name=container_id,json=containerId" json:"container_id"` + // Defaults to SIGKILL. + Signal *int32 `protobuf:"varint,2,opt,name=signal" json:"signal,omitempty"` +} + +func (m *Call_KillContainer) Reset() { *m = Call_KillContainer{} } +func (*Call_KillContainer) ProtoMessage() {} +func (*Call_KillContainer) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{0, 14} } + +func (m *Call_KillContainer) GetContainerID() mesos.ContainerID { + if m != nil { + return m.ContainerID + } + return mesos.ContainerID{} +} + +func (m *Call_KillContainer) GetSignal() int32 { + if m != nil && m.Signal != nil { + return *m.Signal + } + return 0 +} + +// Removes a container's artifacts (runtime and sandbox directories). +// +// For nested containers, it is important to use this call if multiple +// nested containers are launched under the same parent container, because +// garbage collection only takes place at the parent container. Artifacts +// belonging to nested containers will not be garbage collected while +// the parent container is running. +// +// TODO(josephw): A standalone container's runtime directory is currently +// garbage collected as soon as the container exits. To allow the user to +// retrieve the exit status reliably, the runtime directory cannot be +// garbage collected immediately. Instead, the user will eventually be +// required to make this call after the standalone container has exited. +// Also, a standalone container's sandbox directory is currently not +// garbage collected and is only deleted via this call. +// +// Returns 200 OK if the removal is successful or if the parent container +// (for nested containers) does not exist. +// Returns 500 Internal Server Error if anything goes wrong, including +// if the container is still running or does not exist. +// +// TODO(josephw): Consider returning a 400 Bad Request instead of 500 +// Internal Server Error when the user tries to remove a running or +// nonexistent nested container. +type Call_RemoveContainer struct { + ContainerID mesos.ContainerID `protobuf:"bytes,1,req,name=container_id,json=containerId" json:"container_id"` +} + +func (m *Call_RemoveContainer) Reset() { *m = Call_RemoveContainer{} } +func (*Call_RemoveContainer) ProtoMessage() {} +func (*Call_RemoveContainer) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{0, 15} } + +func (m *Call_RemoveContainer) GetContainerID() mesos.ContainerID { + if m != nil { + return m.ContainerID + } + return mesos.ContainerID{} +} + +// Adds a new resource provider config file. +// +// The content of the `info` field will be written into a new config file in +// the resource provider config directory, and a new resource provider will be +// launched asynchronously based on the config. Callers must not set the +// `info.id` field. This call is idempotent, so if a config file identical to +// the content of the `info` field already exists, this call will return +// without launching a resource provider. Note that if a config file is +// placed into the resource provider config directory out-of-band after the +// agent starts up, it will not be checked against this call. +// +// Returns 200 OK if a new config file is created, or an identical config file +// exists. +// Returns 400 Bad Request if `info` is not well-formed. +// Returns 403 Forbidden if the call is not authorized. +// Returns 409 Conflict if another config file that describes a +// resource provider of the same type and name exists, but the content is +// not identical. +// Returns 500 Internal Server Error if anything goes wrong. +type Call_AddResourceProviderConfig struct { + Info mesos.ResourceProviderInfo `protobuf:"bytes,1,req,name=info" json:"info"` +} + +func (m *Call_AddResourceProviderConfig) Reset() { *m = Call_AddResourceProviderConfig{} } +func (*Call_AddResourceProviderConfig) ProtoMessage() {} +func (*Call_AddResourceProviderConfig) Descriptor() ([]byte, []int) { + return fileDescriptorAgent, []int{0, 16} +} + +func (m *Call_AddResourceProviderConfig) GetInfo() mesos.ResourceProviderInfo { + if m != nil { + return m.Info + } + return mesos.ResourceProviderInfo{} +} + +// Updates an existing resource provider config file. +// +// The content of the `info` field will be written into an existing config +// file that describes a resource provider of the specified type and name in +// the resource provider config directory, and the corresponding resource +// provider will be relaunched asynchronously to reflect the changes in the +// config. Callers must not set the `info.id` field. This call is idempotent, +// so if there is no change in the config, this call will return without +// relaunching the resource provider. Note that if a config file is placed +// into the resource provider config directory out-of-band after the agent +// starts up, it will not be checked against this call. +// +// Returns 200 OK if an existing config file is updated, or there is no change +// in the config file. +// Returns 400 Bad Request if `info` is not well-formed. +// Returns 403 Forbidden if the call is not authorized. +// Returns 404 Not Found if no config file describes a resource +// provider of the same type and name exists. +// Returns 500 Internal Server Error if anything goes wrong. +type Call_UpdateResourceProviderConfig struct { + Info mesos.ResourceProviderInfo `protobuf:"bytes,1,req,name=info" json:"info"` +} + +func (m *Call_UpdateResourceProviderConfig) Reset() { *m = Call_UpdateResourceProviderConfig{} } +func (*Call_UpdateResourceProviderConfig) ProtoMessage() {} +func (*Call_UpdateResourceProviderConfig) Descriptor() ([]byte, []int) { + return fileDescriptorAgent, []int{0, 17} +} + +func (m *Call_UpdateResourceProviderConfig) GetInfo() mesos.ResourceProviderInfo { + if m != nil { + return m.Info + } + return mesos.ResourceProviderInfo{} +} + +// Removes a config file from the resource provider config directory. +// +// The config file that describes the resource provider of the specified type +// and name will be removed, and the corresponding resource provider will be +// terminated asynchronously. This call is idempotent, so if no matching +// config file exists, this call will return without terminating any resource +// provider. Note that if a config file is placed into the resource provider +// config directory out-of-band after the agent starts up, it will not be +// checked against this call. +// +// Returns 200 OK if the config file is removed, or no matching config file +// exists. +// Returns 403 Forbidden if the call is not authorized. +// Returns 500 Internal Server Error if anything goes wrong. +type Call_RemoveResourceProviderConfig struct { + Type string `protobuf:"bytes,1,req,name=type" json:"type"` + Name string `protobuf:"bytes,2,req,name=name" json:"name"` +} + +func (m *Call_RemoveResourceProviderConfig) Reset() { *m = Call_RemoveResourceProviderConfig{} } +func (*Call_RemoveResourceProviderConfig) ProtoMessage() {} +func (*Call_RemoveResourceProviderConfig) Descriptor() ([]byte, []int) { + return fileDescriptorAgent, []int{0, 18} +} + +func (m *Call_RemoveResourceProviderConfig) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *Call_RemoveResourceProviderConfig) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +// Prune unused container images from image store. +// +// Images and layers referenced by active containers as well as +// image references specified in `excluded_images` will not be pruned. +type Call_PruneImages struct { + ExcludedImages []mesos.Image `protobuf:"bytes,1,rep,name=excluded_images,json=excludedImages" json:"excluded_images"` +} + +func (m *Call_PruneImages) Reset() { *m = Call_PruneImages{} } +func (*Call_PruneImages) ProtoMessage() {} +func (*Call_PruneImages) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{0, 19} } + +func (m *Call_PruneImages) GetExcludedImages() []mesos.Image { + if m != nil { + return m.ExcludedImages + } + return nil +} + +// * +// Synchronous responses for all calls made to the v1 agent API. +type Response struct { + Type Response_Type `protobuf:"varint,1,opt,name=type,enum=mesos.agent.Response_Type" json:"type"` + GetHealth *Response_GetHealth `protobuf:"bytes,2,opt,name=get_health,json=getHealth" json:"get_health,omitempty"` + GetFlags *Response_GetFlags `protobuf:"bytes,3,opt,name=get_flags,json=getFlags" json:"get_flags,omitempty"` + GetVersion *Response_GetVersion `protobuf:"bytes,4,opt,name=get_version,json=getVersion" json:"get_version,omitempty"` + GetMetrics *Response_GetMetrics `protobuf:"bytes,5,opt,name=get_metrics,json=getMetrics" json:"get_metrics,omitempty"` + GetLoggingLevel *Response_GetLoggingLevel `protobuf:"bytes,6,opt,name=get_logging_level,json=getLoggingLevel" json:"get_logging_level,omitempty"` + ListFiles *Response_ListFiles `protobuf:"bytes,7,opt,name=list_files,json=listFiles" json:"list_files,omitempty"` + ReadFile *Response_ReadFile `protobuf:"bytes,8,opt,name=read_file,json=readFile" json:"read_file,omitempty"` + GetState *Response_GetState `protobuf:"bytes,9,opt,name=get_state,json=getState" json:"get_state,omitempty"` + GetContainers *Response_GetContainers `protobuf:"bytes,10,opt,name=get_containers,json=getContainers" json:"get_containers,omitempty"` + GetFrameworks *Response_GetFrameworks `protobuf:"bytes,11,opt,name=get_frameworks,json=getFrameworks" json:"get_frameworks,omitempty"` + GetExecutors *Response_GetExecutors `protobuf:"bytes,12,opt,name=get_executors,json=getExecutors" json:"get_executors,omitempty"` + GetTasks *Response_GetTasks `protobuf:"bytes,13,opt,name=get_tasks,json=getTasks" json:"get_tasks,omitempty"` + GetAgent *Response_GetAgent `protobuf:"bytes,15,opt,name=get_agent,json=getAgent" json:"get_agent,omitempty"` + GetResourceProviders *Response_GetResourceProviders `protobuf:"bytes,17,opt,name=get_resource_providers,json=getResourceProviders" json:"get_resource_providers,omitempty"` + WaitNestedContainer *Response_WaitNestedContainer `protobuf:"bytes,14,opt,name=wait_nested_container,json=waitNestedContainer" json:"wait_nested_container,omitempty"` + WaitContainer *Response_WaitContainer `protobuf:"bytes,16,opt,name=wait_container,json=waitContainer" json:"wait_container,omitempty"` +} + +func (m *Response) Reset() { *m = Response{} } +func (*Response) ProtoMessage() {} +func (*Response) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{1} } + +func (m *Response) GetType() Response_Type { + if m != nil { + return m.Type + } + return Response_UNKNOWN +} + +func (m *Response) GetGetHealth() *Response_GetHealth { + if m != nil { + return m.GetHealth + } + return nil +} + +func (m *Response) GetGetFlags() *Response_GetFlags { + if m != nil { + return m.GetFlags + } + return nil +} + +func (m *Response) GetGetVersion() *Response_GetVersion { + if m != nil { + return m.GetVersion + } + return nil +} + +func (m *Response) GetGetMetrics() *Response_GetMetrics { + if m != nil { + return m.GetMetrics + } + return nil +} + +func (m *Response) GetGetLoggingLevel() *Response_GetLoggingLevel { + if m != nil { + return m.GetLoggingLevel + } + return nil +} + +func (m *Response) GetListFiles() *Response_ListFiles { + if m != nil { + return m.ListFiles + } + return nil +} + +func (m *Response) GetReadFile() *Response_ReadFile { + if m != nil { + return m.ReadFile + } + return nil +} + +func (m *Response) GetGetState() *Response_GetState { + if m != nil { + return m.GetState + } + return nil +} + +func (m *Response) GetGetContainers() *Response_GetContainers { + if m != nil { + return m.GetContainers + } + return nil +} + +func (m *Response) GetGetFrameworks() *Response_GetFrameworks { + if m != nil { + return m.GetFrameworks + } + return nil +} + +func (m *Response) GetGetExecutors() *Response_GetExecutors { + if m != nil { + return m.GetExecutors + } + return nil +} + +func (m *Response) GetGetTasks() *Response_GetTasks { + if m != nil { + return m.GetTasks + } + return nil +} + +func (m *Response) GetGetAgent() *Response_GetAgent { + if m != nil { + return m.GetAgent + } + return nil +} + +func (m *Response) GetGetResourceProviders() *Response_GetResourceProviders { + if m != nil { + return m.GetResourceProviders + } + return nil +} + +func (m *Response) GetWaitNestedContainer() *Response_WaitNestedContainer { + if m != nil { + return m.WaitNestedContainer + } + return nil +} + +func (m *Response) GetWaitContainer() *Response_WaitContainer { + if m != nil { + return m.WaitContainer + } + return nil +} + +// `healthy` would be true if the agent is healthy. Delayed responses are also +// indicative of the poor health of the agent. +type Response_GetHealth struct { + Healthy bool `protobuf:"varint,1,req,name=healthy" json:"healthy"` +} + +func (m *Response_GetHealth) Reset() { *m = Response_GetHealth{} } +func (*Response_GetHealth) ProtoMessage() {} +func (*Response_GetHealth) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{1, 0} } + +func (m *Response_GetHealth) GetHealthy() bool { + if m != nil { + return m.Healthy + } + return false +} + +// Contains the flag configuration of the agent. +type Response_GetFlags struct { + Flags []mesos.Flag `protobuf:"bytes,1,rep,name=flags" json:"flags"` +} + +func (m *Response_GetFlags) Reset() { *m = Response_GetFlags{} } +func (*Response_GetFlags) ProtoMessage() {} +func (*Response_GetFlags) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{1, 1} } + +func (m *Response_GetFlags) GetFlags() []mesos.Flag { + if m != nil { + return m.Flags + } + return nil +} + +// Contains the version information of the agent. +type Response_GetVersion struct { + VersionInfo mesos.VersionInfo `protobuf:"bytes,1,req,name=version_info,json=versionInfo" json:"version_info"` +} + +func (m *Response_GetVersion) Reset() { *m = Response_GetVersion{} } +func (*Response_GetVersion) ProtoMessage() {} +func (*Response_GetVersion) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{1, 2} } + +func (m *Response_GetVersion) GetVersionInfo() mesos.VersionInfo { + if m != nil { + return m.VersionInfo + } + return mesos.VersionInfo{} +} + +// Contains a snapshot of the current metrics. +type Response_GetMetrics struct { + Metrics []mesos.Metric `protobuf:"bytes,1,rep,name=metrics" json:"metrics"` +} + +func (m *Response_GetMetrics) Reset() { *m = Response_GetMetrics{} } +func (*Response_GetMetrics) ProtoMessage() {} +func (*Response_GetMetrics) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{1, 3} } + +func (m *Response_GetMetrics) GetMetrics() []mesos.Metric { + if m != nil { + return m.Metrics + } + return nil +} + +// Contains the logging level of the agent. +type Response_GetLoggingLevel struct { + Level uint32 `protobuf:"varint,1,req,name=level" json:"level"` +} + +func (m *Response_GetLoggingLevel) Reset() { *m = Response_GetLoggingLevel{} } +func (*Response_GetLoggingLevel) ProtoMessage() {} +func (*Response_GetLoggingLevel) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{1, 4} } + +func (m *Response_GetLoggingLevel) GetLevel() uint32 { + if m != nil { + return m.Level + } + return 0 +} + +// Contains the file listing(similar to `ls -l`) for a directory. +type Response_ListFiles struct { + FileInfos []mesos.FileInfo `protobuf:"bytes,1,rep,name=file_infos,json=fileInfos" json:"file_infos"` +} + +func (m *Response_ListFiles) Reset() { *m = Response_ListFiles{} } +func (*Response_ListFiles) ProtoMessage() {} +func (*Response_ListFiles) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{1, 5} } + +func (m *Response_ListFiles) GetFileInfos() []mesos.FileInfo { + if m != nil { + return m.FileInfos + } + return nil +} + +// Contains the file data. +type Response_ReadFile struct { + // The size of file (in bytes). + Size uint64 `protobuf:"varint,1,req,name=size" json:"size"` + Data []byte `protobuf:"bytes,2,req,name=data" json:"data,omitempty"` +} + +func (m *Response_ReadFile) Reset() { *m = Response_ReadFile{} } +func (*Response_ReadFile) ProtoMessage() {} +func (*Response_ReadFile) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{1, 6} } + +func (m *Response_ReadFile) GetSize() uint64 { + if m != nil { + return m.Size + } + return 0 +} + +func (m *Response_ReadFile) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +// Contains full state of the agent i.e. information about the tasks, +// frameworks and executors running in the cluster. +type Response_GetState struct { + GetTasks *Response_GetTasks `protobuf:"bytes,1,opt,name=get_tasks,json=getTasks" json:"get_tasks,omitempty"` + GetExecutors *Response_GetExecutors `protobuf:"bytes,2,opt,name=get_executors,json=getExecutors" json:"get_executors,omitempty"` + GetFrameworks *Response_GetFrameworks `protobuf:"bytes,3,opt,name=get_frameworks,json=getFrameworks" json:"get_frameworks,omitempty"` +} + +func (m *Response_GetState) Reset() { *m = Response_GetState{} } +func (*Response_GetState) ProtoMessage() {} +func (*Response_GetState) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{1, 7} } + +func (m *Response_GetState) GetGetTasks() *Response_GetTasks { + if m != nil { + return m.GetTasks + } + return nil +} + +func (m *Response_GetState) GetGetExecutors() *Response_GetExecutors { + if m != nil { + return m.GetExecutors + } + return nil +} + +func (m *Response_GetState) GetGetFrameworks() *Response_GetFrameworks { + if m != nil { + return m.GetFrameworks + } + return nil +} + +// Information about containers running on this agent. It contains +// ContainerStatus and ResourceStatistics along with some metadata +// of the containers. +type Response_GetContainers struct { + Containers []Response_GetContainers_Container `protobuf:"bytes,1,rep,name=containers" json:"containers"` +} + +func (m *Response_GetContainers) Reset() { *m = Response_GetContainers{} } +func (*Response_GetContainers) ProtoMessage() {} +func (*Response_GetContainers) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{1, 8} } + +func (m *Response_GetContainers) GetContainers() []Response_GetContainers_Container { + if m != nil { + return m.Containers + } + return nil +} + +type Response_GetContainers_Container struct { + FrameworkID *mesos.FrameworkID `protobuf:"bytes,1,opt,name=framework_id,json=frameworkId" json:"framework_id,omitempty"` + ExecutorID *mesos.ExecutorID `protobuf:"bytes,2,opt,name=executor_id,json=executorId" json:"executor_id,omitempty"` + ExecutorName *string `protobuf:"bytes,3,opt,name=executor_name,json=executorName" json:"executor_name,omitempty"` + ContainerID mesos.ContainerID `protobuf:"bytes,4,req,name=container_id,json=containerId" json:"container_id"` + ContainerStatus *mesos.ContainerStatus `protobuf:"bytes,5,opt,name=container_status,json=containerStatus" json:"container_status,omitempty"` + ResourceStatistics *mesos.ResourceStatistics `protobuf:"bytes,6,opt,name=resource_statistics,json=resourceStatistics" json:"resource_statistics,omitempty"` +} + +func (m *Response_GetContainers_Container) Reset() { *m = Response_GetContainers_Container{} } +func (*Response_GetContainers_Container) ProtoMessage() {} +func (*Response_GetContainers_Container) Descriptor() ([]byte, []int) { + return fileDescriptorAgent, []int{1, 8, 0} +} + +func (m *Response_GetContainers_Container) GetFrameworkID() *mesos.FrameworkID { + if m != nil { + return m.FrameworkID + } + return nil +} + +func (m *Response_GetContainers_Container) GetExecutorID() *mesos.ExecutorID { + if m != nil { + return m.ExecutorID + } + return nil +} + +func (m *Response_GetContainers_Container) GetExecutorName() string { + if m != nil && m.ExecutorName != nil { + return *m.ExecutorName + } + return "" +} + +func (m *Response_GetContainers_Container) GetContainerID() mesos.ContainerID { + if m != nil { + return m.ContainerID + } + return mesos.ContainerID{} +} + +func (m *Response_GetContainers_Container) GetContainerStatus() *mesos.ContainerStatus { + if m != nil { + return m.ContainerStatus + } + return nil +} + +func (m *Response_GetContainers_Container) GetResourceStatistics() *mesos.ResourceStatistics { + if m != nil { + return m.ResourceStatistics + } + return nil +} + +// Information about all the frameworks known to the agent at the current +// time. +type Response_GetFrameworks struct { + Frameworks []Response_GetFrameworks_Framework `protobuf:"bytes,1,rep,name=frameworks" json:"frameworks"` + CompletedFrameworks []Response_GetFrameworks_Framework `protobuf:"bytes,2,rep,name=completed_frameworks,json=completedFrameworks" json:"completed_frameworks"` +} + +func (m *Response_GetFrameworks) Reset() { *m = Response_GetFrameworks{} } +func (*Response_GetFrameworks) ProtoMessage() {} +func (*Response_GetFrameworks) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{1, 9} } + +func (m *Response_GetFrameworks) GetFrameworks() []Response_GetFrameworks_Framework { + if m != nil { + return m.Frameworks + } + return nil +} + +func (m *Response_GetFrameworks) GetCompletedFrameworks() []Response_GetFrameworks_Framework { + if m != nil { + return m.CompletedFrameworks + } + return nil +} + +type Response_GetFrameworks_Framework struct { + FrameworkInfo mesos.FrameworkInfo `protobuf:"bytes,1,req,name=framework_info,json=frameworkInfo" json:"framework_info"` +} + +func (m *Response_GetFrameworks_Framework) Reset() { *m = Response_GetFrameworks_Framework{} } +func (*Response_GetFrameworks_Framework) ProtoMessage() {} +func (*Response_GetFrameworks_Framework) Descriptor() ([]byte, []int) { + return fileDescriptorAgent, []int{1, 9, 0} +} + +func (m *Response_GetFrameworks_Framework) GetFrameworkInfo() mesos.FrameworkInfo { + if m != nil { + return m.FrameworkInfo + } + return mesos.FrameworkInfo{} +} + +// Lists information about all the executors known to the agent at the +// current time. +type Response_GetExecutors struct { + Executors []Response_GetExecutors_Executor `protobuf:"bytes,1,rep,name=executors" json:"executors"` + CompletedExecutors []Response_GetExecutors_Executor `protobuf:"bytes,2,rep,name=completed_executors,json=completedExecutors" json:"completed_executors"` +} + +func (m *Response_GetExecutors) Reset() { *m = Response_GetExecutors{} } +func (*Response_GetExecutors) ProtoMessage() {} +func (*Response_GetExecutors) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{1, 10} } + +func (m *Response_GetExecutors) GetExecutors() []Response_GetExecutors_Executor { + if m != nil { + return m.Executors + } + return nil +} + +func (m *Response_GetExecutors) GetCompletedExecutors() []Response_GetExecutors_Executor { + if m != nil { + return m.CompletedExecutors + } + return nil +} + +type Response_GetExecutors_Executor struct { + ExecutorInfo mesos.ExecutorInfo `protobuf:"bytes,1,req,name=executor_info,json=executorInfo" json:"executor_info"` +} + +func (m *Response_GetExecutors_Executor) Reset() { *m = Response_GetExecutors_Executor{} } +func (*Response_GetExecutors_Executor) ProtoMessage() {} +func (*Response_GetExecutors_Executor) Descriptor() ([]byte, []int) { + return fileDescriptorAgent, []int{1, 10, 0} +} + +func (m *Response_GetExecutors_Executor) GetExecutorInfo() mesos.ExecutorInfo { + if m != nil { + return m.ExecutorInfo + } + return mesos.ExecutorInfo{} +} + +// Lists information about all the tasks known to the agent at the current +// time. +type Response_GetTasks struct { + // Tasks that are pending in the agent's queue before an executor is + // launched. + PendingTasks []mesos.Task `protobuf:"bytes,1,rep,name=pending_tasks,json=pendingTasks" json:"pending_tasks"` + // Tasks that are enqueued for a launched executor that has not yet + // registered. + QueuedTasks []mesos.Task `protobuf:"bytes,2,rep,name=queued_tasks,json=queuedTasks" json:"queued_tasks"` + // Tasks that are running. + LaunchedTasks []mesos.Task `protobuf:"bytes,3,rep,name=launched_tasks,json=launchedTasks" json:"launched_tasks"` + // Tasks that are terminated but pending updates. + TerminatedTasks []mesos.Task `protobuf:"bytes,4,rep,name=terminated_tasks,json=terminatedTasks" json:"terminated_tasks"` + // Tasks that are terminated and updates acked. + CompletedTasks []mesos.Task `protobuf:"bytes,5,rep,name=completed_tasks,json=completedTasks" json:"completed_tasks"` +} + +func (m *Response_GetTasks) Reset() { *m = Response_GetTasks{} } +func (*Response_GetTasks) ProtoMessage() {} +func (*Response_GetTasks) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{1, 11} } + +func (m *Response_GetTasks) GetPendingTasks() []mesos.Task { + if m != nil { + return m.PendingTasks + } + return nil +} + +func (m *Response_GetTasks) GetQueuedTasks() []mesos.Task { + if m != nil { + return m.QueuedTasks + } + return nil +} + +func (m *Response_GetTasks) GetLaunchedTasks() []mesos.Task { + if m != nil { + return m.LaunchedTasks + } + return nil +} + +func (m *Response_GetTasks) GetTerminatedTasks() []mesos.Task { + if m != nil { + return m.TerminatedTasks + } + return nil +} + +func (m *Response_GetTasks) GetCompletedTasks() []mesos.Task { + if m != nil { + return m.CompletedTasks + } + return nil +} + +// Contains the agent's information. +type Response_GetAgent struct { + AgentInfo *mesos.AgentInfo `protobuf:"bytes,1,opt,name=agent_info,json=agentInfo" json:"agent_info,omitempty"` +} + +func (m *Response_GetAgent) Reset() { *m = Response_GetAgent{} } +func (*Response_GetAgent) ProtoMessage() {} +func (*Response_GetAgent) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{1, 12} } + +func (m *Response_GetAgent) GetAgentInfo() *mesos.AgentInfo { + if m != nil { + return m.AgentInfo + } + return nil +} + +// Lists information about all resource providers known to the agent +// at the current time. +type Response_GetResourceProviders struct { + ResourceProviders []Response_GetResourceProviders_ResourceProvider `protobuf:"bytes,1,rep,name=resource_providers,json=resourceProviders" json:"resource_providers"` +} + +func (m *Response_GetResourceProviders) Reset() { *m = Response_GetResourceProviders{} } +func (*Response_GetResourceProviders) ProtoMessage() {} +func (*Response_GetResourceProviders) Descriptor() ([]byte, []int) { + return fileDescriptorAgent, []int{1, 13} +} + +func (m *Response_GetResourceProviders) GetResourceProviders() []Response_GetResourceProviders_ResourceProvider { + if m != nil { + return m.ResourceProviders + } + return nil +} + +type Response_GetResourceProviders_ResourceProvider struct { + ResourceProviderInfo mesos.ResourceProviderInfo `protobuf:"bytes,1,req,name=resource_provider_info,json=resourceProviderInfo" json:"resource_provider_info"` +} + +func (m *Response_GetResourceProviders_ResourceProvider) Reset() { + *m = Response_GetResourceProviders_ResourceProvider{} +} +func (*Response_GetResourceProviders_ResourceProvider) ProtoMessage() {} +func (*Response_GetResourceProviders_ResourceProvider) Descriptor() ([]byte, []int) { + return fileDescriptorAgent, []int{1, 13, 0} +} + +func (m *Response_GetResourceProviders_ResourceProvider) GetResourceProviderInfo() mesos.ResourceProviderInfo { + if m != nil { + return m.ResourceProviderInfo + } + return mesos.ResourceProviderInfo{} +} + +// Returns termination information about the nested container. +type Response_WaitNestedContainer struct { + // Wait status of the lead process in the container. Note that this + // is the return value of `wait(2)`, so callers must use the `wait(2)` + // family of macros to extract whether the process exited cleanly and + // what the exit code was. + ExitStatus *int32 `protobuf:"varint,1,opt,name=exit_status,json=exitStatus" json:"exit_status,omitempty"` + // The `state` and `reason` fields may be populated if the Mesos agent + // terminates the container. In the absence of any special knowledge, + // executors should propagate this information via the `status` field + // of an `Update` call for the corresponding TaskID. + State *mesos.TaskState `protobuf:"varint,2,opt,name=state,enum=mesos.TaskState" json:"state,omitempty"` + Reason *mesos.TaskStatus_Reason `protobuf:"varint,3,opt,name=reason,enum=mesos.TaskStatus_Reason" json:"reason,omitempty"` + // This field will be populated if the task was terminated due to + // a resource limitation. + Limitation *mesos.TaskResourceLimitation `protobuf:"bytes,4,opt,name=limitation" json:"limitation,omitempty"` + Message *string `protobuf:"bytes,5,opt,name=message" json:"message,omitempty"` +} + +func (m *Response_WaitNestedContainer) Reset() { *m = Response_WaitNestedContainer{} } +func (*Response_WaitNestedContainer) ProtoMessage() {} +func (*Response_WaitNestedContainer) Descriptor() ([]byte, []int) { + return fileDescriptorAgent, []int{1, 14} +} + +func (m *Response_WaitNestedContainer) GetExitStatus() int32 { + if m != nil && m.ExitStatus != nil { + return *m.ExitStatus + } + return 0 +} + +func (m *Response_WaitNestedContainer) GetState() mesos.TaskState { + if m != nil && m.State != nil { + return *m.State + } + return mesos.TASK_STAGING +} + +func (m *Response_WaitNestedContainer) GetReason() mesos.TaskStatus_Reason { + if m != nil && m.Reason != nil { + return *m.Reason + } + return mesos.REASON_COMMAND_EXECUTOR_FAILED +} + +func (m *Response_WaitNestedContainer) GetLimitation() *mesos.TaskResourceLimitation { + if m != nil { + return m.Limitation + } + return nil +} + +func (m *Response_WaitNestedContainer) GetMessage() string { + if m != nil && m.Message != nil { + return *m.Message + } + return "" +} + +// Returns termination information about the standalone or nested container. +type Response_WaitContainer struct { + // Wait status of the lead process in the container. Note that this + // is the return value of `wait(2)`, so callers must use the `wait(2)` + // family of macros to extract whether the process exited cleanly and + // what the exit code was. + ExitStatus *int32 `protobuf:"varint,1,opt,name=exit_status,json=exitStatus" json:"exit_status,omitempty"` + // The `state` and `reason` fields may be populated if the Mesos agent + // terminates the container. In the absence of any special knowledge, + // executors should propagate this information via the `status` field + // of an `Update` call for the corresponding TaskID. + State *mesos.TaskState `protobuf:"varint,2,opt,name=state,enum=mesos.TaskState" json:"state,omitempty"` + Reason *mesos.TaskStatus_Reason `protobuf:"varint,3,opt,name=reason,enum=mesos.TaskStatus_Reason" json:"reason,omitempty"` + // This field will be populated if the task was terminated due to + // a resource limitation. + Limitation *mesos.TaskResourceLimitation `protobuf:"bytes,4,opt,name=limitation" json:"limitation,omitempty"` + Message *string `protobuf:"bytes,5,opt,name=message" json:"message,omitempty"` +} + +func (m *Response_WaitContainer) Reset() { *m = Response_WaitContainer{} } +func (*Response_WaitContainer) ProtoMessage() {} +func (*Response_WaitContainer) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{1, 15} } + +func (m *Response_WaitContainer) GetExitStatus() int32 { + if m != nil && m.ExitStatus != nil { + return *m.ExitStatus + } + return 0 +} + +func (m *Response_WaitContainer) GetState() mesos.TaskState { + if m != nil && m.State != nil { + return *m.State + } + return mesos.TASK_STAGING +} + +func (m *Response_WaitContainer) GetReason() mesos.TaskStatus_Reason { + if m != nil && m.Reason != nil { + return *m.Reason + } + return mesos.REASON_COMMAND_EXECUTOR_FAILED +} + +func (m *Response_WaitContainer) GetLimitation() *mesos.TaskResourceLimitation { + if m != nil { + return m.Limitation + } + return nil +} + +func (m *Response_WaitContainer) GetMessage() string { + if m != nil && m.Message != nil { + return *m.Message + } + return "" +} + +// * +// Streaming response to `Call::LAUNCH_NESTED_CONTAINER_SESSION` and +// `Call::ATTACH_CONTAINER_OUTPUT`. +// +// This message is also used to stream request data for +// `Call::ATTACH_CONTAINER_INPUT`. +type ProcessIO struct { + Type ProcessIO_Type `protobuf:"varint,1,opt,name=type,enum=mesos.agent.ProcessIO_Type" json:"type"` + Data *ProcessIO_Data `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"` + Control *ProcessIO_Control `protobuf:"bytes,3,opt,name=control" json:"control,omitempty"` +} + +func (m *ProcessIO) Reset() { *m = ProcessIO{} } +func (*ProcessIO) ProtoMessage() {} +func (*ProcessIO) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{2} } + +func (m *ProcessIO) GetType() ProcessIO_Type { + if m != nil { + return m.Type + } + return ProcessIO_UNKNOWN +} + +func (m *ProcessIO) GetData() *ProcessIO_Data { + if m != nil { + return m.Data + } + return nil +} + +func (m *ProcessIO) GetControl() *ProcessIO_Control { + if m != nil { + return m.Control + } + return nil +} + +type ProcessIO_Data struct { + Type ProcessIO_Data_Type `protobuf:"varint,1,opt,name=type,enum=mesos.agent.ProcessIO_Data_Type" json:"type"` + Data []byte `protobuf:"bytes,2,opt,name=data" json:"data,omitempty"` +} + +func (m *ProcessIO_Data) Reset() { *m = ProcessIO_Data{} } +func (*ProcessIO_Data) ProtoMessage() {} +func (*ProcessIO_Data) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{2, 0} } + +func (m *ProcessIO_Data) GetType() ProcessIO_Data_Type { + if m != nil { + return m.Type + } + return ProcessIO_Data_UNKNOWN +} + +func (m *ProcessIO_Data) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +type ProcessIO_Control struct { + Type ProcessIO_Control_Type `protobuf:"varint,1,opt,name=type,enum=mesos.agent.ProcessIO_Control_Type" json:"type"` + TTYInfo *mesos.TTYInfo `protobuf:"bytes,2,opt,name=tty_info,json=ttyInfo" json:"tty_info,omitempty"` + Heartbeat *ProcessIO_Control_Heartbeat `protobuf:"bytes,3,opt,name=heartbeat" json:"heartbeat,omitempty"` +} + +func (m *ProcessIO_Control) Reset() { *m = ProcessIO_Control{} } +func (*ProcessIO_Control) ProtoMessage() {} +func (*ProcessIO_Control) Descriptor() ([]byte, []int) { return fileDescriptorAgent, []int{2, 1} } + +func (m *ProcessIO_Control) GetType() ProcessIO_Control_Type { + if m != nil { + return m.Type + } + return ProcessIO_Control_UNKNOWN +} + +func (m *ProcessIO_Control) GetTTYInfo() *mesos.TTYInfo { + if m != nil { + return m.TTYInfo + } + return nil +} + +func (m *ProcessIO_Control) GetHeartbeat() *ProcessIO_Control_Heartbeat { + if m != nil { + return m.Heartbeat + } + return nil +} + +type ProcessIO_Control_Heartbeat struct { + Interval *mesos.DurationInfo `protobuf:"bytes,1,opt,name=interval" json:"interval,omitempty"` +} + +func (m *ProcessIO_Control_Heartbeat) Reset() { *m = ProcessIO_Control_Heartbeat{} } +func (*ProcessIO_Control_Heartbeat) ProtoMessage() {} +func (*ProcessIO_Control_Heartbeat) Descriptor() ([]byte, []int) { + return fileDescriptorAgent, []int{2, 1, 0} +} + +func (m *ProcessIO_Control_Heartbeat) GetInterval() *mesos.DurationInfo { + if m != nil { + return m.Interval + } + return nil +} + +func init() { + proto.RegisterType((*Call)(nil), "mesos.agent.Call") + proto.RegisterType((*Call_GetMetrics)(nil), "mesos.agent.Call.GetMetrics") + proto.RegisterType((*Call_SetLoggingLevel)(nil), "mesos.agent.Call.SetLoggingLevel") + proto.RegisterType((*Call_ListFiles)(nil), "mesos.agent.Call.ListFiles") + proto.RegisterType((*Call_ReadFile)(nil), "mesos.agent.Call.ReadFile") + proto.RegisterType((*Call_GetContainers)(nil), "mesos.agent.Call.GetContainers") + proto.RegisterType((*Call_LaunchNestedContainer)(nil), "mesos.agent.Call.LaunchNestedContainer") + proto.RegisterType((*Call_WaitNestedContainer)(nil), "mesos.agent.Call.WaitNestedContainer") + proto.RegisterType((*Call_KillNestedContainer)(nil), "mesos.agent.Call.KillNestedContainer") + proto.RegisterType((*Call_RemoveNestedContainer)(nil), "mesos.agent.Call.RemoveNestedContainer") + proto.RegisterType((*Call_LaunchNestedContainerSession)(nil), "mesos.agent.Call.LaunchNestedContainerSession") + proto.RegisterType((*Call_AttachContainerInput)(nil), "mesos.agent.Call.AttachContainerInput") + proto.RegisterType((*Call_AttachContainerOutput)(nil), "mesos.agent.Call.AttachContainerOutput") + proto.RegisterType((*Call_LaunchContainer)(nil), "mesos.agent.Call.LaunchContainer") + proto.RegisterType((*Call_WaitContainer)(nil), "mesos.agent.Call.WaitContainer") + proto.RegisterType((*Call_KillContainer)(nil), "mesos.agent.Call.KillContainer") + proto.RegisterType((*Call_RemoveContainer)(nil), "mesos.agent.Call.RemoveContainer") + proto.RegisterType((*Call_AddResourceProviderConfig)(nil), "mesos.agent.Call.AddResourceProviderConfig") + proto.RegisterType((*Call_UpdateResourceProviderConfig)(nil), "mesos.agent.Call.UpdateResourceProviderConfig") + proto.RegisterType((*Call_RemoveResourceProviderConfig)(nil), "mesos.agent.Call.RemoveResourceProviderConfig") + proto.RegisterType((*Call_PruneImages)(nil), "mesos.agent.Call.PruneImages") + proto.RegisterType((*Response)(nil), "mesos.agent.Response") + proto.RegisterType((*Response_GetHealth)(nil), "mesos.agent.Response.GetHealth") + proto.RegisterType((*Response_GetFlags)(nil), "mesos.agent.Response.GetFlags") + proto.RegisterType((*Response_GetVersion)(nil), "mesos.agent.Response.GetVersion") + proto.RegisterType((*Response_GetMetrics)(nil), "mesos.agent.Response.GetMetrics") + proto.RegisterType((*Response_GetLoggingLevel)(nil), "mesos.agent.Response.GetLoggingLevel") + proto.RegisterType((*Response_ListFiles)(nil), "mesos.agent.Response.ListFiles") + proto.RegisterType((*Response_ReadFile)(nil), "mesos.agent.Response.ReadFile") + proto.RegisterType((*Response_GetState)(nil), "mesos.agent.Response.GetState") + proto.RegisterType((*Response_GetContainers)(nil), "mesos.agent.Response.GetContainers") + proto.RegisterType((*Response_GetContainers_Container)(nil), "mesos.agent.Response.GetContainers.Container") + proto.RegisterType((*Response_GetFrameworks)(nil), "mesos.agent.Response.GetFrameworks") + proto.RegisterType((*Response_GetFrameworks_Framework)(nil), "mesos.agent.Response.GetFrameworks.Framework") + proto.RegisterType((*Response_GetExecutors)(nil), "mesos.agent.Response.GetExecutors") + proto.RegisterType((*Response_GetExecutors_Executor)(nil), "mesos.agent.Response.GetExecutors.Executor") + proto.RegisterType((*Response_GetTasks)(nil), "mesos.agent.Response.GetTasks") + proto.RegisterType((*Response_GetAgent)(nil), "mesos.agent.Response.GetAgent") + proto.RegisterType((*Response_GetResourceProviders)(nil), "mesos.agent.Response.GetResourceProviders") + proto.RegisterType((*Response_GetResourceProviders_ResourceProvider)(nil), "mesos.agent.Response.GetResourceProviders.ResourceProvider") + proto.RegisterType((*Response_WaitNestedContainer)(nil), "mesos.agent.Response.WaitNestedContainer") + proto.RegisterType((*Response_WaitContainer)(nil), "mesos.agent.Response.WaitContainer") + proto.RegisterType((*ProcessIO)(nil), "mesos.agent.ProcessIO") + proto.RegisterType((*ProcessIO_Data)(nil), "mesos.agent.ProcessIO.Data") + proto.RegisterType((*ProcessIO_Control)(nil), "mesos.agent.ProcessIO.Control") + proto.RegisterType((*ProcessIO_Control_Heartbeat)(nil), "mesos.agent.ProcessIO.Control.Heartbeat") + proto.RegisterEnum("mesos.agent.Call_Type", Call_Type_name, Call_Type_value) + proto.RegisterEnum("mesos.agent.Call_AttachContainerInput_Type", Call_AttachContainerInput_Type_name, Call_AttachContainerInput_Type_value) + proto.RegisterEnum("mesos.agent.Response_Type", Response_Type_name, Response_Type_value) + proto.RegisterEnum("mesos.agent.ProcessIO_Type", ProcessIO_Type_name, ProcessIO_Type_value) + proto.RegisterEnum("mesos.agent.ProcessIO_Data_Type", ProcessIO_Data_Type_name, ProcessIO_Data_Type_value) + proto.RegisterEnum("mesos.agent.ProcessIO_Control_Type", ProcessIO_Control_Type_name, ProcessIO_Control_Type_value) +} +func (x Call_Type) String() string { + s, ok := Call_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Call_AttachContainerInput_Type) String() string { + s, ok := Call_AttachContainerInput_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Response_Type) String() string { + s, ok := Response_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x ProcessIO_Type) String() string { + s, ok := ProcessIO_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x ProcessIO_Data_Type) String() string { + s, ok := ProcessIO_Data_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x ProcessIO_Control_Type) String() string { + s, ok := ProcessIO_Control_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *Call) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Call) + if !ok { + that2, ok := that.(Call) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Call") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Call but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Call but is not nil && this == nil") + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.GetMetrics.Equal(that1.GetMetrics) { + return fmt.Errorf("GetMetrics this(%v) Not Equal that(%v)", this.GetMetrics, that1.GetMetrics) + } + if !this.SetLoggingLevel.Equal(that1.SetLoggingLevel) { + return fmt.Errorf("SetLoggingLevel this(%v) Not Equal that(%v)", this.SetLoggingLevel, that1.SetLoggingLevel) + } + if !this.ListFiles.Equal(that1.ListFiles) { + return fmt.Errorf("ListFiles this(%v) Not Equal that(%v)", this.ListFiles, that1.ListFiles) + } + if !this.ReadFile.Equal(that1.ReadFile) { + return fmt.Errorf("ReadFile this(%v) Not Equal that(%v)", this.ReadFile, that1.ReadFile) + } + if !this.GetContainers.Equal(that1.GetContainers) { + return fmt.Errorf("GetContainers this(%v) Not Equal that(%v)", this.GetContainers, that1.GetContainers) + } + if !this.LaunchNestedContainer.Equal(that1.LaunchNestedContainer) { + return fmt.Errorf("LaunchNestedContainer this(%v) Not Equal that(%v)", this.LaunchNestedContainer, that1.LaunchNestedContainer) + } + if !this.WaitNestedContainer.Equal(that1.WaitNestedContainer) { + return fmt.Errorf("WaitNestedContainer this(%v) Not Equal that(%v)", this.WaitNestedContainer, that1.WaitNestedContainer) + } + if !this.KillNestedContainer.Equal(that1.KillNestedContainer) { + return fmt.Errorf("KillNestedContainer this(%v) Not Equal that(%v)", this.KillNestedContainer, that1.KillNestedContainer) + } + if !this.RemoveNestedContainer.Equal(that1.RemoveNestedContainer) { + return fmt.Errorf("RemoveNestedContainer this(%v) Not Equal that(%v)", this.RemoveNestedContainer, that1.RemoveNestedContainer) + } + if !this.LaunchNestedContainerSession.Equal(that1.LaunchNestedContainerSession) { + return fmt.Errorf("LaunchNestedContainerSession this(%v) Not Equal that(%v)", this.LaunchNestedContainerSession, that1.LaunchNestedContainerSession) + } + if !this.AttachContainerInput.Equal(that1.AttachContainerInput) { + return fmt.Errorf("AttachContainerInput this(%v) Not Equal that(%v)", this.AttachContainerInput, that1.AttachContainerInput) + } + if !this.AttachContainerOutput.Equal(that1.AttachContainerOutput) { + return fmt.Errorf("AttachContainerOutput this(%v) Not Equal that(%v)", this.AttachContainerOutput, that1.AttachContainerOutput) + } + if !this.LaunchContainer.Equal(that1.LaunchContainer) { + return fmt.Errorf("LaunchContainer this(%v) Not Equal that(%v)", this.LaunchContainer, that1.LaunchContainer) + } + if !this.WaitContainer.Equal(that1.WaitContainer) { + return fmt.Errorf("WaitContainer this(%v) Not Equal that(%v)", this.WaitContainer, that1.WaitContainer) + } + if !this.KillContainer.Equal(that1.KillContainer) { + return fmt.Errorf("KillContainer this(%v) Not Equal that(%v)", this.KillContainer, that1.KillContainer) + } + if !this.RemoveContainer.Equal(that1.RemoveContainer) { + return fmt.Errorf("RemoveContainer this(%v) Not Equal that(%v)", this.RemoveContainer, that1.RemoveContainer) + } + if !this.AddResourceProviderConfig.Equal(that1.AddResourceProviderConfig) { + return fmt.Errorf("AddResourceProviderConfig this(%v) Not Equal that(%v)", this.AddResourceProviderConfig, that1.AddResourceProviderConfig) + } + if !this.UpdateResourceProviderConfig.Equal(that1.UpdateResourceProviderConfig) { + return fmt.Errorf("UpdateResourceProviderConfig this(%v) Not Equal that(%v)", this.UpdateResourceProviderConfig, that1.UpdateResourceProviderConfig) + } + if !this.RemoveResourceProviderConfig.Equal(that1.RemoveResourceProviderConfig) { + return fmt.Errorf("RemoveResourceProviderConfig this(%v) Not Equal that(%v)", this.RemoveResourceProviderConfig, that1.RemoveResourceProviderConfig) + } + if !this.PruneImages.Equal(that1.PruneImages) { + return fmt.Errorf("PruneImages this(%v) Not Equal that(%v)", this.PruneImages, that1.PruneImages) + } + return nil +} +func (this *Call) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Call) + if !ok { + that2, ok := that.(Call) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + if !this.GetMetrics.Equal(that1.GetMetrics) { + return false + } + if !this.SetLoggingLevel.Equal(that1.SetLoggingLevel) { + return false + } + if !this.ListFiles.Equal(that1.ListFiles) { + return false + } + if !this.ReadFile.Equal(that1.ReadFile) { + return false + } + if !this.GetContainers.Equal(that1.GetContainers) { + return false + } + if !this.LaunchNestedContainer.Equal(that1.LaunchNestedContainer) { + return false + } + if !this.WaitNestedContainer.Equal(that1.WaitNestedContainer) { + return false + } + if !this.KillNestedContainer.Equal(that1.KillNestedContainer) { + return false + } + if !this.RemoveNestedContainer.Equal(that1.RemoveNestedContainer) { + return false + } + if !this.LaunchNestedContainerSession.Equal(that1.LaunchNestedContainerSession) { + return false + } + if !this.AttachContainerInput.Equal(that1.AttachContainerInput) { + return false + } + if !this.AttachContainerOutput.Equal(that1.AttachContainerOutput) { + return false + } + if !this.LaunchContainer.Equal(that1.LaunchContainer) { + return false + } + if !this.WaitContainer.Equal(that1.WaitContainer) { + return false + } + if !this.KillContainer.Equal(that1.KillContainer) { + return false + } + if !this.RemoveContainer.Equal(that1.RemoveContainer) { + return false + } + if !this.AddResourceProviderConfig.Equal(that1.AddResourceProviderConfig) { + return false + } + if !this.UpdateResourceProviderConfig.Equal(that1.UpdateResourceProviderConfig) { + return false + } + if !this.RemoveResourceProviderConfig.Equal(that1.RemoveResourceProviderConfig) { + return false + } + if !this.PruneImages.Equal(that1.PruneImages) { + return false + } + return true +} +func (this *Call_GetMetrics) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Call_GetMetrics) + if !ok { + that2, ok := that.(Call_GetMetrics) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Call_GetMetrics") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Call_GetMetrics but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Call_GetMetrics but is not nil && this == nil") + } + if !this.Timeout.Equal(that1.Timeout) { + return fmt.Errorf("Timeout this(%v) Not Equal that(%v)", this.Timeout, that1.Timeout) + } + return nil +} +func (this *Call_GetMetrics) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Call_GetMetrics) + if !ok { + that2, ok := that.(Call_GetMetrics) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Timeout.Equal(that1.Timeout) { + return false + } + return true +} +func (this *Call_SetLoggingLevel) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Call_SetLoggingLevel) + if !ok { + that2, ok := that.(Call_SetLoggingLevel) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Call_SetLoggingLevel") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Call_SetLoggingLevel but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Call_SetLoggingLevel but is not nil && this == nil") + } + if this.Level != that1.Level { + return fmt.Errorf("Level this(%v) Not Equal that(%v)", this.Level, that1.Level) + } + if !this.Duration.Equal(&that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + return nil +} +func (this *Call_SetLoggingLevel) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Call_SetLoggingLevel) + if !ok { + that2, ok := that.(Call_SetLoggingLevel) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Level != that1.Level { + return false + } + if !this.Duration.Equal(&that1.Duration) { + return false + } + return true +} +func (this *Call_ListFiles) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Call_ListFiles) + if !ok { + that2, ok := that.(Call_ListFiles) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Call_ListFiles") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Call_ListFiles but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Call_ListFiles but is not nil && this == nil") + } + if this.Path != that1.Path { + return fmt.Errorf("Path this(%v) Not Equal that(%v)", this.Path, that1.Path) + } + return nil +} +func (this *Call_ListFiles) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Call_ListFiles) + if !ok { + that2, ok := that.(Call_ListFiles) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Path != that1.Path { + return false + } + return true +} +func (this *Call_ReadFile) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Call_ReadFile) + if !ok { + that2, ok := that.(Call_ReadFile) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Call_ReadFile") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Call_ReadFile but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Call_ReadFile but is not nil && this == nil") + } + if this.Path != that1.Path { + return fmt.Errorf("Path this(%v) Not Equal that(%v)", this.Path, that1.Path) + } + if this.Offset != that1.Offset { + return fmt.Errorf("Offset this(%v) Not Equal that(%v)", this.Offset, that1.Offset) + } + if this.Length != nil && that1.Length != nil { + if *this.Length != *that1.Length { + return fmt.Errorf("Length this(%v) Not Equal that(%v)", *this.Length, *that1.Length) + } + } else if this.Length != nil { + return fmt.Errorf("this.Length == nil && that.Length != nil") + } else if that1.Length != nil { + return fmt.Errorf("Length this(%v) Not Equal that(%v)", this.Length, that1.Length) + } + return nil +} +func (this *Call_ReadFile) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Call_ReadFile) + if !ok { + that2, ok := that.(Call_ReadFile) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Path != that1.Path { + return false + } + if this.Offset != that1.Offset { + return false + } + if this.Length != nil && that1.Length != nil { + if *this.Length != *that1.Length { + return false + } + } else if this.Length != nil { + return false + } else if that1.Length != nil { + return false + } + return true +} +func (this *Call_GetContainers) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Call_GetContainers) + if !ok { + that2, ok := that.(Call_GetContainers) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Call_GetContainers") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Call_GetContainers but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Call_GetContainers but is not nil && this == nil") + } + if this.ShowNested != nil && that1.ShowNested != nil { + if *this.ShowNested != *that1.ShowNested { + return fmt.Errorf("ShowNested this(%v) Not Equal that(%v)", *this.ShowNested, *that1.ShowNested) + } + } else if this.ShowNested != nil { + return fmt.Errorf("this.ShowNested == nil && that.ShowNested != nil") + } else if that1.ShowNested != nil { + return fmt.Errorf("ShowNested this(%v) Not Equal that(%v)", this.ShowNested, that1.ShowNested) + } + if this.ShowStandalone != nil && that1.ShowStandalone != nil { + if *this.ShowStandalone != *that1.ShowStandalone { + return fmt.Errorf("ShowStandalone this(%v) Not Equal that(%v)", *this.ShowStandalone, *that1.ShowStandalone) + } + } else if this.ShowStandalone != nil { + return fmt.Errorf("this.ShowStandalone == nil && that.ShowStandalone != nil") + } else if that1.ShowStandalone != nil { + return fmt.Errorf("ShowStandalone this(%v) Not Equal that(%v)", this.ShowStandalone, that1.ShowStandalone) + } + return nil +} +func (this *Call_GetContainers) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Call_GetContainers) + if !ok { + that2, ok := that.(Call_GetContainers) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.ShowNested != nil && that1.ShowNested != nil { + if *this.ShowNested != *that1.ShowNested { + return false + } + } else if this.ShowNested != nil { + return false + } else if that1.ShowNested != nil { + return false + } + if this.ShowStandalone != nil && that1.ShowStandalone != nil { + if *this.ShowStandalone != *that1.ShowStandalone { + return false + } + } else if this.ShowStandalone != nil { + return false + } else if that1.ShowStandalone != nil { + return false + } + return true +} +func (this *Call_LaunchNestedContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Call_LaunchNestedContainer) + if !ok { + that2, ok := that.(Call_LaunchNestedContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Call_LaunchNestedContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Call_LaunchNestedContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Call_LaunchNestedContainer but is not nil && this == nil") + } + if !this.ContainerID.Equal(&that1.ContainerID) { + return fmt.Errorf("ContainerID this(%v) Not Equal that(%v)", this.ContainerID, that1.ContainerID) + } + if !this.Command.Equal(that1.Command) { + return fmt.Errorf("Command this(%v) Not Equal that(%v)", this.Command, that1.Command) + } + if !this.Container.Equal(that1.Container) { + return fmt.Errorf("Container this(%v) Not Equal that(%v)", this.Container, that1.Container) + } + return nil +} +func (this *Call_LaunchNestedContainer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Call_LaunchNestedContainer) + if !ok { + that2, ok := that.(Call_LaunchNestedContainer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.ContainerID.Equal(&that1.ContainerID) { + return false + } + if !this.Command.Equal(that1.Command) { + return false + } + if !this.Container.Equal(that1.Container) { + return false + } + return true +} +func (this *Call_WaitNestedContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Call_WaitNestedContainer) + if !ok { + that2, ok := that.(Call_WaitNestedContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Call_WaitNestedContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Call_WaitNestedContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Call_WaitNestedContainer but is not nil && this == nil") + } + if !this.ContainerID.Equal(&that1.ContainerID) { + return fmt.Errorf("ContainerID this(%v) Not Equal that(%v)", this.ContainerID, that1.ContainerID) + } + return nil +} +func (this *Call_WaitNestedContainer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Call_WaitNestedContainer) + if !ok { + that2, ok := that.(Call_WaitNestedContainer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.ContainerID.Equal(&that1.ContainerID) { + return false + } + return true +} +func (this *Call_KillNestedContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Call_KillNestedContainer) + if !ok { + that2, ok := that.(Call_KillNestedContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Call_KillNestedContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Call_KillNestedContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Call_KillNestedContainer but is not nil && this == nil") + } + if !this.ContainerID.Equal(&that1.ContainerID) { + return fmt.Errorf("ContainerID this(%v) Not Equal that(%v)", this.ContainerID, that1.ContainerID) + } + if this.Signal != nil && that1.Signal != nil { + if *this.Signal != *that1.Signal { + return fmt.Errorf("Signal this(%v) Not Equal that(%v)", *this.Signal, *that1.Signal) + } + } else if this.Signal != nil { + return fmt.Errorf("this.Signal == nil && that.Signal != nil") + } else if that1.Signal != nil { + return fmt.Errorf("Signal this(%v) Not Equal that(%v)", this.Signal, that1.Signal) + } + return nil +} +func (this *Call_KillNestedContainer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Call_KillNestedContainer) + if !ok { + that2, ok := that.(Call_KillNestedContainer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.ContainerID.Equal(&that1.ContainerID) { + return false + } + if this.Signal != nil && that1.Signal != nil { + if *this.Signal != *that1.Signal { + return false + } + } else if this.Signal != nil { + return false + } else if that1.Signal != nil { + return false + } + return true +} +func (this *Call_RemoveNestedContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Call_RemoveNestedContainer) + if !ok { + that2, ok := that.(Call_RemoveNestedContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Call_RemoveNestedContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Call_RemoveNestedContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Call_RemoveNestedContainer but is not nil && this == nil") + } + if !this.ContainerID.Equal(&that1.ContainerID) { + return fmt.Errorf("ContainerID this(%v) Not Equal that(%v)", this.ContainerID, that1.ContainerID) + } + return nil +} +func (this *Call_RemoveNestedContainer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Call_RemoveNestedContainer) + if !ok { + that2, ok := that.(Call_RemoveNestedContainer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.ContainerID.Equal(&that1.ContainerID) { + return false + } + return true +} +func (this *Call_LaunchNestedContainerSession) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Call_LaunchNestedContainerSession) + if !ok { + that2, ok := that.(Call_LaunchNestedContainerSession) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Call_LaunchNestedContainerSession") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Call_LaunchNestedContainerSession but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Call_LaunchNestedContainerSession but is not nil && this == nil") + } + if !this.ContainerID.Equal(&that1.ContainerID) { + return fmt.Errorf("ContainerID this(%v) Not Equal that(%v)", this.ContainerID, that1.ContainerID) + } + if !this.Command.Equal(that1.Command) { + return fmt.Errorf("Command this(%v) Not Equal that(%v)", this.Command, that1.Command) + } + if !this.Container.Equal(that1.Container) { + return fmt.Errorf("Container this(%v) Not Equal that(%v)", this.Container, that1.Container) + } + return nil +} +func (this *Call_LaunchNestedContainerSession) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Call_LaunchNestedContainerSession) + if !ok { + that2, ok := that.(Call_LaunchNestedContainerSession) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.ContainerID.Equal(&that1.ContainerID) { + return false + } + if !this.Command.Equal(that1.Command) { + return false + } + if !this.Container.Equal(that1.Container) { + return false + } + return true +} +func (this *Call_AttachContainerInput) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Call_AttachContainerInput) + if !ok { + that2, ok := that.(Call_AttachContainerInput) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Call_AttachContainerInput") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Call_AttachContainerInput but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Call_AttachContainerInput but is not nil && this == nil") + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.ContainerID.Equal(that1.ContainerID) { + return fmt.Errorf("ContainerID this(%v) Not Equal that(%v)", this.ContainerID, that1.ContainerID) + } + if !this.ProcessIO.Equal(that1.ProcessIO) { + return fmt.Errorf("ProcessIO this(%v) Not Equal that(%v)", this.ProcessIO, that1.ProcessIO) + } + return nil +} +func (this *Call_AttachContainerInput) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Call_AttachContainerInput) + if !ok { + that2, ok := that.(Call_AttachContainerInput) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + if !this.ContainerID.Equal(that1.ContainerID) { + return false + } + if !this.ProcessIO.Equal(that1.ProcessIO) { + return false + } + return true +} +func (this *Call_AttachContainerOutput) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Call_AttachContainerOutput) + if !ok { + that2, ok := that.(Call_AttachContainerOutput) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Call_AttachContainerOutput") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Call_AttachContainerOutput but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Call_AttachContainerOutput but is not nil && this == nil") + } + if !this.ContainerID.Equal(&that1.ContainerID) { + return fmt.Errorf("ContainerID this(%v) Not Equal that(%v)", this.ContainerID, that1.ContainerID) + } + return nil +} +func (this *Call_AttachContainerOutput) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Call_AttachContainerOutput) + if !ok { + that2, ok := that.(Call_AttachContainerOutput) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.ContainerID.Equal(&that1.ContainerID) { + return false + } + return true +} +func (this *Call_LaunchContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Call_LaunchContainer) + if !ok { + that2, ok := that.(Call_LaunchContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Call_LaunchContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Call_LaunchContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Call_LaunchContainer but is not nil && this == nil") + } + if !this.ContainerID.Equal(&that1.ContainerID) { + return fmt.Errorf("ContainerID this(%v) Not Equal that(%v)", this.ContainerID, that1.ContainerID) + } + if !this.Command.Equal(that1.Command) { + return fmt.Errorf("Command this(%v) Not Equal that(%v)", this.Command, that1.Command) + } + if len(this.Resources) != len(that1.Resources) { + return fmt.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return fmt.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) + } + } + if !this.Container.Equal(that1.Container) { + return fmt.Errorf("Container this(%v) Not Equal that(%v)", this.Container, that1.Container) + } + return nil +} +func (this *Call_LaunchContainer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Call_LaunchContainer) + if !ok { + that2, ok := that.(Call_LaunchContainer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.ContainerID.Equal(&that1.ContainerID) { + return false + } + if !this.Command.Equal(that1.Command) { + return false + } + if len(this.Resources) != len(that1.Resources) { + return false + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return false + } + } + if !this.Container.Equal(that1.Container) { + return false + } + return true +} +func (this *Call_WaitContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Call_WaitContainer) + if !ok { + that2, ok := that.(Call_WaitContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Call_WaitContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Call_WaitContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Call_WaitContainer but is not nil && this == nil") + } + if !this.ContainerID.Equal(&that1.ContainerID) { + return fmt.Errorf("ContainerID this(%v) Not Equal that(%v)", this.ContainerID, that1.ContainerID) + } + return nil +} +func (this *Call_WaitContainer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Call_WaitContainer) + if !ok { + that2, ok := that.(Call_WaitContainer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.ContainerID.Equal(&that1.ContainerID) { + return false + } + return true +} +func (this *Call_KillContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Call_KillContainer) + if !ok { + that2, ok := that.(Call_KillContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Call_KillContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Call_KillContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Call_KillContainer but is not nil && this == nil") + } + if !this.ContainerID.Equal(&that1.ContainerID) { + return fmt.Errorf("ContainerID this(%v) Not Equal that(%v)", this.ContainerID, that1.ContainerID) + } + if this.Signal != nil && that1.Signal != nil { + if *this.Signal != *that1.Signal { + return fmt.Errorf("Signal this(%v) Not Equal that(%v)", *this.Signal, *that1.Signal) + } + } else if this.Signal != nil { + return fmt.Errorf("this.Signal == nil && that.Signal != nil") + } else if that1.Signal != nil { + return fmt.Errorf("Signal this(%v) Not Equal that(%v)", this.Signal, that1.Signal) + } + return nil +} +func (this *Call_KillContainer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Call_KillContainer) + if !ok { + that2, ok := that.(Call_KillContainer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.ContainerID.Equal(&that1.ContainerID) { + return false + } + if this.Signal != nil && that1.Signal != nil { + if *this.Signal != *that1.Signal { + return false + } + } else if this.Signal != nil { + return false + } else if that1.Signal != nil { + return false + } + return true +} +func (this *Call_RemoveContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Call_RemoveContainer) + if !ok { + that2, ok := that.(Call_RemoveContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Call_RemoveContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Call_RemoveContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Call_RemoveContainer but is not nil && this == nil") + } + if !this.ContainerID.Equal(&that1.ContainerID) { + return fmt.Errorf("ContainerID this(%v) Not Equal that(%v)", this.ContainerID, that1.ContainerID) + } + return nil +} +func (this *Call_RemoveContainer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Call_RemoveContainer) + if !ok { + that2, ok := that.(Call_RemoveContainer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.ContainerID.Equal(&that1.ContainerID) { + return false + } + return true +} +func (this *Call_AddResourceProviderConfig) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Call_AddResourceProviderConfig) + if !ok { + that2, ok := that.(Call_AddResourceProviderConfig) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Call_AddResourceProviderConfig") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Call_AddResourceProviderConfig but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Call_AddResourceProviderConfig but is not nil && this == nil") + } + if !this.Info.Equal(&that1.Info) { + return fmt.Errorf("Info this(%v) Not Equal that(%v)", this.Info, that1.Info) + } + return nil +} +func (this *Call_AddResourceProviderConfig) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Call_AddResourceProviderConfig) + if !ok { + that2, ok := that.(Call_AddResourceProviderConfig) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Info.Equal(&that1.Info) { + return false + } + return true +} +func (this *Call_UpdateResourceProviderConfig) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Call_UpdateResourceProviderConfig) + if !ok { + that2, ok := that.(Call_UpdateResourceProviderConfig) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Call_UpdateResourceProviderConfig") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Call_UpdateResourceProviderConfig but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Call_UpdateResourceProviderConfig but is not nil && this == nil") + } + if !this.Info.Equal(&that1.Info) { + return fmt.Errorf("Info this(%v) Not Equal that(%v)", this.Info, that1.Info) + } + return nil +} +func (this *Call_UpdateResourceProviderConfig) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Call_UpdateResourceProviderConfig) + if !ok { + that2, ok := that.(Call_UpdateResourceProviderConfig) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Info.Equal(&that1.Info) { + return false + } + return true +} +func (this *Call_RemoveResourceProviderConfig) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Call_RemoveResourceProviderConfig) + if !ok { + that2, ok := that.(Call_RemoveResourceProviderConfig) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Call_RemoveResourceProviderConfig") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Call_RemoveResourceProviderConfig but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Call_RemoveResourceProviderConfig but is not nil && this == nil") + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + return nil +} +func (this *Call_RemoveResourceProviderConfig) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Call_RemoveResourceProviderConfig) + if !ok { + that2, ok := that.(Call_RemoveResourceProviderConfig) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + if this.Name != that1.Name { + return false + } + return true +} +func (this *Call_PruneImages) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Call_PruneImages) + if !ok { + that2, ok := that.(Call_PruneImages) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Call_PruneImages") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Call_PruneImages but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Call_PruneImages but is not nil && this == nil") + } + if len(this.ExcludedImages) != len(that1.ExcludedImages) { + return fmt.Errorf("ExcludedImages this(%v) Not Equal that(%v)", len(this.ExcludedImages), len(that1.ExcludedImages)) + } + for i := range this.ExcludedImages { + if !this.ExcludedImages[i].Equal(&that1.ExcludedImages[i]) { + return fmt.Errorf("ExcludedImages this[%v](%v) Not Equal that[%v](%v)", i, this.ExcludedImages[i], i, that1.ExcludedImages[i]) + } + } + return nil +} +func (this *Call_PruneImages) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Call_PruneImages) + if !ok { + that2, ok := that.(Call_PruneImages) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.ExcludedImages) != len(that1.ExcludedImages) { + return false + } + for i := range this.ExcludedImages { + if !this.ExcludedImages[i].Equal(&that1.ExcludedImages[i]) { + return false + } + } + return true +} +func (this *Response) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Response) + if !ok { + that2, ok := that.(Response) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Response") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Response but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Response but is not nil && this == nil") + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.GetHealth.Equal(that1.GetHealth) { + return fmt.Errorf("GetHealth this(%v) Not Equal that(%v)", this.GetHealth, that1.GetHealth) + } + if !this.GetFlags.Equal(that1.GetFlags) { + return fmt.Errorf("GetFlags this(%v) Not Equal that(%v)", this.GetFlags, that1.GetFlags) + } + if !this.GetVersion.Equal(that1.GetVersion) { + return fmt.Errorf("GetVersion this(%v) Not Equal that(%v)", this.GetVersion, that1.GetVersion) + } + if !this.GetMetrics.Equal(that1.GetMetrics) { + return fmt.Errorf("GetMetrics this(%v) Not Equal that(%v)", this.GetMetrics, that1.GetMetrics) + } + if !this.GetLoggingLevel.Equal(that1.GetLoggingLevel) { + return fmt.Errorf("GetLoggingLevel this(%v) Not Equal that(%v)", this.GetLoggingLevel, that1.GetLoggingLevel) + } + if !this.ListFiles.Equal(that1.ListFiles) { + return fmt.Errorf("ListFiles this(%v) Not Equal that(%v)", this.ListFiles, that1.ListFiles) + } + if !this.ReadFile.Equal(that1.ReadFile) { + return fmt.Errorf("ReadFile this(%v) Not Equal that(%v)", this.ReadFile, that1.ReadFile) + } + if !this.GetState.Equal(that1.GetState) { + return fmt.Errorf("GetState this(%v) Not Equal that(%v)", this.GetState, that1.GetState) + } + if !this.GetContainers.Equal(that1.GetContainers) { + return fmt.Errorf("GetContainers this(%v) Not Equal that(%v)", this.GetContainers, that1.GetContainers) + } + if !this.GetFrameworks.Equal(that1.GetFrameworks) { + return fmt.Errorf("GetFrameworks this(%v) Not Equal that(%v)", this.GetFrameworks, that1.GetFrameworks) + } + if !this.GetExecutors.Equal(that1.GetExecutors) { + return fmt.Errorf("GetExecutors this(%v) Not Equal that(%v)", this.GetExecutors, that1.GetExecutors) + } + if !this.GetTasks.Equal(that1.GetTasks) { + return fmt.Errorf("GetTasks this(%v) Not Equal that(%v)", this.GetTasks, that1.GetTasks) + } + if !this.GetAgent.Equal(that1.GetAgent) { + return fmt.Errorf("GetAgent this(%v) Not Equal that(%v)", this.GetAgent, that1.GetAgent) + } + if !this.GetResourceProviders.Equal(that1.GetResourceProviders) { + return fmt.Errorf("GetResourceProviders this(%v) Not Equal that(%v)", this.GetResourceProviders, that1.GetResourceProviders) + } + if !this.WaitNestedContainer.Equal(that1.WaitNestedContainer) { + return fmt.Errorf("WaitNestedContainer this(%v) Not Equal that(%v)", this.WaitNestedContainer, that1.WaitNestedContainer) + } + if !this.WaitContainer.Equal(that1.WaitContainer) { + return fmt.Errorf("WaitContainer this(%v) Not Equal that(%v)", this.WaitContainer, that1.WaitContainer) + } + return nil +} +func (this *Response) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Response) + if !ok { + that2, ok := that.(Response) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + if !this.GetHealth.Equal(that1.GetHealth) { + return false + } + if !this.GetFlags.Equal(that1.GetFlags) { + return false + } + if !this.GetVersion.Equal(that1.GetVersion) { + return false + } + if !this.GetMetrics.Equal(that1.GetMetrics) { + return false + } + if !this.GetLoggingLevel.Equal(that1.GetLoggingLevel) { + return false + } + if !this.ListFiles.Equal(that1.ListFiles) { + return false + } + if !this.ReadFile.Equal(that1.ReadFile) { + return false + } + if !this.GetState.Equal(that1.GetState) { + return false + } + if !this.GetContainers.Equal(that1.GetContainers) { + return false + } + if !this.GetFrameworks.Equal(that1.GetFrameworks) { + return false + } + if !this.GetExecutors.Equal(that1.GetExecutors) { + return false + } + if !this.GetTasks.Equal(that1.GetTasks) { + return false + } + if !this.GetAgent.Equal(that1.GetAgent) { + return false + } + if !this.GetResourceProviders.Equal(that1.GetResourceProviders) { + return false + } + if !this.WaitNestedContainer.Equal(that1.WaitNestedContainer) { + return false + } + if !this.WaitContainer.Equal(that1.WaitContainer) { + return false + } + return true +} +func (this *Response_GetHealth) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Response_GetHealth) + if !ok { + that2, ok := that.(Response_GetHealth) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Response_GetHealth") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Response_GetHealth but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Response_GetHealth but is not nil && this == nil") + } + if this.Healthy != that1.Healthy { + return fmt.Errorf("Healthy this(%v) Not Equal that(%v)", this.Healthy, that1.Healthy) + } + return nil +} +func (this *Response_GetHealth) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Response_GetHealth) + if !ok { + that2, ok := that.(Response_GetHealth) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Healthy != that1.Healthy { + return false + } + return true +} +func (this *Response_GetFlags) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Response_GetFlags) + if !ok { + that2, ok := that.(Response_GetFlags) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Response_GetFlags") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Response_GetFlags but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Response_GetFlags but is not nil && this == nil") + } + if len(this.Flags) != len(that1.Flags) { + return fmt.Errorf("Flags this(%v) Not Equal that(%v)", len(this.Flags), len(that1.Flags)) + } + for i := range this.Flags { + if !this.Flags[i].Equal(&that1.Flags[i]) { + return fmt.Errorf("Flags this[%v](%v) Not Equal that[%v](%v)", i, this.Flags[i], i, that1.Flags[i]) + } + } + return nil +} +func (this *Response_GetFlags) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Response_GetFlags) + if !ok { + that2, ok := that.(Response_GetFlags) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Flags) != len(that1.Flags) { + return false + } + for i := range this.Flags { + if !this.Flags[i].Equal(&that1.Flags[i]) { + return false + } + } + return true +} +func (this *Response_GetVersion) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Response_GetVersion) + if !ok { + that2, ok := that.(Response_GetVersion) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Response_GetVersion") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Response_GetVersion but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Response_GetVersion but is not nil && this == nil") + } + if !this.VersionInfo.Equal(&that1.VersionInfo) { + return fmt.Errorf("VersionInfo this(%v) Not Equal that(%v)", this.VersionInfo, that1.VersionInfo) + } + return nil +} +func (this *Response_GetVersion) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Response_GetVersion) + if !ok { + that2, ok := that.(Response_GetVersion) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.VersionInfo.Equal(&that1.VersionInfo) { + return false + } + return true +} +func (this *Response_GetMetrics) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Response_GetMetrics) + if !ok { + that2, ok := that.(Response_GetMetrics) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Response_GetMetrics") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Response_GetMetrics but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Response_GetMetrics but is not nil && this == nil") + } + if len(this.Metrics) != len(that1.Metrics) { + return fmt.Errorf("Metrics this(%v) Not Equal that(%v)", len(this.Metrics), len(that1.Metrics)) + } + for i := range this.Metrics { + if !this.Metrics[i].Equal(&that1.Metrics[i]) { + return fmt.Errorf("Metrics this[%v](%v) Not Equal that[%v](%v)", i, this.Metrics[i], i, that1.Metrics[i]) + } + } + return nil +} +func (this *Response_GetMetrics) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Response_GetMetrics) + if !ok { + that2, ok := that.(Response_GetMetrics) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Metrics) != len(that1.Metrics) { + return false + } + for i := range this.Metrics { + if !this.Metrics[i].Equal(&that1.Metrics[i]) { + return false + } + } + return true +} +func (this *Response_GetLoggingLevel) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Response_GetLoggingLevel) + if !ok { + that2, ok := that.(Response_GetLoggingLevel) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Response_GetLoggingLevel") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Response_GetLoggingLevel but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Response_GetLoggingLevel but is not nil && this == nil") + } + if this.Level != that1.Level { + return fmt.Errorf("Level this(%v) Not Equal that(%v)", this.Level, that1.Level) + } + return nil +} +func (this *Response_GetLoggingLevel) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Response_GetLoggingLevel) + if !ok { + that2, ok := that.(Response_GetLoggingLevel) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Level != that1.Level { + return false + } + return true +} +func (this *Response_ListFiles) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Response_ListFiles) + if !ok { + that2, ok := that.(Response_ListFiles) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Response_ListFiles") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Response_ListFiles but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Response_ListFiles but is not nil && this == nil") + } + if len(this.FileInfos) != len(that1.FileInfos) { + return fmt.Errorf("FileInfos this(%v) Not Equal that(%v)", len(this.FileInfos), len(that1.FileInfos)) + } + for i := range this.FileInfos { + if !this.FileInfos[i].Equal(&that1.FileInfos[i]) { + return fmt.Errorf("FileInfos this[%v](%v) Not Equal that[%v](%v)", i, this.FileInfos[i], i, that1.FileInfos[i]) + } + } + return nil +} +func (this *Response_ListFiles) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Response_ListFiles) + if !ok { + that2, ok := that.(Response_ListFiles) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.FileInfos) != len(that1.FileInfos) { + return false + } + for i := range this.FileInfos { + if !this.FileInfos[i].Equal(&that1.FileInfos[i]) { + return false + } + } + return true +} +func (this *Response_ReadFile) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Response_ReadFile) + if !ok { + that2, ok := that.(Response_ReadFile) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Response_ReadFile") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Response_ReadFile but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Response_ReadFile but is not nil && this == nil") + } + if this.Size != that1.Size { + return fmt.Errorf("Size this(%v) Not Equal that(%v)", this.Size, that1.Size) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + return nil +} +func (this *Response_ReadFile) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Response_ReadFile) + if !ok { + that2, ok := that.(Response_ReadFile) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Size != that1.Size { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + return true +} +func (this *Response_GetState) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Response_GetState) + if !ok { + that2, ok := that.(Response_GetState) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Response_GetState") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Response_GetState but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Response_GetState but is not nil && this == nil") + } + if !this.GetTasks.Equal(that1.GetTasks) { + return fmt.Errorf("GetTasks this(%v) Not Equal that(%v)", this.GetTasks, that1.GetTasks) + } + if !this.GetExecutors.Equal(that1.GetExecutors) { + return fmt.Errorf("GetExecutors this(%v) Not Equal that(%v)", this.GetExecutors, that1.GetExecutors) + } + if !this.GetFrameworks.Equal(that1.GetFrameworks) { + return fmt.Errorf("GetFrameworks this(%v) Not Equal that(%v)", this.GetFrameworks, that1.GetFrameworks) + } + return nil +} +func (this *Response_GetState) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Response_GetState) + if !ok { + that2, ok := that.(Response_GetState) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.GetTasks.Equal(that1.GetTasks) { + return false + } + if !this.GetExecutors.Equal(that1.GetExecutors) { + return false + } + if !this.GetFrameworks.Equal(that1.GetFrameworks) { + return false + } + return true +} +func (this *Response_GetContainers) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Response_GetContainers) + if !ok { + that2, ok := that.(Response_GetContainers) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Response_GetContainers") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Response_GetContainers but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Response_GetContainers but is not nil && this == nil") + } + if len(this.Containers) != len(that1.Containers) { + return fmt.Errorf("Containers this(%v) Not Equal that(%v)", len(this.Containers), len(that1.Containers)) + } + for i := range this.Containers { + if !this.Containers[i].Equal(&that1.Containers[i]) { + return fmt.Errorf("Containers this[%v](%v) Not Equal that[%v](%v)", i, this.Containers[i], i, that1.Containers[i]) + } + } + return nil +} +func (this *Response_GetContainers) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Response_GetContainers) + if !ok { + that2, ok := that.(Response_GetContainers) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Containers) != len(that1.Containers) { + return false + } + for i := range this.Containers { + if !this.Containers[i].Equal(&that1.Containers[i]) { + return false + } + } + return true +} +func (this *Response_GetContainers_Container) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Response_GetContainers_Container) + if !ok { + that2, ok := that.(Response_GetContainers_Container) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Response_GetContainers_Container") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Response_GetContainers_Container but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Response_GetContainers_Container but is not nil && this == nil") + } + if !this.FrameworkID.Equal(that1.FrameworkID) { + return fmt.Errorf("FrameworkID this(%v) Not Equal that(%v)", this.FrameworkID, that1.FrameworkID) + } + if !this.ExecutorID.Equal(that1.ExecutorID) { + return fmt.Errorf("ExecutorID this(%v) Not Equal that(%v)", this.ExecutorID, that1.ExecutorID) + } + if this.ExecutorName != nil && that1.ExecutorName != nil { + if *this.ExecutorName != *that1.ExecutorName { + return fmt.Errorf("ExecutorName this(%v) Not Equal that(%v)", *this.ExecutorName, *that1.ExecutorName) + } + } else if this.ExecutorName != nil { + return fmt.Errorf("this.ExecutorName == nil && that.ExecutorName != nil") + } else if that1.ExecutorName != nil { + return fmt.Errorf("ExecutorName this(%v) Not Equal that(%v)", this.ExecutorName, that1.ExecutorName) + } + if !this.ContainerID.Equal(&that1.ContainerID) { + return fmt.Errorf("ContainerID this(%v) Not Equal that(%v)", this.ContainerID, that1.ContainerID) + } + if !this.ContainerStatus.Equal(that1.ContainerStatus) { + return fmt.Errorf("ContainerStatus this(%v) Not Equal that(%v)", this.ContainerStatus, that1.ContainerStatus) + } + if !this.ResourceStatistics.Equal(that1.ResourceStatistics) { + return fmt.Errorf("ResourceStatistics this(%v) Not Equal that(%v)", this.ResourceStatistics, that1.ResourceStatistics) + } + return nil +} +func (this *Response_GetContainers_Container) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Response_GetContainers_Container) + if !ok { + that2, ok := that.(Response_GetContainers_Container) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.FrameworkID.Equal(that1.FrameworkID) { + return false + } + if !this.ExecutorID.Equal(that1.ExecutorID) { + return false + } + if this.ExecutorName != nil && that1.ExecutorName != nil { + if *this.ExecutorName != *that1.ExecutorName { + return false + } + } else if this.ExecutorName != nil { + return false + } else if that1.ExecutorName != nil { + return false + } + if !this.ContainerID.Equal(&that1.ContainerID) { + return false + } + if !this.ContainerStatus.Equal(that1.ContainerStatus) { + return false + } + if !this.ResourceStatistics.Equal(that1.ResourceStatistics) { + return false + } + return true +} +func (this *Response_GetFrameworks) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Response_GetFrameworks) + if !ok { + that2, ok := that.(Response_GetFrameworks) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Response_GetFrameworks") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Response_GetFrameworks but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Response_GetFrameworks but is not nil && this == nil") + } + if len(this.Frameworks) != len(that1.Frameworks) { + return fmt.Errorf("Frameworks this(%v) Not Equal that(%v)", len(this.Frameworks), len(that1.Frameworks)) + } + for i := range this.Frameworks { + if !this.Frameworks[i].Equal(&that1.Frameworks[i]) { + return fmt.Errorf("Frameworks this[%v](%v) Not Equal that[%v](%v)", i, this.Frameworks[i], i, that1.Frameworks[i]) + } + } + if len(this.CompletedFrameworks) != len(that1.CompletedFrameworks) { + return fmt.Errorf("CompletedFrameworks this(%v) Not Equal that(%v)", len(this.CompletedFrameworks), len(that1.CompletedFrameworks)) + } + for i := range this.CompletedFrameworks { + if !this.CompletedFrameworks[i].Equal(&that1.CompletedFrameworks[i]) { + return fmt.Errorf("CompletedFrameworks this[%v](%v) Not Equal that[%v](%v)", i, this.CompletedFrameworks[i], i, that1.CompletedFrameworks[i]) + } + } + return nil +} +func (this *Response_GetFrameworks) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Response_GetFrameworks) + if !ok { + that2, ok := that.(Response_GetFrameworks) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Frameworks) != len(that1.Frameworks) { + return false + } + for i := range this.Frameworks { + if !this.Frameworks[i].Equal(&that1.Frameworks[i]) { + return false + } + } + if len(this.CompletedFrameworks) != len(that1.CompletedFrameworks) { + return false + } + for i := range this.CompletedFrameworks { + if !this.CompletedFrameworks[i].Equal(&that1.CompletedFrameworks[i]) { + return false + } + } + return true +} +func (this *Response_GetFrameworks_Framework) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Response_GetFrameworks_Framework) + if !ok { + that2, ok := that.(Response_GetFrameworks_Framework) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Response_GetFrameworks_Framework") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Response_GetFrameworks_Framework but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Response_GetFrameworks_Framework but is not nil && this == nil") + } + if !this.FrameworkInfo.Equal(&that1.FrameworkInfo) { + return fmt.Errorf("FrameworkInfo this(%v) Not Equal that(%v)", this.FrameworkInfo, that1.FrameworkInfo) + } + return nil +} +func (this *Response_GetFrameworks_Framework) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Response_GetFrameworks_Framework) + if !ok { + that2, ok := that.(Response_GetFrameworks_Framework) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.FrameworkInfo.Equal(&that1.FrameworkInfo) { + return false + } + return true +} +func (this *Response_GetExecutors) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Response_GetExecutors) + if !ok { + that2, ok := that.(Response_GetExecutors) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Response_GetExecutors") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Response_GetExecutors but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Response_GetExecutors but is not nil && this == nil") + } + if len(this.Executors) != len(that1.Executors) { + return fmt.Errorf("Executors this(%v) Not Equal that(%v)", len(this.Executors), len(that1.Executors)) + } + for i := range this.Executors { + if !this.Executors[i].Equal(&that1.Executors[i]) { + return fmt.Errorf("Executors this[%v](%v) Not Equal that[%v](%v)", i, this.Executors[i], i, that1.Executors[i]) + } + } + if len(this.CompletedExecutors) != len(that1.CompletedExecutors) { + return fmt.Errorf("CompletedExecutors this(%v) Not Equal that(%v)", len(this.CompletedExecutors), len(that1.CompletedExecutors)) + } + for i := range this.CompletedExecutors { + if !this.CompletedExecutors[i].Equal(&that1.CompletedExecutors[i]) { + return fmt.Errorf("CompletedExecutors this[%v](%v) Not Equal that[%v](%v)", i, this.CompletedExecutors[i], i, that1.CompletedExecutors[i]) + } + } + return nil +} +func (this *Response_GetExecutors) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Response_GetExecutors) + if !ok { + that2, ok := that.(Response_GetExecutors) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Executors) != len(that1.Executors) { + return false + } + for i := range this.Executors { + if !this.Executors[i].Equal(&that1.Executors[i]) { + return false + } + } + if len(this.CompletedExecutors) != len(that1.CompletedExecutors) { + return false + } + for i := range this.CompletedExecutors { + if !this.CompletedExecutors[i].Equal(&that1.CompletedExecutors[i]) { + return false + } + } + return true +} +func (this *Response_GetExecutors_Executor) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Response_GetExecutors_Executor) + if !ok { + that2, ok := that.(Response_GetExecutors_Executor) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Response_GetExecutors_Executor") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Response_GetExecutors_Executor but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Response_GetExecutors_Executor but is not nil && this == nil") + } + if !this.ExecutorInfo.Equal(&that1.ExecutorInfo) { + return fmt.Errorf("ExecutorInfo this(%v) Not Equal that(%v)", this.ExecutorInfo, that1.ExecutorInfo) + } + return nil +} +func (this *Response_GetExecutors_Executor) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Response_GetExecutors_Executor) + if !ok { + that2, ok := that.(Response_GetExecutors_Executor) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.ExecutorInfo.Equal(&that1.ExecutorInfo) { + return false + } + return true +} +func (this *Response_GetTasks) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Response_GetTasks) + if !ok { + that2, ok := that.(Response_GetTasks) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Response_GetTasks") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Response_GetTasks but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Response_GetTasks but is not nil && this == nil") + } + if len(this.PendingTasks) != len(that1.PendingTasks) { + return fmt.Errorf("PendingTasks this(%v) Not Equal that(%v)", len(this.PendingTasks), len(that1.PendingTasks)) + } + for i := range this.PendingTasks { + if !this.PendingTasks[i].Equal(&that1.PendingTasks[i]) { + return fmt.Errorf("PendingTasks this[%v](%v) Not Equal that[%v](%v)", i, this.PendingTasks[i], i, that1.PendingTasks[i]) + } + } + if len(this.QueuedTasks) != len(that1.QueuedTasks) { + return fmt.Errorf("QueuedTasks this(%v) Not Equal that(%v)", len(this.QueuedTasks), len(that1.QueuedTasks)) + } + for i := range this.QueuedTasks { + if !this.QueuedTasks[i].Equal(&that1.QueuedTasks[i]) { + return fmt.Errorf("QueuedTasks this[%v](%v) Not Equal that[%v](%v)", i, this.QueuedTasks[i], i, that1.QueuedTasks[i]) + } + } + if len(this.LaunchedTasks) != len(that1.LaunchedTasks) { + return fmt.Errorf("LaunchedTasks this(%v) Not Equal that(%v)", len(this.LaunchedTasks), len(that1.LaunchedTasks)) + } + for i := range this.LaunchedTasks { + if !this.LaunchedTasks[i].Equal(&that1.LaunchedTasks[i]) { + return fmt.Errorf("LaunchedTasks this[%v](%v) Not Equal that[%v](%v)", i, this.LaunchedTasks[i], i, that1.LaunchedTasks[i]) + } + } + if len(this.TerminatedTasks) != len(that1.TerminatedTasks) { + return fmt.Errorf("TerminatedTasks this(%v) Not Equal that(%v)", len(this.TerminatedTasks), len(that1.TerminatedTasks)) + } + for i := range this.TerminatedTasks { + if !this.TerminatedTasks[i].Equal(&that1.TerminatedTasks[i]) { + return fmt.Errorf("TerminatedTasks this[%v](%v) Not Equal that[%v](%v)", i, this.TerminatedTasks[i], i, that1.TerminatedTasks[i]) + } + } + if len(this.CompletedTasks) != len(that1.CompletedTasks) { + return fmt.Errorf("CompletedTasks this(%v) Not Equal that(%v)", len(this.CompletedTasks), len(that1.CompletedTasks)) + } + for i := range this.CompletedTasks { + if !this.CompletedTasks[i].Equal(&that1.CompletedTasks[i]) { + return fmt.Errorf("CompletedTasks this[%v](%v) Not Equal that[%v](%v)", i, this.CompletedTasks[i], i, that1.CompletedTasks[i]) + } + } + return nil +} +func (this *Response_GetTasks) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Response_GetTasks) + if !ok { + that2, ok := that.(Response_GetTasks) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.PendingTasks) != len(that1.PendingTasks) { + return false + } + for i := range this.PendingTasks { + if !this.PendingTasks[i].Equal(&that1.PendingTasks[i]) { + return false + } + } + if len(this.QueuedTasks) != len(that1.QueuedTasks) { + return false + } + for i := range this.QueuedTasks { + if !this.QueuedTasks[i].Equal(&that1.QueuedTasks[i]) { + return false + } + } + if len(this.LaunchedTasks) != len(that1.LaunchedTasks) { + return false + } + for i := range this.LaunchedTasks { + if !this.LaunchedTasks[i].Equal(&that1.LaunchedTasks[i]) { + return false + } + } + if len(this.TerminatedTasks) != len(that1.TerminatedTasks) { + return false + } + for i := range this.TerminatedTasks { + if !this.TerminatedTasks[i].Equal(&that1.TerminatedTasks[i]) { + return false + } + } + if len(this.CompletedTasks) != len(that1.CompletedTasks) { + return false + } + for i := range this.CompletedTasks { + if !this.CompletedTasks[i].Equal(&that1.CompletedTasks[i]) { + return false + } + } + return true +} +func (this *Response_GetAgent) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Response_GetAgent) + if !ok { + that2, ok := that.(Response_GetAgent) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Response_GetAgent") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Response_GetAgent but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Response_GetAgent but is not nil && this == nil") + } + if !this.AgentInfo.Equal(that1.AgentInfo) { + return fmt.Errorf("AgentInfo this(%v) Not Equal that(%v)", this.AgentInfo, that1.AgentInfo) + } + return nil +} +func (this *Response_GetAgent) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Response_GetAgent) + if !ok { + that2, ok := that.(Response_GetAgent) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.AgentInfo.Equal(that1.AgentInfo) { + return false + } + return true +} +func (this *Response_GetResourceProviders) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Response_GetResourceProviders) + if !ok { + that2, ok := that.(Response_GetResourceProviders) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Response_GetResourceProviders") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Response_GetResourceProviders but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Response_GetResourceProviders but is not nil && this == nil") + } + if len(this.ResourceProviders) != len(that1.ResourceProviders) { + return fmt.Errorf("ResourceProviders this(%v) Not Equal that(%v)", len(this.ResourceProviders), len(that1.ResourceProviders)) + } + for i := range this.ResourceProviders { + if !this.ResourceProviders[i].Equal(&that1.ResourceProviders[i]) { + return fmt.Errorf("ResourceProviders this[%v](%v) Not Equal that[%v](%v)", i, this.ResourceProviders[i], i, that1.ResourceProviders[i]) + } + } + return nil +} +func (this *Response_GetResourceProviders) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Response_GetResourceProviders) + if !ok { + that2, ok := that.(Response_GetResourceProviders) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.ResourceProviders) != len(that1.ResourceProviders) { + return false + } + for i := range this.ResourceProviders { + if !this.ResourceProviders[i].Equal(&that1.ResourceProviders[i]) { + return false + } + } + return true +} +func (this *Response_GetResourceProviders_ResourceProvider) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Response_GetResourceProviders_ResourceProvider) + if !ok { + that2, ok := that.(Response_GetResourceProviders_ResourceProvider) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Response_GetResourceProviders_ResourceProvider") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Response_GetResourceProviders_ResourceProvider but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Response_GetResourceProviders_ResourceProvider but is not nil && this == nil") + } + if !this.ResourceProviderInfo.Equal(&that1.ResourceProviderInfo) { + return fmt.Errorf("ResourceProviderInfo this(%v) Not Equal that(%v)", this.ResourceProviderInfo, that1.ResourceProviderInfo) + } + return nil +} +func (this *Response_GetResourceProviders_ResourceProvider) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Response_GetResourceProviders_ResourceProvider) + if !ok { + that2, ok := that.(Response_GetResourceProviders_ResourceProvider) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.ResourceProviderInfo.Equal(&that1.ResourceProviderInfo) { + return false + } + return true +} +func (this *Response_WaitNestedContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Response_WaitNestedContainer) + if !ok { + that2, ok := that.(Response_WaitNestedContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Response_WaitNestedContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Response_WaitNestedContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Response_WaitNestedContainer but is not nil && this == nil") + } + if this.ExitStatus != nil && that1.ExitStatus != nil { + if *this.ExitStatus != *that1.ExitStatus { + return fmt.Errorf("ExitStatus this(%v) Not Equal that(%v)", *this.ExitStatus, *that1.ExitStatus) + } + } else if this.ExitStatus != nil { + return fmt.Errorf("this.ExitStatus == nil && that.ExitStatus != nil") + } else if that1.ExitStatus != nil { + return fmt.Errorf("ExitStatus this(%v) Not Equal that(%v)", this.ExitStatus, that1.ExitStatus) + } + if this.State != nil && that1.State != nil { + if *this.State != *that1.State { + return fmt.Errorf("State this(%v) Not Equal that(%v)", *this.State, *that1.State) + } + } else if this.State != nil { + return fmt.Errorf("this.State == nil && that.State != nil") + } else if that1.State != nil { + return fmt.Errorf("State this(%v) Not Equal that(%v)", this.State, that1.State) + } + if this.Reason != nil && that1.Reason != nil { + if *this.Reason != *that1.Reason { + return fmt.Errorf("Reason this(%v) Not Equal that(%v)", *this.Reason, *that1.Reason) + } + } else if this.Reason != nil { + return fmt.Errorf("this.Reason == nil && that.Reason != nil") + } else if that1.Reason != nil { + return fmt.Errorf("Reason this(%v) Not Equal that(%v)", this.Reason, that1.Reason) + } + if !this.Limitation.Equal(that1.Limitation) { + return fmt.Errorf("Limitation this(%v) Not Equal that(%v)", this.Limitation, that1.Limitation) + } + if this.Message != nil && that1.Message != nil { + if *this.Message != *that1.Message { + return fmt.Errorf("Message this(%v) Not Equal that(%v)", *this.Message, *that1.Message) + } + } else if this.Message != nil { + return fmt.Errorf("this.Message == nil && that.Message != nil") + } else if that1.Message != nil { + return fmt.Errorf("Message this(%v) Not Equal that(%v)", this.Message, that1.Message) + } + return nil +} +func (this *Response_WaitNestedContainer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Response_WaitNestedContainer) + if !ok { + that2, ok := that.(Response_WaitNestedContainer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.ExitStatus != nil && that1.ExitStatus != nil { + if *this.ExitStatus != *that1.ExitStatus { + return false + } + } else if this.ExitStatus != nil { + return false + } else if that1.ExitStatus != nil { + return false + } + if this.State != nil && that1.State != nil { + if *this.State != *that1.State { + return false + } + } else if this.State != nil { + return false + } else if that1.State != nil { + return false + } + if this.Reason != nil && that1.Reason != nil { + if *this.Reason != *that1.Reason { + return false + } + } else if this.Reason != nil { + return false + } else if that1.Reason != nil { + return false + } + if !this.Limitation.Equal(that1.Limitation) { + return false + } + if this.Message != nil && that1.Message != nil { + if *this.Message != *that1.Message { + return false + } + } else if this.Message != nil { + return false + } else if that1.Message != nil { + return false + } + return true +} +func (this *Response_WaitContainer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Response_WaitContainer) + if !ok { + that2, ok := that.(Response_WaitContainer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Response_WaitContainer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Response_WaitContainer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Response_WaitContainer but is not nil && this == nil") + } + if this.ExitStatus != nil && that1.ExitStatus != nil { + if *this.ExitStatus != *that1.ExitStatus { + return fmt.Errorf("ExitStatus this(%v) Not Equal that(%v)", *this.ExitStatus, *that1.ExitStatus) + } + } else if this.ExitStatus != nil { + return fmt.Errorf("this.ExitStatus == nil && that.ExitStatus != nil") + } else if that1.ExitStatus != nil { + return fmt.Errorf("ExitStatus this(%v) Not Equal that(%v)", this.ExitStatus, that1.ExitStatus) + } + if this.State != nil && that1.State != nil { + if *this.State != *that1.State { + return fmt.Errorf("State this(%v) Not Equal that(%v)", *this.State, *that1.State) + } + } else if this.State != nil { + return fmt.Errorf("this.State == nil && that.State != nil") + } else if that1.State != nil { + return fmt.Errorf("State this(%v) Not Equal that(%v)", this.State, that1.State) + } + if this.Reason != nil && that1.Reason != nil { + if *this.Reason != *that1.Reason { + return fmt.Errorf("Reason this(%v) Not Equal that(%v)", *this.Reason, *that1.Reason) + } + } else if this.Reason != nil { + return fmt.Errorf("this.Reason == nil && that.Reason != nil") + } else if that1.Reason != nil { + return fmt.Errorf("Reason this(%v) Not Equal that(%v)", this.Reason, that1.Reason) + } + if !this.Limitation.Equal(that1.Limitation) { + return fmt.Errorf("Limitation this(%v) Not Equal that(%v)", this.Limitation, that1.Limitation) + } + if this.Message != nil && that1.Message != nil { + if *this.Message != *that1.Message { + return fmt.Errorf("Message this(%v) Not Equal that(%v)", *this.Message, *that1.Message) + } + } else if this.Message != nil { + return fmt.Errorf("this.Message == nil && that.Message != nil") + } else if that1.Message != nil { + return fmt.Errorf("Message this(%v) Not Equal that(%v)", this.Message, that1.Message) + } + return nil +} +func (this *Response_WaitContainer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Response_WaitContainer) + if !ok { + that2, ok := that.(Response_WaitContainer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.ExitStatus != nil && that1.ExitStatus != nil { + if *this.ExitStatus != *that1.ExitStatus { + return false + } + } else if this.ExitStatus != nil { + return false + } else if that1.ExitStatus != nil { + return false + } + if this.State != nil && that1.State != nil { + if *this.State != *that1.State { + return false + } + } else if this.State != nil { + return false + } else if that1.State != nil { + return false + } + if this.Reason != nil && that1.Reason != nil { + if *this.Reason != *that1.Reason { + return false + } + } else if this.Reason != nil { + return false + } else if that1.Reason != nil { + return false + } + if !this.Limitation.Equal(that1.Limitation) { + return false + } + if this.Message != nil && that1.Message != nil { + if *this.Message != *that1.Message { + return false + } + } else if this.Message != nil { + return false + } else if that1.Message != nil { + return false + } + return true +} +func (this *ProcessIO) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ProcessIO) + if !ok { + that2, ok := that.(ProcessIO) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ProcessIO") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ProcessIO but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ProcessIO but is not nil && this == nil") + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.Data.Equal(that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if !this.Control.Equal(that1.Control) { + return fmt.Errorf("Control this(%v) Not Equal that(%v)", this.Control, that1.Control) + } + return nil +} +func (this *ProcessIO) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ProcessIO) + if !ok { + that2, ok := that.(ProcessIO) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + if !this.Data.Equal(that1.Data) { + return false + } + if !this.Control.Equal(that1.Control) { + return false + } + return true +} +func (this *ProcessIO_Data) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ProcessIO_Data) + if !ok { + that2, ok := that.(ProcessIO_Data) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ProcessIO_Data") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ProcessIO_Data but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ProcessIO_Data but is not nil && this == nil") + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + return nil +} +func (this *ProcessIO_Data) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ProcessIO_Data) + if !ok { + that2, ok := that.(ProcessIO_Data) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + return true +} +func (this *ProcessIO_Control) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ProcessIO_Control) + if !ok { + that2, ok := that.(ProcessIO_Control) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ProcessIO_Control") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ProcessIO_Control but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ProcessIO_Control but is not nil && this == nil") + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.TTYInfo.Equal(that1.TTYInfo) { + return fmt.Errorf("TTYInfo this(%v) Not Equal that(%v)", this.TTYInfo, that1.TTYInfo) + } + if !this.Heartbeat.Equal(that1.Heartbeat) { + return fmt.Errorf("Heartbeat this(%v) Not Equal that(%v)", this.Heartbeat, that1.Heartbeat) + } + return nil +} +func (this *ProcessIO_Control) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ProcessIO_Control) + if !ok { + that2, ok := that.(ProcessIO_Control) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + if !this.TTYInfo.Equal(that1.TTYInfo) { + return false + } + if !this.Heartbeat.Equal(that1.Heartbeat) { + return false + } + return true +} +func (this *ProcessIO_Control_Heartbeat) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ProcessIO_Control_Heartbeat) + if !ok { + that2, ok := that.(ProcessIO_Control_Heartbeat) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ProcessIO_Control_Heartbeat") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ProcessIO_Control_Heartbeat but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ProcessIO_Control_Heartbeat but is not nil && this == nil") + } + if !this.Interval.Equal(that1.Interval) { + return fmt.Errorf("Interval this(%v) Not Equal that(%v)", this.Interval, that1.Interval) + } + return nil +} +func (this *ProcessIO_Control_Heartbeat) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ProcessIO_Control_Heartbeat) + if !ok { + that2, ok := that.(ProcessIO_Control_Heartbeat) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Interval.Equal(that1.Interval) { + return false + } + return true +} +func (this *Call) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 25) + s = append(s, "&agent.Call{") + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + if this.GetMetrics != nil { + s = append(s, "GetMetrics: "+fmt.Sprintf("%#v", this.GetMetrics)+",\n") + } + if this.SetLoggingLevel != nil { + s = append(s, "SetLoggingLevel: "+fmt.Sprintf("%#v", this.SetLoggingLevel)+",\n") + } + if this.ListFiles != nil { + s = append(s, "ListFiles: "+fmt.Sprintf("%#v", this.ListFiles)+",\n") + } + if this.ReadFile != nil { + s = append(s, "ReadFile: "+fmt.Sprintf("%#v", this.ReadFile)+",\n") + } + if this.GetContainers != nil { + s = append(s, "GetContainers: "+fmt.Sprintf("%#v", this.GetContainers)+",\n") + } + if this.LaunchNestedContainer != nil { + s = append(s, "LaunchNestedContainer: "+fmt.Sprintf("%#v", this.LaunchNestedContainer)+",\n") + } + if this.WaitNestedContainer != nil { + s = append(s, "WaitNestedContainer: "+fmt.Sprintf("%#v", this.WaitNestedContainer)+",\n") + } + if this.KillNestedContainer != nil { + s = append(s, "KillNestedContainer: "+fmt.Sprintf("%#v", this.KillNestedContainer)+",\n") + } + if this.RemoveNestedContainer != nil { + s = append(s, "RemoveNestedContainer: "+fmt.Sprintf("%#v", this.RemoveNestedContainer)+",\n") + } + if this.LaunchNestedContainerSession != nil { + s = append(s, "LaunchNestedContainerSession: "+fmt.Sprintf("%#v", this.LaunchNestedContainerSession)+",\n") + } + if this.AttachContainerInput != nil { + s = append(s, "AttachContainerInput: "+fmt.Sprintf("%#v", this.AttachContainerInput)+",\n") + } + if this.AttachContainerOutput != nil { + s = append(s, "AttachContainerOutput: "+fmt.Sprintf("%#v", this.AttachContainerOutput)+",\n") + } + if this.LaunchContainer != nil { + s = append(s, "LaunchContainer: "+fmt.Sprintf("%#v", this.LaunchContainer)+",\n") + } + if this.WaitContainer != nil { + s = append(s, "WaitContainer: "+fmt.Sprintf("%#v", this.WaitContainer)+",\n") + } + if this.KillContainer != nil { + s = append(s, "KillContainer: "+fmt.Sprintf("%#v", this.KillContainer)+",\n") + } + if this.RemoveContainer != nil { + s = append(s, "RemoveContainer: "+fmt.Sprintf("%#v", this.RemoveContainer)+",\n") + } + if this.AddResourceProviderConfig != nil { + s = append(s, "AddResourceProviderConfig: "+fmt.Sprintf("%#v", this.AddResourceProviderConfig)+",\n") + } + if this.UpdateResourceProviderConfig != nil { + s = append(s, "UpdateResourceProviderConfig: "+fmt.Sprintf("%#v", this.UpdateResourceProviderConfig)+",\n") + } + if this.RemoveResourceProviderConfig != nil { + s = append(s, "RemoveResourceProviderConfig: "+fmt.Sprintf("%#v", this.RemoveResourceProviderConfig)+",\n") + } + if this.PruneImages != nil { + s = append(s, "PruneImages: "+fmt.Sprintf("%#v", this.PruneImages)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Call_GetMetrics) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&agent.Call_GetMetrics{") + if this.Timeout != nil { + s = append(s, "Timeout: "+fmt.Sprintf("%#v", this.Timeout)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Call_SetLoggingLevel) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&agent.Call_SetLoggingLevel{") + s = append(s, "Level: "+fmt.Sprintf("%#v", this.Level)+",\n") + s = append(s, "Duration: "+strings.Replace(this.Duration.GoString(), `&`, ``, 1)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Call_ListFiles) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&agent.Call_ListFiles{") + s = append(s, "Path: "+fmt.Sprintf("%#v", this.Path)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Call_ReadFile) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&agent.Call_ReadFile{") + s = append(s, "Path: "+fmt.Sprintf("%#v", this.Path)+",\n") + s = append(s, "Offset: "+fmt.Sprintf("%#v", this.Offset)+",\n") + if this.Length != nil { + s = append(s, "Length: "+valueToGoStringAgent(this.Length, "uint64")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Call_GetContainers) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&agent.Call_GetContainers{") + if this.ShowNested != nil { + s = append(s, "ShowNested: "+valueToGoStringAgent(this.ShowNested, "bool")+",\n") + } + if this.ShowStandalone != nil { + s = append(s, "ShowStandalone: "+valueToGoStringAgent(this.ShowStandalone, "bool")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Call_LaunchNestedContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&agent.Call_LaunchNestedContainer{") + s = append(s, "ContainerID: "+strings.Replace(this.ContainerID.GoString(), `&`, ``, 1)+",\n") + if this.Command != nil { + s = append(s, "Command: "+fmt.Sprintf("%#v", this.Command)+",\n") + } + if this.Container != nil { + s = append(s, "Container: "+fmt.Sprintf("%#v", this.Container)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Call_WaitNestedContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&agent.Call_WaitNestedContainer{") + s = append(s, "ContainerID: "+strings.Replace(this.ContainerID.GoString(), `&`, ``, 1)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Call_KillNestedContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&agent.Call_KillNestedContainer{") + s = append(s, "ContainerID: "+strings.Replace(this.ContainerID.GoString(), `&`, ``, 1)+",\n") + if this.Signal != nil { + s = append(s, "Signal: "+valueToGoStringAgent(this.Signal, "int32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Call_RemoveNestedContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&agent.Call_RemoveNestedContainer{") + s = append(s, "ContainerID: "+strings.Replace(this.ContainerID.GoString(), `&`, ``, 1)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Call_LaunchNestedContainerSession) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&agent.Call_LaunchNestedContainerSession{") + s = append(s, "ContainerID: "+strings.Replace(this.ContainerID.GoString(), `&`, ``, 1)+",\n") + if this.Command != nil { + s = append(s, "Command: "+fmt.Sprintf("%#v", this.Command)+",\n") + } + if this.Container != nil { + s = append(s, "Container: "+fmt.Sprintf("%#v", this.Container)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Call_AttachContainerInput) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&agent.Call_AttachContainerInput{") + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + if this.ContainerID != nil { + s = append(s, "ContainerID: "+fmt.Sprintf("%#v", this.ContainerID)+",\n") + } + if this.ProcessIO != nil { + s = append(s, "ProcessIO: "+fmt.Sprintf("%#v", this.ProcessIO)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Call_AttachContainerOutput) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&agent.Call_AttachContainerOutput{") + s = append(s, "ContainerID: "+strings.Replace(this.ContainerID.GoString(), `&`, ``, 1)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Call_LaunchContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&agent.Call_LaunchContainer{") + s = append(s, "ContainerID: "+strings.Replace(this.ContainerID.GoString(), `&`, ``, 1)+",\n") + if this.Command != nil { + s = append(s, "Command: "+fmt.Sprintf("%#v", this.Command)+",\n") + } + if this.Resources != nil { + s = append(s, "Resources: "+fmt.Sprintf("%#v", this.Resources)+",\n") + } + if this.Container != nil { + s = append(s, "Container: "+fmt.Sprintf("%#v", this.Container)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Call_WaitContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&agent.Call_WaitContainer{") + s = append(s, "ContainerID: "+strings.Replace(this.ContainerID.GoString(), `&`, ``, 1)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Call_KillContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&agent.Call_KillContainer{") + s = append(s, "ContainerID: "+strings.Replace(this.ContainerID.GoString(), `&`, ``, 1)+",\n") + if this.Signal != nil { + s = append(s, "Signal: "+valueToGoStringAgent(this.Signal, "int32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Call_RemoveContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&agent.Call_RemoveContainer{") + s = append(s, "ContainerID: "+strings.Replace(this.ContainerID.GoString(), `&`, ``, 1)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Call_AddResourceProviderConfig) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&agent.Call_AddResourceProviderConfig{") + s = append(s, "Info: "+strings.Replace(this.Info.GoString(), `&`, ``, 1)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Call_UpdateResourceProviderConfig) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&agent.Call_UpdateResourceProviderConfig{") + s = append(s, "Info: "+strings.Replace(this.Info.GoString(), `&`, ``, 1)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Call_RemoveResourceProviderConfig) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&agent.Call_RemoveResourceProviderConfig{") + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Call_PruneImages) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&agent.Call_PruneImages{") + if this.ExcludedImages != nil { + s = append(s, "ExcludedImages: "+fmt.Sprintf("%#v", this.ExcludedImages)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Response) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 21) + s = append(s, "&agent.Response{") + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + if this.GetHealth != nil { + s = append(s, "GetHealth: "+fmt.Sprintf("%#v", this.GetHealth)+",\n") + } + if this.GetFlags != nil { + s = append(s, "GetFlags: "+fmt.Sprintf("%#v", this.GetFlags)+",\n") + } + if this.GetVersion != nil { + s = append(s, "GetVersion: "+fmt.Sprintf("%#v", this.GetVersion)+",\n") + } + if this.GetMetrics != nil { + s = append(s, "GetMetrics: "+fmt.Sprintf("%#v", this.GetMetrics)+",\n") + } + if this.GetLoggingLevel != nil { + s = append(s, "GetLoggingLevel: "+fmt.Sprintf("%#v", this.GetLoggingLevel)+",\n") + } + if this.ListFiles != nil { + s = append(s, "ListFiles: "+fmt.Sprintf("%#v", this.ListFiles)+",\n") + } + if this.ReadFile != nil { + s = append(s, "ReadFile: "+fmt.Sprintf("%#v", this.ReadFile)+",\n") + } + if this.GetState != nil { + s = append(s, "GetState: "+fmt.Sprintf("%#v", this.GetState)+",\n") + } + if this.GetContainers != nil { + s = append(s, "GetContainers: "+fmt.Sprintf("%#v", this.GetContainers)+",\n") + } + if this.GetFrameworks != nil { + s = append(s, "GetFrameworks: "+fmt.Sprintf("%#v", this.GetFrameworks)+",\n") + } + if this.GetExecutors != nil { + s = append(s, "GetExecutors: "+fmt.Sprintf("%#v", this.GetExecutors)+",\n") + } + if this.GetTasks != nil { + s = append(s, "GetTasks: "+fmt.Sprintf("%#v", this.GetTasks)+",\n") + } + if this.GetAgent != nil { + s = append(s, "GetAgent: "+fmt.Sprintf("%#v", this.GetAgent)+",\n") + } + if this.GetResourceProviders != nil { + s = append(s, "GetResourceProviders: "+fmt.Sprintf("%#v", this.GetResourceProviders)+",\n") + } + if this.WaitNestedContainer != nil { + s = append(s, "WaitNestedContainer: "+fmt.Sprintf("%#v", this.WaitNestedContainer)+",\n") + } + if this.WaitContainer != nil { + s = append(s, "WaitContainer: "+fmt.Sprintf("%#v", this.WaitContainer)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Response_GetHealth) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&agent.Response_GetHealth{") + s = append(s, "Healthy: "+fmt.Sprintf("%#v", this.Healthy)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Response_GetFlags) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&agent.Response_GetFlags{") + if this.Flags != nil { + s = append(s, "Flags: "+fmt.Sprintf("%#v", this.Flags)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Response_GetVersion) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&agent.Response_GetVersion{") + s = append(s, "VersionInfo: "+strings.Replace(this.VersionInfo.GoString(), `&`, ``, 1)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Response_GetMetrics) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&agent.Response_GetMetrics{") + if this.Metrics != nil { + s = append(s, "Metrics: "+fmt.Sprintf("%#v", this.Metrics)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Response_GetLoggingLevel) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&agent.Response_GetLoggingLevel{") + s = append(s, "Level: "+fmt.Sprintf("%#v", this.Level)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Response_ListFiles) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&agent.Response_ListFiles{") + if this.FileInfos != nil { + s = append(s, "FileInfos: "+fmt.Sprintf("%#v", this.FileInfos)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Response_ReadFile) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&agent.Response_ReadFile{") + s = append(s, "Size: "+fmt.Sprintf("%#v", this.Size)+",\n") + if this.Data != nil { + s = append(s, "Data: "+valueToGoStringAgent(this.Data, "byte")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Response_GetState) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&agent.Response_GetState{") + if this.GetTasks != nil { + s = append(s, "GetTasks: "+fmt.Sprintf("%#v", this.GetTasks)+",\n") + } + if this.GetExecutors != nil { + s = append(s, "GetExecutors: "+fmt.Sprintf("%#v", this.GetExecutors)+",\n") + } + if this.GetFrameworks != nil { + s = append(s, "GetFrameworks: "+fmt.Sprintf("%#v", this.GetFrameworks)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Response_GetContainers) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&agent.Response_GetContainers{") + if this.Containers != nil { + s = append(s, "Containers: "+fmt.Sprintf("%#v", this.Containers)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Response_GetContainers_Container) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&agent.Response_GetContainers_Container{") + if this.FrameworkID != nil { + s = append(s, "FrameworkID: "+fmt.Sprintf("%#v", this.FrameworkID)+",\n") + } + if this.ExecutorID != nil { + s = append(s, "ExecutorID: "+fmt.Sprintf("%#v", this.ExecutorID)+",\n") + } + if this.ExecutorName != nil { + s = append(s, "ExecutorName: "+valueToGoStringAgent(this.ExecutorName, "string")+",\n") + } + s = append(s, "ContainerID: "+strings.Replace(this.ContainerID.GoString(), `&`, ``, 1)+",\n") + if this.ContainerStatus != nil { + s = append(s, "ContainerStatus: "+fmt.Sprintf("%#v", this.ContainerStatus)+",\n") + } + if this.ResourceStatistics != nil { + s = append(s, "ResourceStatistics: "+fmt.Sprintf("%#v", this.ResourceStatistics)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Response_GetFrameworks) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&agent.Response_GetFrameworks{") + if this.Frameworks != nil { + s = append(s, "Frameworks: "+fmt.Sprintf("%#v", this.Frameworks)+",\n") + } + if this.CompletedFrameworks != nil { + s = append(s, "CompletedFrameworks: "+fmt.Sprintf("%#v", this.CompletedFrameworks)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Response_GetFrameworks_Framework) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&agent.Response_GetFrameworks_Framework{") + s = append(s, "FrameworkInfo: "+strings.Replace(this.FrameworkInfo.GoString(), `&`, ``, 1)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Response_GetExecutors) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&agent.Response_GetExecutors{") + if this.Executors != nil { + s = append(s, "Executors: "+fmt.Sprintf("%#v", this.Executors)+",\n") + } + if this.CompletedExecutors != nil { + s = append(s, "CompletedExecutors: "+fmt.Sprintf("%#v", this.CompletedExecutors)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Response_GetExecutors_Executor) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&agent.Response_GetExecutors_Executor{") + s = append(s, "ExecutorInfo: "+strings.Replace(this.ExecutorInfo.GoString(), `&`, ``, 1)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Response_GetTasks) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&agent.Response_GetTasks{") + if this.PendingTasks != nil { + s = append(s, "PendingTasks: "+fmt.Sprintf("%#v", this.PendingTasks)+",\n") + } + if this.QueuedTasks != nil { + s = append(s, "QueuedTasks: "+fmt.Sprintf("%#v", this.QueuedTasks)+",\n") + } + if this.LaunchedTasks != nil { + s = append(s, "LaunchedTasks: "+fmt.Sprintf("%#v", this.LaunchedTasks)+",\n") + } + if this.TerminatedTasks != nil { + s = append(s, "TerminatedTasks: "+fmt.Sprintf("%#v", this.TerminatedTasks)+",\n") + } + if this.CompletedTasks != nil { + s = append(s, "CompletedTasks: "+fmt.Sprintf("%#v", this.CompletedTasks)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Response_GetAgent) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&agent.Response_GetAgent{") + if this.AgentInfo != nil { + s = append(s, "AgentInfo: "+fmt.Sprintf("%#v", this.AgentInfo)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Response_GetResourceProviders) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&agent.Response_GetResourceProviders{") + if this.ResourceProviders != nil { + s = append(s, "ResourceProviders: "+fmt.Sprintf("%#v", this.ResourceProviders)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Response_GetResourceProviders_ResourceProvider) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&agent.Response_GetResourceProviders_ResourceProvider{") + s = append(s, "ResourceProviderInfo: "+strings.Replace(this.ResourceProviderInfo.GoString(), `&`, ``, 1)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Response_WaitNestedContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&agent.Response_WaitNestedContainer{") + if this.ExitStatus != nil { + s = append(s, "ExitStatus: "+valueToGoStringAgent(this.ExitStatus, "int32")+",\n") + } + if this.State != nil { + s = append(s, "State: "+valueToGoStringAgent(this.State, "mesos.TaskState")+",\n") + } + if this.Reason != nil { + s = append(s, "Reason: "+valueToGoStringAgent(this.Reason, "mesos.TaskStatus_Reason")+",\n") + } + if this.Limitation != nil { + s = append(s, "Limitation: "+fmt.Sprintf("%#v", this.Limitation)+",\n") + } + if this.Message != nil { + s = append(s, "Message: "+valueToGoStringAgent(this.Message, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Response_WaitContainer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&agent.Response_WaitContainer{") + if this.ExitStatus != nil { + s = append(s, "ExitStatus: "+valueToGoStringAgent(this.ExitStatus, "int32")+",\n") + } + if this.State != nil { + s = append(s, "State: "+valueToGoStringAgent(this.State, "mesos.TaskState")+",\n") + } + if this.Reason != nil { + s = append(s, "Reason: "+valueToGoStringAgent(this.Reason, "mesos.TaskStatus_Reason")+",\n") + } + if this.Limitation != nil { + s = append(s, "Limitation: "+fmt.Sprintf("%#v", this.Limitation)+",\n") + } + if this.Message != nil { + s = append(s, "Message: "+valueToGoStringAgent(this.Message, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ProcessIO) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&agent.ProcessIO{") + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + if this.Data != nil { + s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") + } + if this.Control != nil { + s = append(s, "Control: "+fmt.Sprintf("%#v", this.Control)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ProcessIO_Data) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&agent.ProcessIO_Data{") + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + if this.Data != nil { + s = append(s, "Data: "+valueToGoStringAgent(this.Data, "byte")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ProcessIO_Control) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&agent.ProcessIO_Control{") + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + if this.TTYInfo != nil { + s = append(s, "TTYInfo: "+fmt.Sprintf("%#v", this.TTYInfo)+",\n") + } + if this.Heartbeat != nil { + s = append(s, "Heartbeat: "+fmt.Sprintf("%#v", this.Heartbeat)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ProcessIO_Control_Heartbeat) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&agent.ProcessIO_Control_Heartbeat{") + if this.Interval != nil { + s = append(s, "Interval: "+fmt.Sprintf("%#v", this.Interval)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringAgent(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *Call) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Call) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Type)) + if m.GetMetrics != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.GetMetrics.ProtoSize())) + n1, err := m.GetMetrics.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + if m.SetLoggingLevel != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.SetLoggingLevel.ProtoSize())) + n2, err := m.SetLoggingLevel.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + } + if m.ListFiles != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.ListFiles.ProtoSize())) + n3, err := m.ListFiles.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + } + if m.ReadFile != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.ReadFile.ProtoSize())) + n4, err := m.ReadFile.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + if m.LaunchNestedContainer != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.LaunchNestedContainer.ProtoSize())) + n5, err := m.LaunchNestedContainer.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + } + if m.WaitNestedContainer != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.WaitNestedContainer.ProtoSize())) + n6, err := m.WaitNestedContainer.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + if m.KillNestedContainer != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.KillNestedContainer.ProtoSize())) + n7, err := m.KillNestedContainer.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + } + if m.LaunchNestedContainerSession != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.LaunchNestedContainerSession.ProtoSize())) + n8, err := m.LaunchNestedContainerSession.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } + if m.AttachContainerInput != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.AttachContainerInput.ProtoSize())) + n9, err := m.AttachContainerInput.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + } + if m.AttachContainerOutput != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.AttachContainerOutput.ProtoSize())) + n10, err := m.AttachContainerOutput.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + } + if m.RemoveNestedContainer != nil { + dAtA[i] = 0x62 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.RemoveNestedContainer.ProtoSize())) + n11, err := m.RemoveNestedContainer.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + } + if m.LaunchContainer != nil { + dAtA[i] = 0x6a + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.LaunchContainer.ProtoSize())) + n12, err := m.LaunchContainer.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n12 + } + if m.WaitContainer != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.WaitContainer.ProtoSize())) + n13, err := m.WaitContainer.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n13 + } + if m.KillContainer != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.KillContainer.ProtoSize())) + n14, err := m.KillContainer.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n14 + } + if m.RemoveContainer != nil { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.RemoveContainer.ProtoSize())) + n15, err := m.RemoveContainer.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n15 + } + if m.AddResourceProviderConfig != nil { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.AddResourceProviderConfig.ProtoSize())) + n16, err := m.AddResourceProviderConfig.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n16 + } + if m.UpdateResourceProviderConfig != nil { + dAtA[i] = 0x92 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.UpdateResourceProviderConfig.ProtoSize())) + n17, err := m.UpdateResourceProviderConfig.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n17 + } + if m.RemoveResourceProviderConfig != nil { + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.RemoveResourceProviderConfig.ProtoSize())) + n18, err := m.RemoveResourceProviderConfig.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n18 + } + if m.GetContainers != nil { + dAtA[i] = 0xa2 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.GetContainers.ProtoSize())) + n19, err := m.GetContainers.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n19 + } + if m.PruneImages != nil { + dAtA[i] = 0xaa + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.PruneImages.ProtoSize())) + n20, err := m.PruneImages.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n20 + } + return i, nil +} + +func (m *Call_GetMetrics) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Call_GetMetrics) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Timeout != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Timeout.ProtoSize())) + n21, err := m.Timeout.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n21 + } + return i, nil +} + +func (m *Call_SetLoggingLevel) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Call_SetLoggingLevel) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Level)) + dAtA[i] = 0x12 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Duration.ProtoSize())) + n22, err := m.Duration.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n22 + return i, nil +} + +func (m *Call_ListFiles) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Call_ListFiles) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(len(m.Path))) + i += copy(dAtA[i:], m.Path) + return i, nil +} + +func (m *Call_ReadFile) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Call_ReadFile) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(len(m.Path))) + i += copy(dAtA[i:], m.Path) + dAtA[i] = 0x10 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Offset)) + if m.Length != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintAgent(dAtA, i, uint64(*m.Length)) + } + return i, nil +} + +func (m *Call_GetContainers) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Call_GetContainers) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ShowNested != nil { + dAtA[i] = 0x8 + i++ + if *m.ShowNested { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.ShowStandalone != nil { + dAtA[i] = 0x10 + i++ + if *m.ShowStandalone { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *Call_LaunchNestedContainer) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Call_LaunchNestedContainer) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.ContainerID.ProtoSize())) + n23, err := m.ContainerID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n23 + if m.Command != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Command.ProtoSize())) + n24, err := m.Command.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n24 + } + if m.Container != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Container.ProtoSize())) + n25, err := m.Container.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n25 + } + return i, nil +} + +func (m *Call_WaitNestedContainer) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Call_WaitNestedContainer) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.ContainerID.ProtoSize())) + n26, err := m.ContainerID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n26 + return i, nil +} + +func (m *Call_KillNestedContainer) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Call_KillNestedContainer) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.ContainerID.ProtoSize())) + n27, err := m.ContainerID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n27 + if m.Signal != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintAgent(dAtA, i, uint64(*m.Signal)) + } + return i, nil +} + +func (m *Call_RemoveNestedContainer) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Call_RemoveNestedContainer) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.ContainerID.ProtoSize())) + n28, err := m.ContainerID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n28 + return i, nil +} + +func (m *Call_LaunchNestedContainerSession) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Call_LaunchNestedContainerSession) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.ContainerID.ProtoSize())) + n29, err := m.ContainerID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n29 + if m.Command != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Command.ProtoSize())) + n30, err := m.Command.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n30 + } + if m.Container != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Container.ProtoSize())) + n31, err := m.Container.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n31 + } + return i, nil +} + +func (m *Call_AttachContainerInput) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Call_AttachContainerInput) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Type)) + if m.ContainerID != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.ContainerID.ProtoSize())) + n32, err := m.ContainerID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n32 + } + if m.ProcessIO != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.ProcessIO.ProtoSize())) + n33, err := m.ProcessIO.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n33 + } + return i, nil +} + +func (m *Call_AttachContainerOutput) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Call_AttachContainerOutput) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.ContainerID.ProtoSize())) + n34, err := m.ContainerID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n34 + return i, nil +} + +func (m *Call_LaunchContainer) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Call_LaunchContainer) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.ContainerID.ProtoSize())) + n35, err := m.ContainerID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n35 + if m.Command != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Command.ProtoSize())) + n36, err := m.Command.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n36 + } + if len(m.Resources) > 0 { + for _, msg := range m.Resources { + dAtA[i] = 0x1a + i++ + i = encodeVarintAgent(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Container != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Container.ProtoSize())) + n37, err := m.Container.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n37 + } + return i, nil +} + +func (m *Call_WaitContainer) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Call_WaitContainer) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.ContainerID.ProtoSize())) + n38, err := m.ContainerID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n38 + return i, nil +} + +func (m *Call_KillContainer) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Call_KillContainer) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.ContainerID.ProtoSize())) + n39, err := m.ContainerID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n39 + if m.Signal != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintAgent(dAtA, i, uint64(*m.Signal)) + } + return i, nil +} + +func (m *Call_RemoveContainer) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Call_RemoveContainer) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.ContainerID.ProtoSize())) + n40, err := m.ContainerID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n40 + return i, nil +} + +func (m *Call_AddResourceProviderConfig) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Call_AddResourceProviderConfig) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Info.ProtoSize())) + n41, err := m.Info.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n41 + return i, nil +} + +func (m *Call_UpdateResourceProviderConfig) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Call_UpdateResourceProviderConfig) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Info.ProtoSize())) + n42, err := m.Info.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n42 + return i, nil +} + +func (m *Call_RemoveResourceProviderConfig) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Call_RemoveResourceProviderConfig) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(len(m.Type))) + i += copy(dAtA[i:], m.Type) + dAtA[i] = 0x12 + i++ + i = encodeVarintAgent(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + return i, nil +} + +func (m *Call_PruneImages) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Call_PruneImages) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ExcludedImages) > 0 { + for _, msg := range m.ExcludedImages { + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Response) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Response) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Type)) + if m.GetHealth != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.GetHealth.ProtoSize())) + n43, err := m.GetHealth.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n43 + } + if m.GetFlags != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.GetFlags.ProtoSize())) + n44, err := m.GetFlags.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n44 + } + if m.GetVersion != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.GetVersion.ProtoSize())) + n45, err := m.GetVersion.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n45 + } + if m.GetMetrics != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.GetMetrics.ProtoSize())) + n46, err := m.GetMetrics.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n46 + } + if m.GetLoggingLevel != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.GetLoggingLevel.ProtoSize())) + n47, err := m.GetLoggingLevel.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n47 + } + if m.ListFiles != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.ListFiles.ProtoSize())) + n48, err := m.ListFiles.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n48 + } + if m.ReadFile != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.ReadFile.ProtoSize())) + n49, err := m.ReadFile.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n49 + } + if m.GetState != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.GetState.ProtoSize())) + n50, err := m.GetState.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n50 + } + if m.GetContainers != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.GetContainers.ProtoSize())) + n51, err := m.GetContainers.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n51 + } + if m.GetFrameworks != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.GetFrameworks.ProtoSize())) + n52, err := m.GetFrameworks.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n52 + } + if m.GetExecutors != nil { + dAtA[i] = 0x62 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.GetExecutors.ProtoSize())) + n53, err := m.GetExecutors.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n53 + } + if m.GetTasks != nil { + dAtA[i] = 0x6a + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.GetTasks.ProtoSize())) + n54, err := m.GetTasks.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n54 + } + if m.WaitNestedContainer != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.WaitNestedContainer.ProtoSize())) + n55, err := m.WaitNestedContainer.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n55 + } + if m.GetAgent != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.GetAgent.ProtoSize())) + n56, err := m.GetAgent.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n56 + } + if m.WaitContainer != nil { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.WaitContainer.ProtoSize())) + n57, err := m.WaitContainer.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n57 + } + if m.GetResourceProviders != nil { + dAtA[i] = 0x8a + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.GetResourceProviders.ProtoSize())) + n58, err := m.GetResourceProviders.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n58 + } + return i, nil +} + +func (m *Response_GetHealth) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Response_GetHealth) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + if m.Healthy { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + return i, nil +} + +func (m *Response_GetFlags) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Response_GetFlags) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Flags) > 0 { + for _, msg := range m.Flags { + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Response_GetVersion) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Response_GetVersion) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.VersionInfo.ProtoSize())) + n59, err := m.VersionInfo.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n59 + return i, nil +} + +func (m *Response_GetMetrics) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Response_GetMetrics) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Metrics) > 0 { + for _, msg := range m.Metrics { + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Response_GetLoggingLevel) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Response_GetLoggingLevel) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Level)) + return i, nil +} + +func (m *Response_ListFiles) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Response_ListFiles) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.FileInfos) > 0 { + for _, msg := range m.FileInfos { + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Response_ReadFile) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Response_ReadFile) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Size)) + if m.Data == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("data") + } else { + dAtA[i] = 0x12 + i++ + i = encodeVarintAgent(dAtA, i, uint64(len(m.Data))) + i += copy(dAtA[i:], m.Data) + } + return i, nil +} + +func (m *Response_GetState) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Response_GetState) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.GetTasks != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.GetTasks.ProtoSize())) + n60, err := m.GetTasks.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n60 + } + if m.GetExecutors != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.GetExecutors.ProtoSize())) + n61, err := m.GetExecutors.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n61 + } + if m.GetFrameworks != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.GetFrameworks.ProtoSize())) + n62, err := m.GetFrameworks.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n62 + } + return i, nil +} + +func (m *Response_GetContainers) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Response_GetContainers) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Containers) > 0 { + for _, msg := range m.Containers { + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Response_GetContainers_Container) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Response_GetContainers_Container) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FrameworkID != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.FrameworkID.ProtoSize())) + n63, err := m.FrameworkID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n63 + } + if m.ExecutorID != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.ExecutorID.ProtoSize())) + n64, err := m.ExecutorID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n64 + } + if m.ExecutorName != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintAgent(dAtA, i, uint64(len(*m.ExecutorName))) + i += copy(dAtA[i:], *m.ExecutorName) + } + dAtA[i] = 0x22 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.ContainerID.ProtoSize())) + n65, err := m.ContainerID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n65 + if m.ContainerStatus != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.ContainerStatus.ProtoSize())) + n66, err := m.ContainerStatus.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n66 + } + if m.ResourceStatistics != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.ResourceStatistics.ProtoSize())) + n67, err := m.ResourceStatistics.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n67 + } + return i, nil +} + +func (m *Response_GetFrameworks) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Response_GetFrameworks) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Frameworks) > 0 { + for _, msg := range m.Frameworks { + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.CompletedFrameworks) > 0 { + for _, msg := range m.CompletedFrameworks { + dAtA[i] = 0x12 + i++ + i = encodeVarintAgent(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Response_GetFrameworks_Framework) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Response_GetFrameworks_Framework) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.FrameworkInfo.ProtoSize())) + n68, err := m.FrameworkInfo.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n68 + return i, nil +} + +func (m *Response_GetExecutors) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Response_GetExecutors) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Executors) > 0 { + for _, msg := range m.Executors { + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.CompletedExecutors) > 0 { + for _, msg := range m.CompletedExecutors { + dAtA[i] = 0x12 + i++ + i = encodeVarintAgent(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Response_GetExecutors_Executor) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Response_GetExecutors_Executor) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.ExecutorInfo.ProtoSize())) + n69, err := m.ExecutorInfo.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n69 + return i, nil +} + +func (m *Response_GetTasks) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Response_GetTasks) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.PendingTasks) > 0 { + for _, msg := range m.PendingTasks { + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.QueuedTasks) > 0 { + for _, msg := range m.QueuedTasks { + dAtA[i] = 0x12 + i++ + i = encodeVarintAgent(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.LaunchedTasks) > 0 { + for _, msg := range m.LaunchedTasks { + dAtA[i] = 0x1a + i++ + i = encodeVarintAgent(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.TerminatedTasks) > 0 { + for _, msg := range m.TerminatedTasks { + dAtA[i] = 0x22 + i++ + i = encodeVarintAgent(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.CompletedTasks) > 0 { + for _, msg := range m.CompletedTasks { + dAtA[i] = 0x2a + i++ + i = encodeVarintAgent(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Response_GetAgent) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Response_GetAgent) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.AgentInfo != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.AgentInfo.ProtoSize())) + n70, err := m.AgentInfo.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n70 + } + return i, nil +} + +func (m *Response_GetResourceProviders) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Response_GetResourceProviders) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.ResourceProviders) > 0 { + for _, msg := range m.ResourceProviders { + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Response_GetResourceProviders_ResourceProvider) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Response_GetResourceProviders_ResourceProvider) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.ResourceProviderInfo.ProtoSize())) + n71, err := m.ResourceProviderInfo.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n71 + return i, nil +} + +func (m *Response_WaitNestedContainer) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Response_WaitNestedContainer) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ExitStatus != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintAgent(dAtA, i, uint64(*m.ExitStatus)) + } + if m.State != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintAgent(dAtA, i, uint64(*m.State)) + } + if m.Reason != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintAgent(dAtA, i, uint64(*m.Reason)) + } + if m.Limitation != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Limitation.ProtoSize())) + n72, err := m.Limitation.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n72 + } + if m.Message != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintAgent(dAtA, i, uint64(len(*m.Message))) + i += copy(dAtA[i:], *m.Message) + } + return i, nil +} + +func (m *Response_WaitContainer) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Response_WaitContainer) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ExitStatus != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintAgent(dAtA, i, uint64(*m.ExitStatus)) + } + if m.State != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintAgent(dAtA, i, uint64(*m.State)) + } + if m.Reason != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintAgent(dAtA, i, uint64(*m.Reason)) + } + if m.Limitation != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Limitation.ProtoSize())) + n73, err := m.Limitation.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n73 + } + if m.Message != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintAgent(dAtA, i, uint64(len(*m.Message))) + i += copy(dAtA[i:], *m.Message) + } + return i, nil +} + +func (m *ProcessIO) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ProcessIO) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Type)) + if m.Data != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Data.ProtoSize())) + n74, err := m.Data.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n74 + } + if m.Control != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Control.ProtoSize())) + n75, err := m.Control.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n75 + } + return i, nil +} + +func (m *ProcessIO_Data) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ProcessIO_Data) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Type)) + if m.Data != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintAgent(dAtA, i, uint64(len(m.Data))) + i += copy(dAtA[i:], m.Data) + } + return i, nil +} + +func (m *ProcessIO_Control) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ProcessIO_Control) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Type)) + if m.TTYInfo != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.TTYInfo.ProtoSize())) + n76, err := m.TTYInfo.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n76 + } + if m.Heartbeat != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Heartbeat.ProtoSize())) + n77, err := m.Heartbeat.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n77 + } + return i, nil +} + +func (m *ProcessIO_Control_Heartbeat) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ProcessIO_Control_Heartbeat) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Interval != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintAgent(dAtA, i, uint64(m.Interval.ProtoSize())) + n78, err := m.Interval.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n78 + } + return i, nil +} + +func encodeFixed64Agent(dAtA []byte, offset int, v uint64) int { + dAtA[offset] = uint8(v) + dAtA[offset+1] = uint8(v >> 8) + dAtA[offset+2] = uint8(v >> 16) + dAtA[offset+3] = uint8(v >> 24) + dAtA[offset+4] = uint8(v >> 32) + dAtA[offset+5] = uint8(v >> 40) + dAtA[offset+6] = uint8(v >> 48) + dAtA[offset+7] = uint8(v >> 56) + return offset + 8 +} +func encodeFixed32Agent(dAtA []byte, offset int, v uint32) int { + dAtA[offset] = uint8(v) + dAtA[offset+1] = uint8(v >> 8) + dAtA[offset+2] = uint8(v >> 16) + dAtA[offset+3] = uint8(v >> 24) + return offset + 4 +} +func encodeVarintAgent(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func NewPopulatedCall(r randyAgent, easy bool) *Call { + this := &Call{} + this.Type = Call_Type([]int32{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 20, 26, 14, 15, 16, 21, 17, 18, 19, 22, 23, 24, 25, 27, 28, 29, 30}[r.Intn(31)]) + if r.Intn(10) != 0 { + this.GetMetrics = NewPopulatedCall_GetMetrics(r, easy) + } + if r.Intn(10) != 0 { + this.SetLoggingLevel = NewPopulatedCall_SetLoggingLevel(r, easy) + } + if r.Intn(10) != 0 { + this.ListFiles = NewPopulatedCall_ListFiles(r, easy) + } + if r.Intn(10) != 0 { + this.ReadFile = NewPopulatedCall_ReadFile(r, easy) + } + if r.Intn(10) == 0 { + this.LaunchNestedContainer = NewPopulatedCall_LaunchNestedContainer(r, easy) + } + if r.Intn(10) == 0 { + this.WaitNestedContainer = NewPopulatedCall_WaitNestedContainer(r, easy) + } + if r.Intn(10) == 0 { + this.KillNestedContainer = NewPopulatedCall_KillNestedContainer(r, easy) + } + if r.Intn(10) == 0 { + this.LaunchNestedContainerSession = NewPopulatedCall_LaunchNestedContainerSession(r, easy) + } + if r.Intn(10) == 0 { + this.AttachContainerInput = NewPopulatedCall_AttachContainerInput(r, easy) + } + if r.Intn(10) == 0 { + this.AttachContainerOutput = NewPopulatedCall_AttachContainerOutput(r, easy) + } + if r.Intn(10) == 0 { + this.RemoveNestedContainer = NewPopulatedCall_RemoveNestedContainer(r, easy) + } + if r.Intn(10) == 0 { + this.LaunchContainer = NewPopulatedCall_LaunchContainer(r, easy) + } + if r.Intn(10) == 0 { + this.WaitContainer = NewPopulatedCall_WaitContainer(r, easy) + } + if r.Intn(10) == 0 { + this.KillContainer = NewPopulatedCall_KillContainer(r, easy) + } + if r.Intn(10) == 0 { + this.RemoveContainer = NewPopulatedCall_RemoveContainer(r, easy) + } + if r.Intn(10) != 0 { + this.AddResourceProviderConfig = NewPopulatedCall_AddResourceProviderConfig(r, easy) + } + if r.Intn(10) != 0 { + this.UpdateResourceProviderConfig = NewPopulatedCall_UpdateResourceProviderConfig(r, easy) + } + if r.Intn(10) != 0 { + this.RemoveResourceProviderConfig = NewPopulatedCall_RemoveResourceProviderConfig(r, easy) + } + if r.Intn(10) != 0 { + this.GetContainers = NewPopulatedCall_GetContainers(r, easy) + } + if r.Intn(10) != 0 { + this.PruneImages = NewPopulatedCall_PruneImages(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCall_GetMetrics(r randyAgent, easy bool) *Call_GetMetrics { + this := &Call_GetMetrics{} + if r.Intn(10) != 0 { + this.Timeout = mesos.NewPopulatedDurationInfo(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCall_SetLoggingLevel(r randyAgent, easy bool) *Call_SetLoggingLevel { + this := &Call_SetLoggingLevel{} + this.Level = uint32(r.Uint32()) + v1 := mesos.NewPopulatedDurationInfo(r, easy) + this.Duration = *v1 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCall_ListFiles(r randyAgent, easy bool) *Call_ListFiles { + this := &Call_ListFiles{} + this.Path = string(randStringAgent(r)) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCall_ReadFile(r randyAgent, easy bool) *Call_ReadFile { + this := &Call_ReadFile{} + this.Path = string(randStringAgent(r)) + this.Offset = uint64(uint64(r.Uint32())) + if r.Intn(10) != 0 { + v2 := uint64(uint64(r.Uint32())) + this.Length = &v2 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCall_GetContainers(r randyAgent, easy bool) *Call_GetContainers { + this := &Call_GetContainers{} + if r.Intn(10) != 0 { + v3 := bool(bool(r.Intn(2) == 0)) + this.ShowNested = &v3 + } + if r.Intn(10) != 0 { + v4 := bool(bool(r.Intn(2) == 0)) + this.ShowStandalone = &v4 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCall_LaunchNestedContainer(r randyAgent, easy bool) *Call_LaunchNestedContainer { + this := &Call_LaunchNestedContainer{} + v5 := mesos.NewPopulatedContainerID(r, easy) + this.ContainerID = *v5 + if r.Intn(10) != 0 { + this.Command = mesos.NewPopulatedCommandInfo(r, easy) + } + if r.Intn(10) != 0 { + this.Container = mesos.NewPopulatedContainerInfo(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCall_WaitNestedContainer(r randyAgent, easy bool) *Call_WaitNestedContainer { + this := &Call_WaitNestedContainer{} + v6 := mesos.NewPopulatedContainerID(r, easy) + this.ContainerID = *v6 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCall_KillNestedContainer(r randyAgent, easy bool) *Call_KillNestedContainer { + this := &Call_KillNestedContainer{} + v7 := mesos.NewPopulatedContainerID(r, easy) + this.ContainerID = *v7 + if r.Intn(10) != 0 { + v8 := int32(r.Int31()) + if r.Intn(2) == 0 { + v8 *= -1 + } + this.Signal = &v8 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCall_RemoveNestedContainer(r randyAgent, easy bool) *Call_RemoveNestedContainer { + this := &Call_RemoveNestedContainer{} + v9 := mesos.NewPopulatedContainerID(r, easy) + this.ContainerID = *v9 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCall_LaunchNestedContainerSession(r randyAgent, easy bool) *Call_LaunchNestedContainerSession { + this := &Call_LaunchNestedContainerSession{} + v10 := mesos.NewPopulatedContainerID(r, easy) + this.ContainerID = *v10 + if r.Intn(10) != 0 { + this.Command = mesos.NewPopulatedCommandInfo(r, easy) + } + if r.Intn(10) != 0 { + this.Container = mesos.NewPopulatedContainerInfo(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCall_AttachContainerInput(r randyAgent, easy bool) *Call_AttachContainerInput { + this := &Call_AttachContainerInput{} + this.Type = Call_AttachContainerInput_Type([]int32{0, 1, 2}[r.Intn(3)]) + if r.Intn(10) == 0 { + this.ContainerID = mesos.NewPopulatedContainerID(r, easy) + } + if r.Intn(10) != 0 { + this.ProcessIO = NewPopulatedProcessIO(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCall_AttachContainerOutput(r randyAgent, easy bool) *Call_AttachContainerOutput { + this := &Call_AttachContainerOutput{} + v11 := mesos.NewPopulatedContainerID(r, easy) + this.ContainerID = *v11 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCall_LaunchContainer(r randyAgent, easy bool) *Call_LaunchContainer { + this := &Call_LaunchContainer{} + v12 := mesos.NewPopulatedContainerID(r, easy) + this.ContainerID = *v12 + if r.Intn(10) != 0 { + this.Command = mesos.NewPopulatedCommandInfo(r, easy) + } + if r.Intn(10) != 0 { + v13 := r.Intn(5) + this.Resources = make([]mesos.Resource, v13) + for i := 0; i < v13; i++ { + v14 := mesos.NewPopulatedResource(r, easy) + this.Resources[i] = *v14 + } + } + if r.Intn(10) != 0 { + this.Container = mesos.NewPopulatedContainerInfo(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCall_WaitContainer(r randyAgent, easy bool) *Call_WaitContainer { + this := &Call_WaitContainer{} + v15 := mesos.NewPopulatedContainerID(r, easy) + this.ContainerID = *v15 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCall_KillContainer(r randyAgent, easy bool) *Call_KillContainer { + this := &Call_KillContainer{} + v16 := mesos.NewPopulatedContainerID(r, easy) + this.ContainerID = *v16 + if r.Intn(10) != 0 { + v17 := int32(r.Int31()) + if r.Intn(2) == 0 { + v17 *= -1 + } + this.Signal = &v17 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCall_RemoveContainer(r randyAgent, easy bool) *Call_RemoveContainer { + this := &Call_RemoveContainer{} + v18 := mesos.NewPopulatedContainerID(r, easy) + this.ContainerID = *v18 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCall_AddResourceProviderConfig(r randyAgent, easy bool) *Call_AddResourceProviderConfig { + this := &Call_AddResourceProviderConfig{} + v19 := mesos.NewPopulatedResourceProviderInfo(r, easy) + this.Info = *v19 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCall_UpdateResourceProviderConfig(r randyAgent, easy bool) *Call_UpdateResourceProviderConfig { + this := &Call_UpdateResourceProviderConfig{} + v20 := mesos.NewPopulatedResourceProviderInfo(r, easy) + this.Info = *v20 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCall_RemoveResourceProviderConfig(r randyAgent, easy bool) *Call_RemoveResourceProviderConfig { + this := &Call_RemoveResourceProviderConfig{} + this.Type = string(randStringAgent(r)) + this.Name = string(randStringAgent(r)) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCall_PruneImages(r randyAgent, easy bool) *Call_PruneImages { + this := &Call_PruneImages{} + if r.Intn(10) != 0 { + v21 := r.Intn(5) + this.ExcludedImages = make([]mesos.Image, v21) + for i := 0; i < v21; i++ { + v22 := mesos.NewPopulatedImage(r, easy) + this.ExcludedImages[i] = *v22 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResponse(r randyAgent, easy bool) *Response { + this := &Response{} + this.Type = Response_Type([]int32{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 16, 13, 15}[r.Intn(17)]) + if r.Intn(10) != 0 { + this.GetHealth = NewPopulatedResponse_GetHealth(r, easy) + } + if r.Intn(10) != 0 { + this.GetFlags = NewPopulatedResponse_GetFlags(r, easy) + } + if r.Intn(10) != 0 { + this.GetVersion = NewPopulatedResponse_GetVersion(r, easy) + } + if r.Intn(10) != 0 { + this.GetMetrics = NewPopulatedResponse_GetMetrics(r, easy) + } + if r.Intn(10) != 0 { + this.GetLoggingLevel = NewPopulatedResponse_GetLoggingLevel(r, easy) + } + if r.Intn(10) != 0 { + this.ListFiles = NewPopulatedResponse_ListFiles(r, easy) + } + if r.Intn(10) != 0 { + this.ReadFile = NewPopulatedResponse_ReadFile(r, easy) + } + if r.Intn(10) == 0 { + this.GetState = NewPopulatedResponse_GetState(r, easy) + } + if r.Intn(10) == 0 { + this.GetContainers = NewPopulatedResponse_GetContainers(r, easy) + } + if r.Intn(10) != 0 { + this.GetFrameworks = NewPopulatedResponse_GetFrameworks(r, easy) + } + if r.Intn(10) != 0 { + this.GetExecutors = NewPopulatedResponse_GetExecutors(r, easy) + } + if r.Intn(10) == 0 { + this.GetTasks = NewPopulatedResponse_GetTasks(r, easy) + } + if r.Intn(10) != 0 { + this.WaitNestedContainer = NewPopulatedResponse_WaitNestedContainer(r, easy) + } + if r.Intn(10) != 0 { + this.GetAgent = NewPopulatedResponse_GetAgent(r, easy) + } + if r.Intn(10) != 0 { + this.WaitContainer = NewPopulatedResponse_WaitContainer(r, easy) + } + if r.Intn(10) != 0 { + this.GetResourceProviders = NewPopulatedResponse_GetResourceProviders(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResponse_GetHealth(r randyAgent, easy bool) *Response_GetHealth { + this := &Response_GetHealth{} + this.Healthy = bool(bool(r.Intn(2) == 0)) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResponse_GetFlags(r randyAgent, easy bool) *Response_GetFlags { + this := &Response_GetFlags{} + if r.Intn(10) != 0 { + v23 := r.Intn(5) + this.Flags = make([]mesos.Flag, v23) + for i := 0; i < v23; i++ { + v24 := mesos.NewPopulatedFlag(r, easy) + this.Flags[i] = *v24 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResponse_GetVersion(r randyAgent, easy bool) *Response_GetVersion { + this := &Response_GetVersion{} + v25 := mesos.NewPopulatedVersionInfo(r, easy) + this.VersionInfo = *v25 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResponse_GetMetrics(r randyAgent, easy bool) *Response_GetMetrics { + this := &Response_GetMetrics{} + if r.Intn(10) != 0 { + v26 := r.Intn(5) + this.Metrics = make([]mesos.Metric, v26) + for i := 0; i < v26; i++ { + v27 := mesos.NewPopulatedMetric(r, easy) + this.Metrics[i] = *v27 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResponse_GetLoggingLevel(r randyAgent, easy bool) *Response_GetLoggingLevel { + this := &Response_GetLoggingLevel{} + this.Level = uint32(r.Uint32()) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResponse_ListFiles(r randyAgent, easy bool) *Response_ListFiles { + this := &Response_ListFiles{} + if r.Intn(10) != 0 { + v28 := r.Intn(5) + this.FileInfos = make([]mesos.FileInfo, v28) + for i := 0; i < v28; i++ { + v29 := mesos.NewPopulatedFileInfo(r, easy) + this.FileInfos[i] = *v29 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResponse_ReadFile(r randyAgent, easy bool) *Response_ReadFile { + this := &Response_ReadFile{} + this.Size = uint64(uint64(r.Uint32())) + v30 := r.Intn(100) + this.Data = make([]byte, v30) + for i := 0; i < v30; i++ { + this.Data[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResponse_GetState(r randyAgent, easy bool) *Response_GetState { + this := &Response_GetState{} + if r.Intn(10) == 0 { + this.GetTasks = NewPopulatedResponse_GetTasks(r, easy) + } + if r.Intn(10) != 0 { + this.GetExecutors = NewPopulatedResponse_GetExecutors(r, easy) + } + if r.Intn(10) != 0 { + this.GetFrameworks = NewPopulatedResponse_GetFrameworks(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResponse_GetContainers(r randyAgent, easy bool) *Response_GetContainers { + this := &Response_GetContainers{} + if r.Intn(10) == 0 { + v31 := r.Intn(5) + this.Containers = make([]Response_GetContainers_Container, v31) + for i := 0; i < v31; i++ { + v32 := NewPopulatedResponse_GetContainers_Container(r, easy) + this.Containers[i] = *v32 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResponse_GetContainers_Container(r randyAgent, easy bool) *Response_GetContainers_Container { + this := &Response_GetContainers_Container{} + if r.Intn(10) != 0 { + this.FrameworkID = mesos.NewPopulatedFrameworkID(r, easy) + } + if r.Intn(10) != 0 { + this.ExecutorID = mesos.NewPopulatedExecutorID(r, easy) + } + if r.Intn(10) != 0 { + v33 := string(randStringAgent(r)) + this.ExecutorName = &v33 + } + v34 := mesos.NewPopulatedContainerID(r, easy) + this.ContainerID = *v34 + if r.Intn(10) == 0 { + this.ContainerStatus = mesos.NewPopulatedContainerStatus(r, easy) + } + if r.Intn(10) != 0 { + this.ResourceStatistics = mesos.NewPopulatedResourceStatistics(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResponse_GetFrameworks(r randyAgent, easy bool) *Response_GetFrameworks { + this := &Response_GetFrameworks{} + if r.Intn(10) != 0 { + v35 := r.Intn(5) + this.Frameworks = make([]Response_GetFrameworks_Framework, v35) + for i := 0; i < v35; i++ { + v36 := NewPopulatedResponse_GetFrameworks_Framework(r, easy) + this.Frameworks[i] = *v36 + } + } + if r.Intn(10) != 0 { + v37 := r.Intn(5) + this.CompletedFrameworks = make([]Response_GetFrameworks_Framework, v37) + for i := 0; i < v37; i++ { + v38 := NewPopulatedResponse_GetFrameworks_Framework(r, easy) + this.CompletedFrameworks[i] = *v38 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResponse_GetFrameworks_Framework(r randyAgent, easy bool) *Response_GetFrameworks_Framework { + this := &Response_GetFrameworks_Framework{} + v39 := mesos.NewPopulatedFrameworkInfo(r, easy) + this.FrameworkInfo = *v39 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResponse_GetExecutors(r randyAgent, easy bool) *Response_GetExecutors { + this := &Response_GetExecutors{} + if r.Intn(10) != 0 { + v40 := r.Intn(5) + this.Executors = make([]Response_GetExecutors_Executor, v40) + for i := 0; i < v40; i++ { + v41 := NewPopulatedResponse_GetExecutors_Executor(r, easy) + this.Executors[i] = *v41 + } + } + if r.Intn(10) != 0 { + v42 := r.Intn(5) + this.CompletedExecutors = make([]Response_GetExecutors_Executor, v42) + for i := 0; i < v42; i++ { + v43 := NewPopulatedResponse_GetExecutors_Executor(r, easy) + this.CompletedExecutors[i] = *v43 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResponse_GetExecutors_Executor(r randyAgent, easy bool) *Response_GetExecutors_Executor { + this := &Response_GetExecutors_Executor{} + v44 := mesos.NewPopulatedExecutorInfo(r, easy) + this.ExecutorInfo = *v44 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResponse_GetTasks(r randyAgent, easy bool) *Response_GetTasks { + this := &Response_GetTasks{} + if r.Intn(10) == 0 { + v45 := r.Intn(5) + this.PendingTasks = make([]mesos.Task, v45) + for i := 0; i < v45; i++ { + v46 := mesos.NewPopulatedTask(r, easy) + this.PendingTasks[i] = *v46 + } + } + if r.Intn(10) == 0 { + v47 := r.Intn(5) + this.QueuedTasks = make([]mesos.Task, v47) + for i := 0; i < v47; i++ { + v48 := mesos.NewPopulatedTask(r, easy) + this.QueuedTasks[i] = *v48 + } + } + if r.Intn(10) == 0 { + v49 := r.Intn(5) + this.LaunchedTasks = make([]mesos.Task, v49) + for i := 0; i < v49; i++ { + v50 := mesos.NewPopulatedTask(r, easy) + this.LaunchedTasks[i] = *v50 + } + } + if r.Intn(10) == 0 { + v51 := r.Intn(5) + this.TerminatedTasks = make([]mesos.Task, v51) + for i := 0; i < v51; i++ { + v52 := mesos.NewPopulatedTask(r, easy) + this.TerminatedTasks[i] = *v52 + } + } + if r.Intn(10) == 0 { + v53 := r.Intn(5) + this.CompletedTasks = make([]mesos.Task, v53) + for i := 0; i < v53; i++ { + v54 := mesos.NewPopulatedTask(r, easy) + this.CompletedTasks[i] = *v54 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResponse_GetAgent(r randyAgent, easy bool) *Response_GetAgent { + this := &Response_GetAgent{} + if r.Intn(10) != 0 { + this.AgentInfo = mesos.NewPopulatedAgentInfo(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResponse_GetResourceProviders(r randyAgent, easy bool) *Response_GetResourceProviders { + this := &Response_GetResourceProviders{} + if r.Intn(10) != 0 { + v55 := r.Intn(5) + this.ResourceProviders = make([]Response_GetResourceProviders_ResourceProvider, v55) + for i := 0; i < v55; i++ { + v56 := NewPopulatedResponse_GetResourceProviders_ResourceProvider(r, easy) + this.ResourceProviders[i] = *v56 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResponse_GetResourceProviders_ResourceProvider(r randyAgent, easy bool) *Response_GetResourceProviders_ResourceProvider { + this := &Response_GetResourceProviders_ResourceProvider{} + v57 := mesos.NewPopulatedResourceProviderInfo(r, easy) + this.ResourceProviderInfo = *v57 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResponse_WaitNestedContainer(r randyAgent, easy bool) *Response_WaitNestedContainer { + this := &Response_WaitNestedContainer{} + if r.Intn(10) != 0 { + v58 := int32(r.Int31()) + if r.Intn(2) == 0 { + v58 *= -1 + } + this.ExitStatus = &v58 + } + if r.Intn(10) != 0 { + v59 := mesos.TaskState([]int32{6, 0, 1, 8, 2, 3, 4, 7, 5, 9, 10, 11, 12, 13}[r.Intn(14)]) + this.State = &v59 + } + if r.Intn(10) != 0 { + v60 := mesos.TaskStatus_Reason([]int32{0, 21, 19, 20, 8, 17, 22, 23, 24, 1, 2, 3, 4, 5, 6, 27, 7, 9, 18, 10, 11, 31, 32, 12, 13, 30, 28, 29, 25, 26, 14, 15, 16}[r.Intn(33)]) + this.Reason = &v60 + } + if r.Intn(10) != 0 { + this.Limitation = mesos.NewPopulatedTaskResourceLimitation(r, easy) + } + if r.Intn(10) != 0 { + v61 := string(randStringAgent(r)) + this.Message = &v61 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResponse_WaitContainer(r randyAgent, easy bool) *Response_WaitContainer { + this := &Response_WaitContainer{} + if r.Intn(10) != 0 { + v62 := int32(r.Int31()) + if r.Intn(2) == 0 { + v62 *= -1 + } + this.ExitStatus = &v62 + } + if r.Intn(10) != 0 { + v63 := mesos.TaskState([]int32{6, 0, 1, 8, 2, 3, 4, 7, 5, 9, 10, 11, 12, 13}[r.Intn(14)]) + this.State = &v63 + } + if r.Intn(10) != 0 { + v64 := mesos.TaskStatus_Reason([]int32{0, 21, 19, 20, 8, 17, 22, 23, 24, 1, 2, 3, 4, 5, 6, 27, 7, 9, 18, 10, 11, 31, 32, 12, 13, 30, 28, 29, 25, 26, 14, 15, 16}[r.Intn(33)]) + this.Reason = &v64 + } + if r.Intn(10) != 0 { + this.Limitation = mesos.NewPopulatedTaskResourceLimitation(r, easy) + } + if r.Intn(10) != 0 { + v65 := string(randStringAgent(r)) + this.Message = &v65 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedProcessIO(r randyAgent, easy bool) *ProcessIO { + this := &ProcessIO{} + this.Type = ProcessIO_Type([]int32{0, 1, 2}[r.Intn(3)]) + if r.Intn(10) != 0 { + this.Data = NewPopulatedProcessIO_Data(r, easy) + } + if r.Intn(10) != 0 { + this.Control = NewPopulatedProcessIO_Control(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedProcessIO_Data(r randyAgent, easy bool) *ProcessIO_Data { + this := &ProcessIO_Data{} + this.Type = ProcessIO_Data_Type([]int32{0, 1, 2, 3}[r.Intn(4)]) + if r.Intn(10) != 0 { + v66 := r.Intn(100) + this.Data = make([]byte, v66) + for i := 0; i < v66; i++ { + this.Data[i] = byte(r.Intn(256)) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedProcessIO_Control(r randyAgent, easy bool) *ProcessIO_Control { + this := &ProcessIO_Control{} + this.Type = ProcessIO_Control_Type([]int32{0, 1, 2}[r.Intn(3)]) + if r.Intn(10) != 0 { + this.TTYInfo = mesos.NewPopulatedTTYInfo(r, easy) + } + if r.Intn(10) != 0 { + this.Heartbeat = NewPopulatedProcessIO_Control_Heartbeat(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedProcessIO_Control_Heartbeat(r randyAgent, easy bool) *ProcessIO_Control_Heartbeat { + this := &ProcessIO_Control_Heartbeat{} + if r.Intn(10) != 0 { + this.Interval = mesos.NewPopulatedDurationInfo(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +type randyAgent interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneAgent(r randyAgent) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringAgent(r randyAgent) string { + v67 := r.Intn(100) + tmps := make([]rune, v67) + for i := 0; i < v67; i++ { + tmps[i] = randUTF8RuneAgent(r) + } + return string(tmps) +} +func randUnrecognizedAgent(r randyAgent, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldAgent(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldAgent(dAtA []byte, r randyAgent, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateAgent(dAtA, uint64(key)) + v68 := r.Int63() + if r.Intn(2) == 0 { + v68 *= -1 + } + dAtA = encodeVarintPopulateAgent(dAtA, uint64(v68)) + case 1: + dAtA = encodeVarintPopulateAgent(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateAgent(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateAgent(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateAgent(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateAgent(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *Call) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovAgent(uint64(m.Type)) + if m.GetMetrics != nil { + l = m.GetMetrics.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.SetLoggingLevel != nil { + l = m.SetLoggingLevel.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.ListFiles != nil { + l = m.ListFiles.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.ReadFile != nil { + l = m.ReadFile.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.LaunchNestedContainer != nil { + l = m.LaunchNestedContainer.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.WaitNestedContainer != nil { + l = m.WaitNestedContainer.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.KillNestedContainer != nil { + l = m.KillNestedContainer.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.LaunchNestedContainerSession != nil { + l = m.LaunchNestedContainerSession.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.AttachContainerInput != nil { + l = m.AttachContainerInput.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.AttachContainerOutput != nil { + l = m.AttachContainerOutput.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.RemoveNestedContainer != nil { + l = m.RemoveNestedContainer.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.LaunchContainer != nil { + l = m.LaunchContainer.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.WaitContainer != nil { + l = m.WaitContainer.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.KillContainer != nil { + l = m.KillContainer.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.RemoveContainer != nil { + l = m.RemoveContainer.ProtoSize() + n += 2 + l + sovAgent(uint64(l)) + } + if m.AddResourceProviderConfig != nil { + l = m.AddResourceProviderConfig.ProtoSize() + n += 2 + l + sovAgent(uint64(l)) + } + if m.UpdateResourceProviderConfig != nil { + l = m.UpdateResourceProviderConfig.ProtoSize() + n += 2 + l + sovAgent(uint64(l)) + } + if m.RemoveResourceProviderConfig != nil { + l = m.RemoveResourceProviderConfig.ProtoSize() + n += 2 + l + sovAgent(uint64(l)) + } + if m.GetContainers != nil { + l = m.GetContainers.ProtoSize() + n += 2 + l + sovAgent(uint64(l)) + } + if m.PruneImages != nil { + l = m.PruneImages.ProtoSize() + n += 2 + l + sovAgent(uint64(l)) + } + return n +} + +func (m *Call_GetMetrics) ProtoSize() (n int) { + var l int + _ = l + if m.Timeout != nil { + l = m.Timeout.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + return n +} + +func (m *Call_SetLoggingLevel) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovAgent(uint64(m.Level)) + l = m.Duration.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + return n +} + +func (m *Call_ListFiles) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Path) + n += 1 + l + sovAgent(uint64(l)) + return n +} + +func (m *Call_ReadFile) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Path) + n += 1 + l + sovAgent(uint64(l)) + n += 1 + sovAgent(uint64(m.Offset)) + if m.Length != nil { + n += 1 + sovAgent(uint64(*m.Length)) + } + return n +} + +func (m *Call_GetContainers) ProtoSize() (n int) { + var l int + _ = l + if m.ShowNested != nil { + n += 2 + } + if m.ShowStandalone != nil { + n += 2 + } + return n +} + +func (m *Call_LaunchNestedContainer) ProtoSize() (n int) { + var l int + _ = l + l = m.ContainerID.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + if m.Command != nil { + l = m.Command.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.Container != nil { + l = m.Container.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + return n +} + +func (m *Call_WaitNestedContainer) ProtoSize() (n int) { + var l int + _ = l + l = m.ContainerID.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + return n +} + +func (m *Call_KillNestedContainer) ProtoSize() (n int) { + var l int + _ = l + l = m.ContainerID.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + if m.Signal != nil { + n += 1 + sovAgent(uint64(*m.Signal)) + } + return n +} + +func (m *Call_RemoveNestedContainer) ProtoSize() (n int) { + var l int + _ = l + l = m.ContainerID.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + return n +} + +func (m *Call_LaunchNestedContainerSession) ProtoSize() (n int) { + var l int + _ = l + l = m.ContainerID.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + if m.Command != nil { + l = m.Command.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.Container != nil { + l = m.Container.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + return n +} + +func (m *Call_AttachContainerInput) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovAgent(uint64(m.Type)) + if m.ContainerID != nil { + l = m.ContainerID.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.ProcessIO != nil { + l = m.ProcessIO.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + return n +} + +func (m *Call_AttachContainerOutput) ProtoSize() (n int) { + var l int + _ = l + l = m.ContainerID.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + return n +} + +func (m *Call_LaunchContainer) ProtoSize() (n int) { + var l int + _ = l + l = m.ContainerID.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + if m.Command != nil { + l = m.Command.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + } + if m.Container != nil { + l = m.Container.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + return n +} + +func (m *Call_WaitContainer) ProtoSize() (n int) { + var l int + _ = l + l = m.ContainerID.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + return n +} + +func (m *Call_KillContainer) ProtoSize() (n int) { + var l int + _ = l + l = m.ContainerID.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + if m.Signal != nil { + n += 1 + sovAgent(uint64(*m.Signal)) + } + return n +} + +func (m *Call_RemoveContainer) ProtoSize() (n int) { + var l int + _ = l + l = m.ContainerID.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + return n +} + +func (m *Call_AddResourceProviderConfig) ProtoSize() (n int) { + var l int + _ = l + l = m.Info.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + return n +} + +func (m *Call_UpdateResourceProviderConfig) ProtoSize() (n int) { + var l int + _ = l + l = m.Info.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + return n +} + +func (m *Call_RemoveResourceProviderConfig) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovAgent(uint64(l)) + l = len(m.Name) + n += 1 + l + sovAgent(uint64(l)) + return n +} + +func (m *Call_PruneImages) ProtoSize() (n int) { + var l int + _ = l + if len(m.ExcludedImages) > 0 { + for _, e := range m.ExcludedImages { + l = e.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + } + return n +} + +func (m *Response) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovAgent(uint64(m.Type)) + if m.GetHealth != nil { + l = m.GetHealth.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.GetFlags != nil { + l = m.GetFlags.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.GetVersion != nil { + l = m.GetVersion.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.GetMetrics != nil { + l = m.GetMetrics.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.GetLoggingLevel != nil { + l = m.GetLoggingLevel.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.ListFiles != nil { + l = m.ListFiles.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.ReadFile != nil { + l = m.ReadFile.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.GetState != nil { + l = m.GetState.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.GetContainers != nil { + l = m.GetContainers.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.GetFrameworks != nil { + l = m.GetFrameworks.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.GetExecutors != nil { + l = m.GetExecutors.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.GetTasks != nil { + l = m.GetTasks.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.WaitNestedContainer != nil { + l = m.WaitNestedContainer.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.GetAgent != nil { + l = m.GetAgent.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.WaitContainer != nil { + l = m.WaitContainer.ProtoSize() + n += 2 + l + sovAgent(uint64(l)) + } + if m.GetResourceProviders != nil { + l = m.GetResourceProviders.ProtoSize() + n += 2 + l + sovAgent(uint64(l)) + } + return n +} + +func (m *Response_GetHealth) ProtoSize() (n int) { + var l int + _ = l + n += 2 + return n +} + +func (m *Response_GetFlags) ProtoSize() (n int) { + var l int + _ = l + if len(m.Flags) > 0 { + for _, e := range m.Flags { + l = e.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + } + return n +} + +func (m *Response_GetVersion) ProtoSize() (n int) { + var l int + _ = l + l = m.VersionInfo.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + return n +} + +func (m *Response_GetMetrics) ProtoSize() (n int) { + var l int + _ = l + if len(m.Metrics) > 0 { + for _, e := range m.Metrics { + l = e.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + } + return n +} + +func (m *Response_GetLoggingLevel) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovAgent(uint64(m.Level)) + return n +} + +func (m *Response_ListFiles) ProtoSize() (n int) { + var l int + _ = l + if len(m.FileInfos) > 0 { + for _, e := range m.FileInfos { + l = e.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + } + return n +} + +func (m *Response_ReadFile) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovAgent(uint64(m.Size)) + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovAgent(uint64(l)) + } + return n +} + +func (m *Response_GetState) ProtoSize() (n int) { + var l int + _ = l + if m.GetTasks != nil { + l = m.GetTasks.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.GetExecutors != nil { + l = m.GetExecutors.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.GetFrameworks != nil { + l = m.GetFrameworks.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + return n +} + +func (m *Response_GetContainers) ProtoSize() (n int) { + var l int + _ = l + if len(m.Containers) > 0 { + for _, e := range m.Containers { + l = e.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + } + return n +} + +func (m *Response_GetContainers_Container) ProtoSize() (n int) { + var l int + _ = l + if m.FrameworkID != nil { + l = m.FrameworkID.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.ExecutorID != nil { + l = m.ExecutorID.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.ExecutorName != nil { + l = len(*m.ExecutorName) + n += 1 + l + sovAgent(uint64(l)) + } + l = m.ContainerID.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + if m.ContainerStatus != nil { + l = m.ContainerStatus.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.ResourceStatistics != nil { + l = m.ResourceStatistics.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + return n +} + +func (m *Response_GetFrameworks) ProtoSize() (n int) { + var l int + _ = l + if len(m.Frameworks) > 0 { + for _, e := range m.Frameworks { + l = e.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + } + if len(m.CompletedFrameworks) > 0 { + for _, e := range m.CompletedFrameworks { + l = e.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + } + return n +} + +func (m *Response_GetFrameworks_Framework) ProtoSize() (n int) { + var l int + _ = l + l = m.FrameworkInfo.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + return n +} + +func (m *Response_GetExecutors) ProtoSize() (n int) { + var l int + _ = l + if len(m.Executors) > 0 { + for _, e := range m.Executors { + l = e.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + } + if len(m.CompletedExecutors) > 0 { + for _, e := range m.CompletedExecutors { + l = e.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + } + return n +} + +func (m *Response_GetExecutors_Executor) ProtoSize() (n int) { + var l int + _ = l + l = m.ExecutorInfo.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + return n +} + +func (m *Response_GetTasks) ProtoSize() (n int) { + var l int + _ = l + if len(m.PendingTasks) > 0 { + for _, e := range m.PendingTasks { + l = e.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + } + if len(m.QueuedTasks) > 0 { + for _, e := range m.QueuedTasks { + l = e.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + } + if len(m.LaunchedTasks) > 0 { + for _, e := range m.LaunchedTasks { + l = e.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + } + if len(m.TerminatedTasks) > 0 { + for _, e := range m.TerminatedTasks { + l = e.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + } + if len(m.CompletedTasks) > 0 { + for _, e := range m.CompletedTasks { + l = e.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + } + return n +} + +func (m *Response_GetAgent) ProtoSize() (n int) { + var l int + _ = l + if m.AgentInfo != nil { + l = m.AgentInfo.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + return n +} + +func (m *Response_GetResourceProviders) ProtoSize() (n int) { + var l int + _ = l + if len(m.ResourceProviders) > 0 { + for _, e := range m.ResourceProviders { + l = e.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + } + return n +} + +func (m *Response_GetResourceProviders_ResourceProvider) ProtoSize() (n int) { + var l int + _ = l + l = m.ResourceProviderInfo.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + return n +} + +func (m *Response_WaitNestedContainer) ProtoSize() (n int) { + var l int + _ = l + if m.ExitStatus != nil { + n += 1 + sovAgent(uint64(*m.ExitStatus)) + } + if m.State != nil { + n += 1 + sovAgent(uint64(*m.State)) + } + if m.Reason != nil { + n += 1 + sovAgent(uint64(*m.Reason)) + } + if m.Limitation != nil { + l = m.Limitation.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.Message != nil { + l = len(*m.Message) + n += 1 + l + sovAgent(uint64(l)) + } + return n +} + +func (m *Response_WaitContainer) ProtoSize() (n int) { + var l int + _ = l + if m.ExitStatus != nil { + n += 1 + sovAgent(uint64(*m.ExitStatus)) + } + if m.State != nil { + n += 1 + sovAgent(uint64(*m.State)) + } + if m.Reason != nil { + n += 1 + sovAgent(uint64(*m.Reason)) + } + if m.Limitation != nil { + l = m.Limitation.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.Message != nil { + l = len(*m.Message) + n += 1 + l + sovAgent(uint64(l)) + } + return n +} + +func (m *ProcessIO) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovAgent(uint64(m.Type)) + if m.Data != nil { + l = m.Data.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.Control != nil { + l = m.Control.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + return n +} + +func (m *ProcessIO_Data) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovAgent(uint64(m.Type)) + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovAgent(uint64(l)) + } + return n +} + +func (m *ProcessIO_Control) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovAgent(uint64(m.Type)) + if m.TTYInfo != nil { + l = m.TTYInfo.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + if m.Heartbeat != nil { + l = m.Heartbeat.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + return n +} + +func (m *ProcessIO_Control_Heartbeat) ProtoSize() (n int) { + var l int + _ = l + if m.Interval != nil { + l = m.Interval.ProtoSize() + n += 1 + l + sovAgent(uint64(l)) + } + return n +} + +func sovAgent(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozAgent(x uint64) (n int) { + return sovAgent(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *Call) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Call{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `GetMetrics:` + strings.Replace(fmt.Sprintf("%v", this.GetMetrics), "Call_GetMetrics", "Call_GetMetrics", 1) + `,`, + `SetLoggingLevel:` + strings.Replace(fmt.Sprintf("%v", this.SetLoggingLevel), "Call_SetLoggingLevel", "Call_SetLoggingLevel", 1) + `,`, + `ListFiles:` + strings.Replace(fmt.Sprintf("%v", this.ListFiles), "Call_ListFiles", "Call_ListFiles", 1) + `,`, + `ReadFile:` + strings.Replace(fmt.Sprintf("%v", this.ReadFile), "Call_ReadFile", "Call_ReadFile", 1) + `,`, + `LaunchNestedContainer:` + strings.Replace(fmt.Sprintf("%v", this.LaunchNestedContainer), "Call_LaunchNestedContainer", "Call_LaunchNestedContainer", 1) + `,`, + `WaitNestedContainer:` + strings.Replace(fmt.Sprintf("%v", this.WaitNestedContainer), "Call_WaitNestedContainer", "Call_WaitNestedContainer", 1) + `,`, + `KillNestedContainer:` + strings.Replace(fmt.Sprintf("%v", this.KillNestedContainer), "Call_KillNestedContainer", "Call_KillNestedContainer", 1) + `,`, + `LaunchNestedContainerSession:` + strings.Replace(fmt.Sprintf("%v", this.LaunchNestedContainerSession), "Call_LaunchNestedContainerSession", "Call_LaunchNestedContainerSession", 1) + `,`, + `AttachContainerInput:` + strings.Replace(fmt.Sprintf("%v", this.AttachContainerInput), "Call_AttachContainerInput", "Call_AttachContainerInput", 1) + `,`, + `AttachContainerOutput:` + strings.Replace(fmt.Sprintf("%v", this.AttachContainerOutput), "Call_AttachContainerOutput", "Call_AttachContainerOutput", 1) + `,`, + `RemoveNestedContainer:` + strings.Replace(fmt.Sprintf("%v", this.RemoveNestedContainer), "Call_RemoveNestedContainer", "Call_RemoveNestedContainer", 1) + `,`, + `LaunchContainer:` + strings.Replace(fmt.Sprintf("%v", this.LaunchContainer), "Call_LaunchContainer", "Call_LaunchContainer", 1) + `,`, + `WaitContainer:` + strings.Replace(fmt.Sprintf("%v", this.WaitContainer), "Call_WaitContainer", "Call_WaitContainer", 1) + `,`, + `KillContainer:` + strings.Replace(fmt.Sprintf("%v", this.KillContainer), "Call_KillContainer", "Call_KillContainer", 1) + `,`, + `RemoveContainer:` + strings.Replace(fmt.Sprintf("%v", this.RemoveContainer), "Call_RemoveContainer", "Call_RemoveContainer", 1) + `,`, + `AddResourceProviderConfig:` + strings.Replace(fmt.Sprintf("%v", this.AddResourceProviderConfig), "Call_AddResourceProviderConfig", "Call_AddResourceProviderConfig", 1) + `,`, + `UpdateResourceProviderConfig:` + strings.Replace(fmt.Sprintf("%v", this.UpdateResourceProviderConfig), "Call_UpdateResourceProviderConfig", "Call_UpdateResourceProviderConfig", 1) + `,`, + `RemoveResourceProviderConfig:` + strings.Replace(fmt.Sprintf("%v", this.RemoveResourceProviderConfig), "Call_RemoveResourceProviderConfig", "Call_RemoveResourceProviderConfig", 1) + `,`, + `GetContainers:` + strings.Replace(fmt.Sprintf("%v", this.GetContainers), "Call_GetContainers", "Call_GetContainers", 1) + `,`, + `PruneImages:` + strings.Replace(fmt.Sprintf("%v", this.PruneImages), "Call_PruneImages", "Call_PruneImages", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Call_GetMetrics) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Call_GetMetrics{`, + `Timeout:` + strings.Replace(fmt.Sprintf("%v", this.Timeout), "DurationInfo", "mesos.DurationInfo", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Call_SetLoggingLevel) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Call_SetLoggingLevel{`, + `Level:` + fmt.Sprintf("%v", this.Level) + `,`, + `Duration:` + strings.Replace(strings.Replace(this.Duration.String(), "DurationInfo", "mesos.DurationInfo", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Call_ListFiles) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Call_ListFiles{`, + `Path:` + fmt.Sprintf("%v", this.Path) + `,`, + `}`, + }, "") + return s +} +func (this *Call_ReadFile) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Call_ReadFile{`, + `Path:` + fmt.Sprintf("%v", this.Path) + `,`, + `Offset:` + fmt.Sprintf("%v", this.Offset) + `,`, + `Length:` + valueToStringAgent(this.Length) + `,`, + `}`, + }, "") + return s +} +func (this *Call_GetContainers) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Call_GetContainers{`, + `ShowNested:` + valueToStringAgent(this.ShowNested) + `,`, + `ShowStandalone:` + valueToStringAgent(this.ShowStandalone) + `,`, + `}`, + }, "") + return s +} +func (this *Call_LaunchNestedContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Call_LaunchNestedContainer{`, + `ContainerID:` + strings.Replace(strings.Replace(this.ContainerID.String(), "ContainerID", "mesos.ContainerID", 1), `&`, ``, 1) + `,`, + `Command:` + strings.Replace(fmt.Sprintf("%v", this.Command), "CommandInfo", "mesos.CommandInfo", 1) + `,`, + `Container:` + strings.Replace(fmt.Sprintf("%v", this.Container), "ContainerInfo", "mesos.ContainerInfo", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Call_WaitNestedContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Call_WaitNestedContainer{`, + `ContainerID:` + strings.Replace(strings.Replace(this.ContainerID.String(), "ContainerID", "mesos.ContainerID", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Call_KillNestedContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Call_KillNestedContainer{`, + `ContainerID:` + strings.Replace(strings.Replace(this.ContainerID.String(), "ContainerID", "mesos.ContainerID", 1), `&`, ``, 1) + `,`, + `Signal:` + valueToStringAgent(this.Signal) + `,`, + `}`, + }, "") + return s +} +func (this *Call_RemoveNestedContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Call_RemoveNestedContainer{`, + `ContainerID:` + strings.Replace(strings.Replace(this.ContainerID.String(), "ContainerID", "mesos.ContainerID", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Call_LaunchNestedContainerSession) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Call_LaunchNestedContainerSession{`, + `ContainerID:` + strings.Replace(strings.Replace(this.ContainerID.String(), "ContainerID", "mesos.ContainerID", 1), `&`, ``, 1) + `,`, + `Command:` + strings.Replace(fmt.Sprintf("%v", this.Command), "CommandInfo", "mesos.CommandInfo", 1) + `,`, + `Container:` + strings.Replace(fmt.Sprintf("%v", this.Container), "ContainerInfo", "mesos.ContainerInfo", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Call_AttachContainerInput) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Call_AttachContainerInput{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `ContainerID:` + strings.Replace(fmt.Sprintf("%v", this.ContainerID), "ContainerID", "mesos.ContainerID", 1) + `,`, + `ProcessIO:` + strings.Replace(fmt.Sprintf("%v", this.ProcessIO), "ProcessIO", "ProcessIO", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Call_AttachContainerOutput) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Call_AttachContainerOutput{`, + `ContainerID:` + strings.Replace(strings.Replace(this.ContainerID.String(), "ContainerID", "mesos.ContainerID", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Call_LaunchContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Call_LaunchContainer{`, + `ContainerID:` + strings.Replace(strings.Replace(this.ContainerID.String(), "ContainerID", "mesos.ContainerID", 1), `&`, ``, 1) + `,`, + `Command:` + strings.Replace(fmt.Sprintf("%v", this.Command), "CommandInfo", "mesos.CommandInfo", 1) + `,`, + `Resources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "mesos.Resource", 1), `&`, ``, 1) + `,`, + `Container:` + strings.Replace(fmt.Sprintf("%v", this.Container), "ContainerInfo", "mesos.ContainerInfo", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Call_WaitContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Call_WaitContainer{`, + `ContainerID:` + strings.Replace(strings.Replace(this.ContainerID.String(), "ContainerID", "mesos.ContainerID", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Call_KillContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Call_KillContainer{`, + `ContainerID:` + strings.Replace(strings.Replace(this.ContainerID.String(), "ContainerID", "mesos.ContainerID", 1), `&`, ``, 1) + `,`, + `Signal:` + valueToStringAgent(this.Signal) + `,`, + `}`, + }, "") + return s +} +func (this *Call_RemoveContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Call_RemoveContainer{`, + `ContainerID:` + strings.Replace(strings.Replace(this.ContainerID.String(), "ContainerID", "mesos.ContainerID", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Call_AddResourceProviderConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Call_AddResourceProviderConfig{`, + `Info:` + strings.Replace(strings.Replace(this.Info.String(), "ResourceProviderInfo", "mesos.ResourceProviderInfo", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Call_UpdateResourceProviderConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Call_UpdateResourceProviderConfig{`, + `Info:` + strings.Replace(strings.Replace(this.Info.String(), "ResourceProviderInfo", "mesos.ResourceProviderInfo", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Call_RemoveResourceProviderConfig) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Call_RemoveResourceProviderConfig{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `}`, + }, "") + return s +} +func (this *Call_PruneImages) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Call_PruneImages{`, + `ExcludedImages:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ExcludedImages), "Image", "mesos.Image", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Response) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Response{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `GetHealth:` + strings.Replace(fmt.Sprintf("%v", this.GetHealth), "Response_GetHealth", "Response_GetHealth", 1) + `,`, + `GetFlags:` + strings.Replace(fmt.Sprintf("%v", this.GetFlags), "Response_GetFlags", "Response_GetFlags", 1) + `,`, + `GetVersion:` + strings.Replace(fmt.Sprintf("%v", this.GetVersion), "Response_GetVersion", "Response_GetVersion", 1) + `,`, + `GetMetrics:` + strings.Replace(fmt.Sprintf("%v", this.GetMetrics), "Response_GetMetrics", "Response_GetMetrics", 1) + `,`, + `GetLoggingLevel:` + strings.Replace(fmt.Sprintf("%v", this.GetLoggingLevel), "Response_GetLoggingLevel", "Response_GetLoggingLevel", 1) + `,`, + `ListFiles:` + strings.Replace(fmt.Sprintf("%v", this.ListFiles), "Response_ListFiles", "Response_ListFiles", 1) + `,`, + `ReadFile:` + strings.Replace(fmt.Sprintf("%v", this.ReadFile), "Response_ReadFile", "Response_ReadFile", 1) + `,`, + `GetState:` + strings.Replace(fmt.Sprintf("%v", this.GetState), "Response_GetState", "Response_GetState", 1) + `,`, + `GetContainers:` + strings.Replace(fmt.Sprintf("%v", this.GetContainers), "Response_GetContainers", "Response_GetContainers", 1) + `,`, + `GetFrameworks:` + strings.Replace(fmt.Sprintf("%v", this.GetFrameworks), "Response_GetFrameworks", "Response_GetFrameworks", 1) + `,`, + `GetExecutors:` + strings.Replace(fmt.Sprintf("%v", this.GetExecutors), "Response_GetExecutors", "Response_GetExecutors", 1) + `,`, + `GetTasks:` + strings.Replace(fmt.Sprintf("%v", this.GetTasks), "Response_GetTasks", "Response_GetTasks", 1) + `,`, + `WaitNestedContainer:` + strings.Replace(fmt.Sprintf("%v", this.WaitNestedContainer), "Response_WaitNestedContainer", "Response_WaitNestedContainer", 1) + `,`, + `GetAgent:` + strings.Replace(fmt.Sprintf("%v", this.GetAgent), "Response_GetAgent", "Response_GetAgent", 1) + `,`, + `WaitContainer:` + strings.Replace(fmt.Sprintf("%v", this.WaitContainer), "Response_WaitContainer", "Response_WaitContainer", 1) + `,`, + `GetResourceProviders:` + strings.Replace(fmt.Sprintf("%v", this.GetResourceProviders), "Response_GetResourceProviders", "Response_GetResourceProviders", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Response_GetHealth) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Response_GetHealth{`, + `Healthy:` + fmt.Sprintf("%v", this.Healthy) + `,`, + `}`, + }, "") + return s +} +func (this *Response_GetFlags) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Response_GetFlags{`, + `Flags:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Flags), "Flag", "mesos.Flag", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Response_GetVersion) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Response_GetVersion{`, + `VersionInfo:` + strings.Replace(strings.Replace(this.VersionInfo.String(), "VersionInfo", "mesos.VersionInfo", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Response_GetMetrics) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Response_GetMetrics{`, + `Metrics:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Metrics), "Metric", "mesos.Metric", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Response_GetLoggingLevel) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Response_GetLoggingLevel{`, + `Level:` + fmt.Sprintf("%v", this.Level) + `,`, + `}`, + }, "") + return s +} +func (this *Response_ListFiles) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Response_ListFiles{`, + `FileInfos:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.FileInfos), "FileInfo", "mesos.FileInfo", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Response_ReadFile) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Response_ReadFile{`, + `Size:` + fmt.Sprintf("%v", this.Size) + `,`, + `Data:` + valueToStringAgent(this.Data) + `,`, + `}`, + }, "") + return s +} +func (this *Response_GetState) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Response_GetState{`, + `GetTasks:` + strings.Replace(fmt.Sprintf("%v", this.GetTasks), "Response_GetTasks", "Response_GetTasks", 1) + `,`, + `GetExecutors:` + strings.Replace(fmt.Sprintf("%v", this.GetExecutors), "Response_GetExecutors", "Response_GetExecutors", 1) + `,`, + `GetFrameworks:` + strings.Replace(fmt.Sprintf("%v", this.GetFrameworks), "Response_GetFrameworks", "Response_GetFrameworks", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Response_GetContainers) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Response_GetContainers{`, + `Containers:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Containers), "Response_GetContainers_Container", "Response_GetContainers_Container", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Response_GetContainers_Container) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Response_GetContainers_Container{`, + `FrameworkID:` + strings.Replace(fmt.Sprintf("%v", this.FrameworkID), "FrameworkID", "mesos.FrameworkID", 1) + `,`, + `ExecutorID:` + strings.Replace(fmt.Sprintf("%v", this.ExecutorID), "ExecutorID", "mesos.ExecutorID", 1) + `,`, + `ExecutorName:` + valueToStringAgent(this.ExecutorName) + `,`, + `ContainerID:` + strings.Replace(strings.Replace(this.ContainerID.String(), "ContainerID", "mesos.ContainerID", 1), `&`, ``, 1) + `,`, + `ContainerStatus:` + strings.Replace(fmt.Sprintf("%v", this.ContainerStatus), "ContainerStatus", "mesos.ContainerStatus", 1) + `,`, + `ResourceStatistics:` + strings.Replace(fmt.Sprintf("%v", this.ResourceStatistics), "ResourceStatistics", "mesos.ResourceStatistics", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Response_GetFrameworks) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Response_GetFrameworks{`, + `Frameworks:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Frameworks), "Response_GetFrameworks_Framework", "Response_GetFrameworks_Framework", 1), `&`, ``, 1) + `,`, + `CompletedFrameworks:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.CompletedFrameworks), "Response_GetFrameworks_Framework", "Response_GetFrameworks_Framework", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Response_GetFrameworks_Framework) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Response_GetFrameworks_Framework{`, + `FrameworkInfo:` + strings.Replace(strings.Replace(this.FrameworkInfo.String(), "FrameworkInfo", "mesos.FrameworkInfo", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Response_GetExecutors) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Response_GetExecutors{`, + `Executors:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Executors), "Response_GetExecutors_Executor", "Response_GetExecutors_Executor", 1), `&`, ``, 1) + `,`, + `CompletedExecutors:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.CompletedExecutors), "Response_GetExecutors_Executor", "Response_GetExecutors_Executor", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Response_GetExecutors_Executor) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Response_GetExecutors_Executor{`, + `ExecutorInfo:` + strings.Replace(strings.Replace(this.ExecutorInfo.String(), "ExecutorInfo", "mesos.ExecutorInfo", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Response_GetTasks) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Response_GetTasks{`, + `PendingTasks:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.PendingTasks), "Task", "mesos.Task", 1), `&`, ``, 1) + `,`, + `QueuedTasks:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.QueuedTasks), "Task", "mesos.Task", 1), `&`, ``, 1) + `,`, + `LaunchedTasks:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.LaunchedTasks), "Task", "mesos.Task", 1), `&`, ``, 1) + `,`, + `TerminatedTasks:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.TerminatedTasks), "Task", "mesos.Task", 1), `&`, ``, 1) + `,`, + `CompletedTasks:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.CompletedTasks), "Task", "mesos.Task", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Response_GetAgent) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Response_GetAgent{`, + `AgentInfo:` + strings.Replace(fmt.Sprintf("%v", this.AgentInfo), "AgentInfo", "mesos.AgentInfo", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Response_GetResourceProviders) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Response_GetResourceProviders{`, + `ResourceProviders:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ResourceProviders), "Response_GetResourceProviders_ResourceProvider", "Response_GetResourceProviders_ResourceProvider", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Response_GetResourceProviders_ResourceProvider) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Response_GetResourceProviders_ResourceProvider{`, + `ResourceProviderInfo:` + strings.Replace(strings.Replace(this.ResourceProviderInfo.String(), "ResourceProviderInfo", "mesos.ResourceProviderInfo", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Response_WaitNestedContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Response_WaitNestedContainer{`, + `ExitStatus:` + valueToStringAgent(this.ExitStatus) + `,`, + `State:` + valueToStringAgent(this.State) + `,`, + `Reason:` + valueToStringAgent(this.Reason) + `,`, + `Limitation:` + strings.Replace(fmt.Sprintf("%v", this.Limitation), "TaskResourceLimitation", "mesos.TaskResourceLimitation", 1) + `,`, + `Message:` + valueToStringAgent(this.Message) + `,`, + `}`, + }, "") + return s +} +func (this *Response_WaitContainer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Response_WaitContainer{`, + `ExitStatus:` + valueToStringAgent(this.ExitStatus) + `,`, + `State:` + valueToStringAgent(this.State) + `,`, + `Reason:` + valueToStringAgent(this.Reason) + `,`, + `Limitation:` + strings.Replace(fmt.Sprintf("%v", this.Limitation), "TaskResourceLimitation", "mesos.TaskResourceLimitation", 1) + `,`, + `Message:` + valueToStringAgent(this.Message) + `,`, + `}`, + }, "") + return s +} +func (this *ProcessIO) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ProcessIO{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Data:` + strings.Replace(fmt.Sprintf("%v", this.Data), "ProcessIO_Data", "ProcessIO_Data", 1) + `,`, + `Control:` + strings.Replace(fmt.Sprintf("%v", this.Control), "ProcessIO_Control", "ProcessIO_Control", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ProcessIO_Data) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ProcessIO_Data{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Data:` + valueToStringAgent(this.Data) + `,`, + `}`, + }, "") + return s +} +func (this *ProcessIO_Control) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ProcessIO_Control{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `TTYInfo:` + strings.Replace(fmt.Sprintf("%v", this.TTYInfo), "TTYInfo", "mesos.TTYInfo", 1) + `,`, + `Heartbeat:` + strings.Replace(fmt.Sprintf("%v", this.Heartbeat), "ProcessIO_Control_Heartbeat", "ProcessIO_Control_Heartbeat", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ProcessIO_Control_Heartbeat) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ProcessIO_Control_Heartbeat{`, + `Interval:` + strings.Replace(fmt.Sprintf("%v", this.Interval), "DurationInfo", "mesos.DurationInfo", 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringAgent(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *Call) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Call: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Call: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (Call_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GetMetrics", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GetMetrics == nil { + m.GetMetrics = &Call_GetMetrics{} + } + if err := m.GetMetrics.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SetLoggingLevel", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SetLoggingLevel == nil { + m.SetLoggingLevel = &Call_SetLoggingLevel{} + } + if err := m.SetLoggingLevel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListFiles", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ListFiles == nil { + m.ListFiles = &Call_ListFiles{} + } + if err := m.ListFiles.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadFile", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ReadFile == nil { + m.ReadFile = &Call_ReadFile{} + } + if err := m.ReadFile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LaunchNestedContainer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LaunchNestedContainer == nil { + m.LaunchNestedContainer = &Call_LaunchNestedContainer{} + } + if err := m.LaunchNestedContainer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WaitNestedContainer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.WaitNestedContainer == nil { + m.WaitNestedContainer = &Call_WaitNestedContainer{} + } + if err := m.WaitNestedContainer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KillNestedContainer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.KillNestedContainer == nil { + m.KillNestedContainer = &Call_KillNestedContainer{} + } + if err := m.KillNestedContainer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LaunchNestedContainerSession", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LaunchNestedContainerSession == nil { + m.LaunchNestedContainerSession = &Call_LaunchNestedContainerSession{} + } + if err := m.LaunchNestedContainerSession.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AttachContainerInput", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AttachContainerInput == nil { + m.AttachContainerInput = &Call_AttachContainerInput{} + } + if err := m.AttachContainerInput.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AttachContainerOutput", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AttachContainerOutput == nil { + m.AttachContainerOutput = &Call_AttachContainerOutput{} + } + if err := m.AttachContainerOutput.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RemoveNestedContainer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RemoveNestedContainer == nil { + m.RemoveNestedContainer = &Call_RemoveNestedContainer{} + } + if err := m.RemoveNestedContainer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LaunchContainer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LaunchContainer == nil { + m.LaunchContainer = &Call_LaunchContainer{} + } + if err := m.LaunchContainer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WaitContainer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.WaitContainer == nil { + m.WaitContainer = &Call_WaitContainer{} + } + if err := m.WaitContainer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KillContainer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.KillContainer == nil { + m.KillContainer = &Call_KillContainer{} + } + if err := m.KillContainer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RemoveContainer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RemoveContainer == nil { + m.RemoveContainer = &Call_RemoveContainer{} + } + if err := m.RemoveContainer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AddResourceProviderConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AddResourceProviderConfig == nil { + m.AddResourceProviderConfig = &Call_AddResourceProviderConfig{} + } + if err := m.AddResourceProviderConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 18: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UpdateResourceProviderConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.UpdateResourceProviderConfig == nil { + m.UpdateResourceProviderConfig = &Call_UpdateResourceProviderConfig{} + } + if err := m.UpdateResourceProviderConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 19: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RemoveResourceProviderConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RemoveResourceProviderConfig == nil { + m.RemoveResourceProviderConfig = &Call_RemoveResourceProviderConfig{} + } + if err := m.RemoveResourceProviderConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 20: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GetContainers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GetContainers == nil { + m.GetContainers = &Call_GetContainers{} + } + if err := m.GetContainers.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 21: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PruneImages", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.PruneImages == nil { + m.PruneImages = &Call_PruneImages{} + } + if err := m.PruneImages.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Call_GetMetrics) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetMetrics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetMetrics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Timeout == nil { + m.Timeout = &mesos.DurationInfo{} + } + if err := m.Timeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Call_SetLoggingLevel) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SetLoggingLevel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SetLoggingLevel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) + } + m.Level = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Level |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Duration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("level") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("duration") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Call_ListFiles) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListFiles: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListFiles: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Path = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("path") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Call_ReadFile) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReadFile: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReadFile: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Path = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Offset", wireType) + } + m.Offset = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Offset |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Length", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Length = &v + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("path") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("offset") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Call_GetContainers) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetContainers: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetContainers: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ShowNested", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.ShowNested = &b + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ShowStandalone", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.ShowStandalone = &b + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Call_LaunchNestedContainer) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LaunchNestedContainer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LaunchNestedContainer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ContainerID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Command == nil { + m.Command = &mesos.CommandInfo{} + } + if err := m.Command.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Container == nil { + m.Container = &mesos.ContainerInfo{} + } + if err := m.Container.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_id") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Call_WaitNestedContainer) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WaitNestedContainer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WaitNestedContainer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ContainerID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_id") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Call_KillNestedContainer) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: KillNestedContainer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KillNestedContainer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ContainerID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Signal", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Signal = &v + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_id") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Call_RemoveNestedContainer) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemoveNestedContainer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemoveNestedContainer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ContainerID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_id") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Call_LaunchNestedContainerSession) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LaunchNestedContainerSession: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LaunchNestedContainerSession: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ContainerID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Command == nil { + m.Command = &mesos.CommandInfo{} + } + if err := m.Command.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Container == nil { + m.Container = &mesos.ContainerInfo{} + } + if err := m.Container.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_id") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Call_AttachContainerInput) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AttachContainerInput: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AttachContainerInput: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (Call_AttachContainerInput_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ContainerID == nil { + m.ContainerID = &mesos.ContainerID{} + } + if err := m.ContainerID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProcessIO", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ProcessIO == nil { + m.ProcessIO = &ProcessIO{} + } + if err := m.ProcessIO.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Call_AttachContainerOutput) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AttachContainerOutput: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AttachContainerOutput: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ContainerID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_id") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Call_LaunchContainer) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LaunchContainer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LaunchContainer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ContainerID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Command == nil { + m.Command = &mesos.CommandInfo{} + } + if err := m.Command.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, mesos.Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Container == nil { + m.Container = &mesos.ContainerInfo{} + } + if err := m.Container.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_id") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Call_WaitContainer) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WaitContainer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WaitContainer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ContainerID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_id") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Call_KillContainer) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: KillContainer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KillContainer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ContainerID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Signal", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Signal = &v + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_id") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Call_RemoveContainer) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemoveContainer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemoveContainer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ContainerID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_id") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Call_AddResourceProviderConfig) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AddResourceProviderConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AddResourceProviderConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("info") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Call_UpdateResourceProviderConfig) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UpdateResourceProviderConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UpdateResourceProviderConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("info") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Call_RemoveResourceProviderConfig) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RemoveResourceProviderConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RemoveResourceProviderConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Call_PruneImages) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PruneImages: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PruneImages: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExcludedImages", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExcludedImages = append(m.ExcludedImages, mesos.Image{}) + if err := m.ExcludedImages[len(m.ExcludedImages)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Response) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Response: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Response: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (Response_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GetHealth", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GetHealth == nil { + m.GetHealth = &Response_GetHealth{} + } + if err := m.GetHealth.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GetFlags", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GetFlags == nil { + m.GetFlags = &Response_GetFlags{} + } + if err := m.GetFlags.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GetVersion", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GetVersion == nil { + m.GetVersion = &Response_GetVersion{} + } + if err := m.GetVersion.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GetMetrics", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GetMetrics == nil { + m.GetMetrics = &Response_GetMetrics{} + } + if err := m.GetMetrics.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GetLoggingLevel", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GetLoggingLevel == nil { + m.GetLoggingLevel = &Response_GetLoggingLevel{} + } + if err := m.GetLoggingLevel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ListFiles", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ListFiles == nil { + m.ListFiles = &Response_ListFiles{} + } + if err := m.ListFiles.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ReadFile", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ReadFile == nil { + m.ReadFile = &Response_ReadFile{} + } + if err := m.ReadFile.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GetState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GetState == nil { + m.GetState = &Response_GetState{} + } + if err := m.GetState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GetContainers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GetContainers == nil { + m.GetContainers = &Response_GetContainers{} + } + if err := m.GetContainers.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GetFrameworks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GetFrameworks == nil { + m.GetFrameworks = &Response_GetFrameworks{} + } + if err := m.GetFrameworks.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GetExecutors", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GetExecutors == nil { + m.GetExecutors = &Response_GetExecutors{} + } + if err := m.GetExecutors.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GetTasks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GetTasks == nil { + m.GetTasks = &Response_GetTasks{} + } + if err := m.GetTasks.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WaitNestedContainer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.WaitNestedContainer == nil { + m.WaitNestedContainer = &Response_WaitNestedContainer{} + } + if err := m.WaitNestedContainer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GetAgent", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GetAgent == nil { + m.GetAgent = &Response_GetAgent{} + } + if err := m.GetAgent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WaitContainer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.WaitContainer == nil { + m.WaitContainer = &Response_WaitContainer{} + } + if err := m.WaitContainer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 17: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GetResourceProviders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GetResourceProviders == nil { + m.GetResourceProviders = &Response_GetResourceProviders{} + } + if err := m.GetResourceProviders.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Response_GetHealth) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetHealth: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetHealth: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Healthy", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Healthy = bool(v != 0) + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("healthy") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Response_GetFlags) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetFlags: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetFlags: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Flags", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Flags = append(m.Flags, mesos.Flag{}) + if err := m.Flags[len(m.Flags)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Response_GetVersion) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetVersion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetVersion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VersionInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.VersionInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("version_info") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Response_GetMetrics) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetMetrics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetMetrics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metrics", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Metrics = append(m.Metrics, mesos.Metric{}) + if err := m.Metrics[len(m.Metrics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Response_GetLoggingLevel) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetLoggingLevel: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetLoggingLevel: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Level", wireType) + } + m.Level = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Level |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("level") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Response_ListFiles) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ListFiles: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ListFiles: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FileInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FileInfos = append(m.FileInfos, mesos.FileInfo{}) + if err := m.FileInfos[len(m.FileInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Response_ReadFile) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReadFile: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReadFile: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + } + m.Size = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Size |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("size") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("data") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Response_GetState) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GetTasks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GetTasks == nil { + m.GetTasks = &Response_GetTasks{} + } + if err := m.GetTasks.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GetExecutors", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GetExecutors == nil { + m.GetExecutors = &Response_GetExecutors{} + } + if err := m.GetExecutors.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GetFrameworks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GetFrameworks == nil { + m.GetFrameworks = &Response_GetFrameworks{} + } + if err := m.GetFrameworks.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Response_GetContainers) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetContainers: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetContainers: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Containers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Containers = append(m.Containers, Response_GetContainers_Container{}) + if err := m.Containers[len(m.Containers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Response_GetContainers_Container) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Container: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Container: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FrameworkID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FrameworkID == nil { + m.FrameworkID = &mesos.FrameworkID{} + } + if err := m.FrameworkID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutorID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ExecutorID == nil { + m.ExecutorID = &mesos.ExecutorID{} + } + if err := m.ExecutorID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutorName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.ExecutorName = &s + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ContainerID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerStatus", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ContainerStatus == nil { + m.ContainerStatus = &mesos.ContainerStatus{} + } + if err := m.ContainerStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceStatistics", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ResourceStatistics == nil { + m.ResourceStatistics = &mesos.ResourceStatistics{} + } + if err := m.ResourceStatistics.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_id") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Response_GetFrameworks) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetFrameworks: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetFrameworks: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Frameworks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Frameworks = append(m.Frameworks, Response_GetFrameworks_Framework{}) + if err := m.Frameworks[len(m.Frameworks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompletedFrameworks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CompletedFrameworks = append(m.CompletedFrameworks, Response_GetFrameworks_Framework{}) + if err := m.CompletedFrameworks[len(m.CompletedFrameworks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Response_GetFrameworks_Framework) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Framework: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Framework: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FrameworkInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.FrameworkInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_info") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Response_GetExecutors) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetExecutors: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetExecutors: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Executors", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Executors = append(m.Executors, Response_GetExecutors_Executor{}) + if err := m.Executors[len(m.Executors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompletedExecutors", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CompletedExecutors = append(m.CompletedExecutors, Response_GetExecutors_Executor{}) + if err := m.CompletedExecutors[len(m.CompletedExecutors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Response_GetExecutors_Executor) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Executor: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Executor: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutorInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ExecutorInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("executor_info") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Response_GetTasks) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetTasks: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetTasks: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PendingTasks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PendingTasks = append(m.PendingTasks, mesos.Task{}) + if err := m.PendingTasks[len(m.PendingTasks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field QueuedTasks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.QueuedTasks = append(m.QueuedTasks, mesos.Task{}) + if err := m.QueuedTasks[len(m.QueuedTasks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LaunchedTasks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LaunchedTasks = append(m.LaunchedTasks, mesos.Task{}) + if err := m.LaunchedTasks[len(m.LaunchedTasks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TerminatedTasks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TerminatedTasks = append(m.TerminatedTasks, mesos.Task{}) + if err := m.TerminatedTasks[len(m.TerminatedTasks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CompletedTasks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CompletedTasks = append(m.CompletedTasks, mesos.Task{}) + if err := m.CompletedTasks[len(m.CompletedTasks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Response_GetAgent) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetAgent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetAgent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AgentInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AgentInfo == nil { + m.AgentInfo = &mesos.AgentInfo{} + } + if err := m.AgentInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Response_GetResourceProviders) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GetResourceProviders: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetResourceProviders: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceProviders", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResourceProviders = append(m.ResourceProviders, Response_GetResourceProviders_ResourceProvider{}) + if err := m.ResourceProviders[len(m.ResourceProviders)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Response_GetResourceProviders_ResourceProvider) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceProvider: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceProvider: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResourceProviderInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ResourceProviderInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("resource_provider_info") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Response_WaitNestedContainer) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WaitNestedContainer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WaitNestedContainer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExitStatus", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ExitStatus = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var v mesos.TaskState + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (mesos.TaskState(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.State = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var v mesos.TaskStatus_Reason + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (mesos.TaskStatus_Reason(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Reason = &v + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Limitation", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Limitation == nil { + m.Limitation = &mesos.TaskResourceLimitation{} + } + if err := m.Limitation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Message = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Response_WaitContainer) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WaitContainer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WaitContainer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExitStatus", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ExitStatus = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var v mesos.TaskState + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (mesos.TaskState(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.State = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var v mesos.TaskStatus_Reason + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (mesos.TaskStatus_Reason(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Reason = &v + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Limitation", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Limitation == nil { + m.Limitation = &mesos.TaskResourceLimitation{} + } + if err := m.Limitation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Message = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ProcessIO) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ProcessIO: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ProcessIO: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (ProcessIO_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Data == nil { + m.Data = &ProcessIO_Data{} + } + if err := m.Data.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Control", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Control == nil { + m.Control = &ProcessIO_Control{} + } + if err := m.Control.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ProcessIO_Data) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Data: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Data: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (ProcessIO_Data_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ProcessIO_Control) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Control: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Control: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (ProcessIO_Control_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TTYInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TTYInfo == nil { + m.TTYInfo = &mesos.TTYInfo{} + } + if err := m.TTYInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Heartbeat", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Heartbeat == nil { + m.Heartbeat = &ProcessIO_Control_Heartbeat{} + } + if err := m.Heartbeat.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ProcessIO_Control_Heartbeat) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Heartbeat: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Heartbeat: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Interval", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAgent + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthAgent + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Interval == nil { + m.Interval = &mesos.DurationInfo{} + } + if err := m.Interval.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipAgent(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthAgent + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipAgent(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAgent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAgent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAgent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthAgent + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowAgent + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipAgent(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthAgent = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowAgent = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("agent/agent.proto", fileDescriptorAgent) } + +var fileDescriptorAgent = []byte{ + // 2975 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xdc, 0x5a, 0x4d, 0x6c, 0x1b, 0xc7, + 0xf5, 0xf7, 0x52, 0x94, 0x44, 0x3e, 0x7e, 0xad, 0x46, 0x1f, 0xa6, 0xd7, 0x0a, 0xa5, 0xc8, 0x48, + 0xe2, 0xff, 0xdf, 0xb5, 0xe4, 0x2a, 0x1f, 0x0d, 0xa2, 0x24, 0x28, 0x25, 0xae, 0x24, 0xda, 0x34, + 0xa9, 0xce, 0xae, 0xec, 0x26, 0x6d, 0xc0, 0xae, 0xc9, 0x15, 0xb5, 0xf0, 0x92, 0xcb, 0xee, 0x2e, + 0xe5, 0xb8, 0xa7, 0x1e, 0x7b, 0x6b, 0x0f, 0x05, 0x7a, 0xe9, 0xa1, 0x40, 0x2f, 0x39, 0xf4, 0xde, + 0x9e, 0x8a, 0x5e, 0x8a, 0xe4, 0xd0, 0x43, 0x8e, 0x05, 0x5a, 0xb8, 0xb5, 0x72, 0x69, 0x6f, 0x39, + 0xb4, 0x40, 0x4f, 0x45, 0x31, 0x1f, 0xfb, 0x41, 0xee, 0x2e, 0xed, 0xb8, 0x46, 0x8a, 0xf6, 0x22, + 0xec, 0xbc, 0xf9, 0xbd, 0xdf, 0xcc, 0xbc, 0x99, 0x79, 0xef, 0xcd, 0xa3, 0x60, 0x41, 0xeb, 0xe9, + 0x03, 0x77, 0x8b, 0xfe, 0xdd, 0x1c, 0xda, 0x96, 0x6b, 0xa1, 0x5c, 0x5f, 0x77, 0x2c, 0x67, 0x93, + 0x8a, 0xa4, 0x1b, 0x3d, 0xc3, 0x3d, 0x1d, 0xdd, 0xdb, 0xec, 0x58, 0xfd, 0x2d, 0x2a, 0x67, 0x7f, + 0xaf, 0xf7, 0xac, 0x2d, 0x6d, 0x68, 0x6c, 0x9d, 0x7d, 0x75, 0xcb, 0x34, 0xee, 0x31, 0x19, 0x53, + 0x97, 0xae, 0x87, 0x34, 0x7a, 0x56, 0xcf, 0xda, 0xa2, 0xe2, 0x7b, 0xa3, 0x13, 0xda, 0xa2, 0x0d, + 0xfa, 0xc5, 0xe0, 0x1b, 0x1f, 0xbf, 0x0c, 0xe9, 0x3d, 0xcd, 0x34, 0xd1, 0x0d, 0x48, 0xbb, 0x0f, + 0x87, 0x7a, 0x59, 0x58, 0x17, 0xae, 0x16, 0xb7, 0x57, 0x36, 0x43, 0xb3, 0xd8, 0x24, 0x80, 0x4d, + 0xf5, 0xe1, 0x50, 0xdf, 0x4d, 0x7f, 0xf2, 0x68, 0xed, 0x02, 0xa6, 0x48, 0xf4, 0x0e, 0xe4, 0x7a, + 0xba, 0xdb, 0xee, 0xeb, 0xae, 0x6d, 0x74, 0x9c, 0x72, 0x6a, 0x5d, 0xb8, 0x9a, 0xdb, 0x5e, 0x8d, + 0x2a, 0x1e, 0xe8, 0xee, 0x6d, 0x86, 0xc1, 0xd0, 0xf3, 0xbf, 0xd1, 0x6d, 0x58, 0x70, 0x74, 0xb7, + 0x6d, 0x5a, 0xbd, 0x9e, 0x31, 0xe8, 0xb5, 0x4d, 0xfd, 0x4c, 0x37, 0xcb, 0x33, 0x94, 0xe4, 0xc5, + 0x28, 0x89, 0xa2, 0xbb, 0x0d, 0x86, 0x6c, 0x10, 0x20, 0x2e, 0x39, 0xe3, 0x02, 0xf4, 0x16, 0x80, + 0x69, 0x38, 0x6e, 0xfb, 0xc4, 0x30, 0x75, 0xa7, 0x9c, 0xa6, 0x3c, 0x97, 0xa3, 0x3c, 0x0d, 0xc3, + 0x71, 0xf7, 0x09, 0x04, 0x67, 0x4d, 0xef, 0x13, 0x7d, 0x0d, 0xb2, 0xb6, 0xae, 0x75, 0xa9, 0x6e, + 0x79, 0x96, 0xaa, 0x4a, 0x51, 0x55, 0xac, 0x6b, 0x5d, 0x82, 0xc7, 0x19, 0x9b, 0x7f, 0xa1, 0x0e, + 0x5c, 0x34, 0xb5, 0xd1, 0xa0, 0x73, 0xda, 0x1e, 0xe8, 0x8e, 0xab, 0x77, 0xdb, 0x1d, 0x6b, 0xe0, + 0x6a, 0xc6, 0x40, 0xb7, 0xcb, 0x73, 0x94, 0xe6, 0x95, 0x98, 0x19, 0x50, 0x85, 0x26, 0xc5, 0xef, + 0x79, 0xf0, 0xdd, 0x54, 0x59, 0xc0, 0xcb, 0x66, 0x5c, 0x17, 0xfa, 0x00, 0x96, 0x1f, 0x68, 0x86, + 0x1b, 0x1d, 0x62, 0x9e, 0x0e, 0xf1, 0x52, 0x74, 0x88, 0xbb, 0x9a, 0xe1, 0xc6, 0x0d, 0xb0, 0xf8, + 0x20, 0xda, 0x41, 0xe8, 0xef, 0x1b, 0xa6, 0x19, 0xa5, 0xcf, 0x24, 0xd1, 0xdf, 0x32, 0x4c, 0x33, + 0x96, 0xfe, 0x7e, 0xb4, 0x03, 0x8d, 0x60, 0x2d, 0xc1, 0x44, 0x6d, 0x47, 0x77, 0x1c, 0xc3, 0x1a, + 0x94, 0xb3, 0x74, 0xa0, 0xcd, 0xa7, 0x34, 0x95, 0xc2, 0xb4, 0xf0, 0xaa, 0x39, 0xa5, 0x17, 0x7d, + 0x1b, 0x56, 0x34, 0xd7, 0xd5, 0x3a, 0xa7, 0xa1, 0xf1, 0x8c, 0xc1, 0x70, 0xe4, 0x96, 0x81, 0x8e, + 0xf6, 0x72, 0x74, 0xb4, 0x2a, 0xc5, 0xfb, 0x4c, 0x75, 0x82, 0xc6, 0x4b, 0x5a, 0x8c, 0x14, 0xb5, + 0xe1, 0x62, 0x84, 0xdd, 0x1a, 0xb9, 0x84, 0x3e, 0x97, 0xb4, 0xef, 0x13, 0xf4, 0x2d, 0x0a, 0xc7, + 0xcb, 0x5a, 0x9c, 0x98, 0x1c, 0x2c, 0x5b, 0xef, 0x5b, 0x67, 0x7a, 0x74, 0x5b, 0xf2, 0x49, 0x03, + 0x60, 0xaa, 0x10, 0x7b, 0xb0, 0xec, 0xb8, 0x2e, 0xd4, 0x00, 0x91, 0x6f, 0x4d, 0xc0, 0x5e, 0x48, + 0xba, 0x80, 0x6c, 0x2f, 0x7c, 0x65, 0x5c, 0x32, 0xc7, 0x05, 0x68, 0x1f, 0x8a, 0xf4, 0x98, 0x06, + 0x5c, 0x45, 0xca, 0xb5, 0x16, 0x7f, 0x3e, 0x03, 0xa6, 0xc2, 0x83, 0x70, 0x93, 0xf0, 0xd0, 0xf3, + 0x18, 0xf0, 0x94, 0x92, 0x78, 0xc8, 0x41, 0x0c, 0xf1, 0xdc, 0x0f, 0x37, 0xc9, 0xea, 0xb8, 0x09, + 0x03, 0x26, 0x31, 0x69, 0x75, 0xcc, 0x76, 0xa1, 0xd5, 0xd9, 0xe3, 0x02, 0x64, 0xc2, 0xaa, 0xd6, + 0xed, 0xb6, 0x6d, 0xdd, 0xb1, 0x46, 0x76, 0x47, 0x6f, 0x0f, 0x6d, 0xeb, 0xcc, 0xe8, 0xea, 0x36, + 0x21, 0x3f, 0x31, 0x7a, 0xe5, 0x05, 0xca, 0x7c, 0x2d, 0x66, 0xdb, 0xbb, 0x5d, 0xcc, 0x95, 0x8e, + 0xb8, 0xce, 0x1e, 0x55, 0xc1, 0x97, 0xb4, 0xa4, 0x2e, 0x72, 0x69, 0x46, 0xc3, 0xae, 0xe6, 0xea, + 0xc9, 0x03, 0xa2, 0xa4, 0x4b, 0x73, 0x4c, 0x15, 0x13, 0xc6, 0x5c, 0x1d, 0x4d, 0xe9, 0x25, 0xc3, + 0x72, 0x93, 0x25, 0x0e, 0xbb, 0x98, 0x34, 0x2c, 0xb3, 0x60, 0xd2, 0xb0, 0xf6, 0x94, 0x5e, 0xb2, + 0xe3, 0x24, 0x90, 0xf8, 0xdb, 0xe4, 0x94, 0x97, 0x92, 0x76, 0xfc, 0x40, 0x0f, 0x4e, 0x8a, 0x83, + 0x0b, 0xbd, 0x70, 0x13, 0x7d, 0x1d, 0xf2, 0x43, 0x7b, 0x34, 0xd0, 0xdb, 0x46, 0x5f, 0xeb, 0xe9, + 0x4e, 0x79, 0x99, 0xb2, 0xbc, 0x10, 0x65, 0x39, 0x22, 0xa8, 0x3a, 0x05, 0xe1, 0xdc, 0x30, 0x68, + 0x48, 0x3b, 0x00, 0x41, 0xb4, 0x42, 0xd7, 0x61, 0xde, 0x35, 0xfa, 0xba, 0x35, 0x72, 0x69, 0x54, + 0xcc, 0x6d, 0x2f, 0x72, 0xaa, 0xda, 0xc8, 0xd6, 0x5c, 0xc3, 0x1a, 0xd4, 0x07, 0x27, 0x16, 0xf6, + 0x30, 0x52, 0x17, 0x4a, 0x13, 0x51, 0x0a, 0x49, 0x30, 0xcb, 0xe2, 0x9a, 0xb0, 0x9e, 0xba, 0x5a, + 0xe0, 0xd1, 0x93, 0x89, 0xd0, 0xeb, 0x90, 0xe9, 0x72, 0x9e, 0x72, 0x6a, 0x3d, 0x95, 0x40, 0xcf, + 0x75, 0x7c, 0xa8, 0xf4, 0x12, 0x64, 0xfd, 0x18, 0x86, 0xca, 0x90, 0x1e, 0x6a, 0xee, 0x29, 0xa5, + 0xcf, 0x7a, 0xc1, 0x99, 0x48, 0xa4, 0xf7, 0x21, 0xe3, 0xc5, 0xab, 0x64, 0x14, 0x5a, 0x85, 0x39, + 0xeb, 0xe4, 0xc4, 0xd1, 0x5d, 0x3a, 0x83, 0x34, 0xef, 0xe3, 0x32, 0xb4, 0x02, 0x73, 0xa6, 0x3e, + 0xe8, 0xb9, 0xa7, 0x34, 0x2c, 0xa7, 0x31, 0x6f, 0x49, 0xef, 0x41, 0x61, 0x6c, 0x1f, 0xd0, 0x1a, + 0xe4, 0x9c, 0x53, 0xeb, 0x01, 0xf7, 0x55, 0xd4, 0x58, 0x19, 0x0c, 0x44, 0xc4, 0x5c, 0x0e, 0x7a, + 0x05, 0x4a, 0x14, 0xe0, 0xb8, 0xda, 0xa0, 0xab, 0x99, 0xd6, 0x40, 0xa7, 0xe9, 0x42, 0x06, 0x17, + 0x89, 0x58, 0xf1, 0xa5, 0xd2, 0x6f, 0x05, 0x58, 0x8e, 0xf5, 0xfa, 0xe8, 0x26, 0xe4, 0x43, 0x9e, + 0xbc, 0x4b, 0x17, 0x93, 0xdb, 0x46, 0xdc, 0x64, 0x81, 0x7f, 0xae, 0xed, 0x2e, 0x92, 0x45, 0x9c, + 0x3f, 0x5a, 0xcb, 0x85, 0x84, 0x38, 0xe7, 0x2b, 0xd7, 0xbb, 0xe8, 0x2b, 0x30, 0xdf, 0xb1, 0xfa, + 0x7d, 0x6d, 0xd0, 0xe5, 0x59, 0x4b, 0x40, 0x43, 0xa5, 0x6c, 0x5f, 0x39, 0x04, 0x6d, 0x43, 0x36, + 0xf0, 0x20, 0x2c, 0x41, 0x59, 0x8a, 0x0c, 0x4b, 0x34, 0x02, 0x98, 0xa4, 0xc1, 0x62, 0x4c, 0x10, + 0x7e, 0x9e, 0x8b, 0x90, 0x1e, 0xc2, 0x62, 0x4c, 0x20, 0x7e, 0xae, 0x76, 0x5a, 0x81, 0x39, 0xc7, + 0xe8, 0x0d, 0x34, 0x93, 0x9a, 0x69, 0x16, 0xf3, 0x96, 0xd4, 0x81, 0xe5, 0xd8, 0x60, 0xf3, 0x5c, + 0xd7, 0xf7, 0x3b, 0x01, 0x56, 0xa7, 0x25, 0x00, 0xff, 0x65, 0x27, 0xe2, 0xa3, 0x14, 0x2c, 0xc5, + 0x65, 0x18, 0x48, 0x1e, 0x4b, 0xbc, 0xaf, 0x3d, 0x5d, 0x5e, 0x12, 0xcd, 0xc6, 0xf7, 0x27, 0xac, + 0x31, 0xb9, 0x8c, 0xc0, 0x1a, 0xa5, 0xa9, 0x96, 0xa8, 0x01, 0x0c, 0x6d, 0xab, 0xa3, 0x3b, 0x4e, + 0xdb, 0xb0, 0xf8, 0xe2, 0xc6, 0x5f, 0x03, 0x47, 0xac, 0xbb, 0xde, 0xda, 0x2d, 0x9c, 0x3f, 0x5a, + 0xcb, 0xfa, 0x4d, 0x9c, 0xe5, 0x8a, 0x75, 0x6b, 0x63, 0x07, 0xd2, 0x64, 0x86, 0x28, 0x07, 0xf3, + 0xc7, 0xcd, 0x5b, 0xcd, 0xd6, 0xdd, 0xa6, 0x78, 0x01, 0x89, 0x90, 0xdf, 0x6b, 0x35, 0xd5, 0x6a, + 0xbd, 0x29, 0xe3, 0x76, 0xbd, 0x26, 0x0a, 0xa8, 0x08, 0x70, 0x84, 0x5b, 0x7b, 0xb2, 0xa2, 0xb4, + 0xeb, 0x2d, 0x31, 0x25, 0xa5, 0x7f, 0xf0, 0xf3, 0x8a, 0x40, 0x8e, 0x57, 0x6c, 0xb2, 0xf4, 0x5c, + 0x8f, 0xd7, 0xdf, 0x04, 0x28, 0x4d, 0xe4, 0x34, 0xff, 0xc1, 0x13, 0xf5, 0x2a, 0x79, 0x81, 0xb0, + 0xe0, 0xe8, 0x94, 0x67, 0xd6, 0x67, 0xae, 0xe6, 0xb6, 0x4b, 0x1c, 0xef, 0x05, 0x4d, 0xbe, 0xdb, + 0x01, 0x6e, 0xfc, 0x18, 0xa6, 0x9f, 0xee, 0x18, 0x7e, 0x0b, 0x0a, 0x63, 0xd9, 0xd7, 0x73, 0xb5, + 0xa9, 0x03, 0x85, 0xb1, 0x94, 0xec, 0x4b, 0x71, 0x46, 0x1f, 0x40, 0x69, 0x22, 0x7b, 0x7b, 0xae, + 0x6b, 0xc2, 0x70, 0x29, 0x31, 0x85, 0x43, 0xaf, 0x43, 0xda, 0x18, 0x9c, 0x58, 0x7c, 0x80, 0xcb, + 0x13, 0x3b, 0xe6, 0x81, 0x43, 0x71, 0x9c, 0xc2, 0xa5, 0x63, 0x58, 0x9d, 0x96, 0xa5, 0x3d, 0x2b, + 0x2d, 0x86, 0xd5, 0x69, 0x59, 0x18, 0xc9, 0x03, 0xb8, 0xa7, 0x09, 0xe5, 0x01, 0xd4, 0x79, 0x94, + 0x21, 0x3d, 0xd0, 0xfa, 0x3a, 0xcd, 0x02, 0xfc, 0x1e, 0x22, 0x91, 0x6e, 0x42, 0x2e, 0x94, 0x2d, + 0xa1, 0x1d, 0x28, 0xe9, 0x1f, 0x76, 0xcc, 0x51, 0x57, 0xef, 0x7a, 0x59, 0x96, 0x40, 0x4f, 0x6b, + 0x9e, 0x4f, 0x92, 0xe2, 0x38, 0x43, 0xd1, 0x83, 0x32, 0xe5, 0x8d, 0x3f, 0xcc, 0xc6, 0x79, 0x85, + 0x22, 0xc0, 0x81, 0xac, 0xb6, 0x0f, 0xe5, 0x6a, 0x43, 0x3d, 0x14, 0x05, 0x54, 0x80, 0x2c, 0x69, + 0xef, 0x37, 0xaa, 0x07, 0x8a, 0x98, 0x42, 0x25, 0xc8, 0x91, 0xe6, 0x1d, 0x19, 0x2b, 0xf5, 0x56, + 0x53, 0x9c, 0xf1, 0x04, 0xb7, 0x65, 0x15, 0xd7, 0xf7, 0x14, 0x31, 0x8d, 0x96, 0x61, 0x81, 0x08, + 0x1a, 0xad, 0x83, 0x83, 0x7a, 0xf3, 0xa0, 0xdd, 0x90, 0xef, 0xc8, 0x0d, 0x71, 0x96, 0x88, 0x95, + 0x88, 0x78, 0x8e, 0x0c, 0xd7, 0xa8, 0x2b, 0x6a, 0x7b, 0xbf, 0xde, 0x90, 0x15, 0x71, 0x9e, 0x0c, + 0x87, 0xe5, 0x6a, 0x8d, 0xb6, 0xc5, 0x8c, 0x37, 0xba, 0xa2, 0x56, 0x55, 0x59, 0xcc, 0x22, 0x04, + 0x45, 0xd2, 0xf4, 0xdd, 0x96, 0x22, 0x82, 0x27, 0xdb, 0xc7, 0xd5, 0xdb, 0xf2, 0xdd, 0x16, 0xbe, + 0xa5, 0x88, 0x39, 0xb4, 0x00, 0x05, 0x22, 0x93, 0xbf, 0x29, 0xef, 0x1d, 0xab, 0x2d, 0xac, 0x88, + 0x79, 0x8f, 0x49, 0xad, 0x2a, 0xb7, 0x14, 0xb1, 0xe0, 0x35, 0xab, 0x07, 0x72, 0x53, 0x15, 0x97, + 0x90, 0x04, 0x2b, 0xa4, 0x89, 0x65, 0xa5, 0x75, 0x8c, 0xf7, 0xe4, 0xf6, 0x11, 0x6e, 0xdd, 0xa9, + 0xd7, 0xc8, 0x00, 0x12, 0x5a, 0x83, 0x8b, 0x8d, 0xea, 0x71, 0x73, 0xef, 0xb0, 0xdd, 0x94, 0x15, + 0x55, 0xae, 0x05, 0xc3, 0x8b, 0x45, 0x29, 0x95, 0x11, 0xd0, 0x0b, 0xb0, 0x7c, 0xb7, 0x5a, 0x57, + 0xa3, 0xdd, 0x25, 0xaf, 0xfb, 0x56, 0xbd, 0xd1, 0x88, 0x76, 0x8b, 0xb4, 0x7b, 0x0d, 0x2e, 0x62, + 0xf9, 0x76, 0xeb, 0x8e, 0x1c, 0x05, 0x2c, 0x53, 0xc0, 0x15, 0x58, 0x4b, 0x18, 0xbf, 0xad, 0xc8, + 0x0a, 0xdd, 0x86, 0x05, 0xb2, 0x80, 0xaa, 0xaa, 0x56, 0xf7, 0x0e, 0x43, 0xbd, 0xf5, 0xe6, 0xd1, + 0xb1, 0x2a, 0x22, 0x74, 0x19, 0x2e, 0x46, 0xfa, 0x5a, 0xc7, 0x2a, 0xe9, 0x5c, 0x44, 0x4b, 0x20, + 0x72, 0xf6, 0x60, 0xdc, 0x15, 0x62, 0x54, 0xba, 0xa4, 0x40, 0x76, 0x91, 0xc8, 0xe8, 0x3a, 0x02, + 0x59, 0x99, 0x68, 0xf3, 0xc9, 0x07, 0xd2, 0x4b, 0x68, 0x1d, 0x56, 0xab, 0xb5, 0x5a, 0xd4, 0x9a, + 0x04, 0xb4, 0x5f, 0x3f, 0x10, 0x2f, 0x93, 0x35, 0x1d, 0x1f, 0xd5, 0xaa, 0xaa, 0x9c, 0x0c, 0x5a, + 0x25, 0x20, 0x4e, 0x9e, 0x08, 0x7a, 0x81, 0x44, 0xb1, 0x23, 0x7c, 0xdc, 0x94, 0xdb, 0xf5, 0xdb, + 0xd5, 0x03, 0x59, 0x11, 0x2b, 0x2c, 0x6a, 0x6d, 0xfc, 0xe9, 0x45, 0x92, 0x72, 0x3b, 0x43, 0x6b, + 0xe0, 0xe8, 0xe8, 0xb5, 0xb1, 0xa0, 0x3e, 0x5e, 0x4c, 0xf2, 0x40, 0xd1, 0x18, 0xfe, 0x2e, 0x00, + 0x79, 0x08, 0x9d, 0xea, 0x9a, 0xe9, 0x9e, 0xf2, 0xb0, 0xb1, 0x16, 0xaf, 0x7b, 0xa0, 0xbb, 0x87, + 0x14, 0x86, 0xb3, 0x3d, 0xef, 0x13, 0xed, 0x00, 0x69, 0xb4, 0x4f, 0x4c, 0xad, 0xe7, 0xf0, 0xd0, + 0x5d, 0x49, 0x54, 0xdf, 0x27, 0x28, 0x9c, 0xe9, 0xf1, 0x2f, 0x54, 0x65, 0xe5, 0xbc, 0x33, 0xdd, + 0xa6, 0x45, 0x19, 0x16, 0x4f, 0xd6, 0x13, 0xd5, 0xef, 0x30, 0x1c, 0x2d, 0xe9, 0xf1, 0x6f, 0x8f, + 0xc2, 0xab, 0x08, 0xce, 0x3e, 0x81, 0x22, 0xae, 0x2a, 0xf8, 0x0d, 0x58, 0xe8, 0x45, 0xaa, 0x82, + 0x73, 0x31, 0x95, 0xa8, 0x30, 0xd1, 0x78, 0x65, 0xb0, 0x37, 0xf1, 0x08, 0x7b, 0x77, 0xac, 0x32, + 0x38, 0x3f, 0xcd, 0xaa, 0xb1, 0xd5, 0xc1, 0x9d, 0x70, 0x75, 0x30, 0x33, 0xcd, 0xaa, 0x31, 0x15, + 0x42, 0xbe, 0x25, 0x8e, 0xab, 0xb9, 0x3a, 0x2f, 0x74, 0x25, 0x6f, 0x89, 0x42, 0x50, 0x74, 0x4b, + 0xe8, 0x17, 0xba, 0x19, 0x79, 0x18, 0xb3, 0xe2, 0xd5, 0x95, 0x44, 0x86, 0xe4, 0xc7, 0x31, 0xe7, + 0x3a, 0xb1, 0xb5, 0xbe, 0xfe, 0xc0, 0xb2, 0xef, 0x3b, 0xbc, 0x52, 0x95, 0xcc, 0xb5, 0xef, 0x43, + 0x29, 0x57, 0xd0, 0x44, 0x07, 0x40, 0x04, 0x6d, 0xfd, 0x43, 0xbd, 0x33, 0x72, 0x2d, 0xdb, 0xe1, + 0x35, 0xa9, 0x8d, 0x44, 0x2a, 0xd9, 0x43, 0xe2, 0x7c, 0x2f, 0xd4, 0xf2, 0xac, 0xe3, 0x6a, 0xce, + 0x7d, 0x87, 0x97, 0x9e, 0x92, 0xad, 0xa3, 0x12, 0x14, 0xb5, 0x0e, 0xfd, 0x4a, 0xae, 0x8b, 0xb2, + 0xba, 0xd3, 0xff, 0xc5, 0x13, 0xc5, 0x3c, 0xcb, 0xe2, 0xeb, 0xa2, 0x7c, 0x6e, 0x54, 0x9d, 0x97, + 0xa0, 0x92, 0xe7, 0x56, 0x25, 0x12, 0x3a, 0x37, 0xfa, 0x45, 0xac, 0x3d, 0x51, 0x0c, 0x13, 0xa7, + 0x59, 0x7b, 0x6a, 0x41, 0xec, 0x3b, 0xb0, 0x42, 0x26, 0x12, 0x29, 0xc9, 0x38, 0xbc, 0xe8, 0xf4, + 0xff, 0x89, 0xb3, 0x9a, 0xcc, 0x03, 0x1c, 0xbc, 0xd4, 0x8b, 0x91, 0x4a, 0xd7, 0x20, 0xeb, 0xfb, + 0x13, 0x54, 0x81, 0x79, 0xe6, 0x80, 0x1e, 0xd2, 0x44, 0x21, 0xc3, 0x3d, 0x94, 0x27, 0x94, 0x5e, + 0x85, 0x8c, 0xe7, 0x3d, 0xd0, 0x2b, 0x30, 0xcb, 0x9c, 0x0d, 0x4b, 0x02, 0x72, 0x7c, 0x26, 0xa4, + 0xd3, 0x2b, 0x76, 0xd0, 0x7e, 0xa9, 0x4e, 0x0b, 0x2b, 0x9e, 0x9f, 0xd8, 0x81, 0x3c, 0x77, 0x33, + 0xed, 0x50, 0x9e, 0xe3, 0xe5, 0x67, 0x1c, 0x15, 0x4a, 0x6f, 0x72, 0x67, 0x81, 0x28, 0x5a, 0xa3, + 0xf1, 0xdc, 0x0d, 0x9b, 0x43, 0x81, 0xb3, 0x30, 0x80, 0x37, 0x79, 0x8e, 0x91, 0xae, 0x43, 0xe9, + 0xe0, 0xe9, 0x6b, 0x34, 0x52, 0x35, 0x5c, 0x6c, 0x79, 0x0d, 0x80, 0xb8, 0x00, 0x3a, 0x65, 0x6f, + 0x34, 0x2f, 0x49, 0x27, 0x88, 0xd0, 0x84, 0xb3, 0x27, 0xbc, 0xed, 0x48, 0x6f, 0x8e, 0x17, 0x62, + 0x1c, 0xe3, 0x7b, 0x2c, 0x01, 0xf3, 0x8a, 0x2d, 0x54, 0x82, 0x10, 0xa4, 0xbb, 0x9a, 0xab, 0xd1, + 0x04, 0x2c, 0x8f, 0xe9, 0xb7, 0xf4, 0x47, 0x81, 0x5a, 0x9a, 0xb9, 0x82, 0xb1, 0x9b, 0x22, 0x7c, + 0xc1, 0x9b, 0x12, 0xb9, 0xaf, 0xa9, 0x67, 0xbc, 0xaf, 0x51, 0x27, 0x32, 0xf3, 0xac, 0x4e, 0x44, + 0xfa, 0xe7, 0xcc, 0x64, 0x19, 0x49, 0x01, 0x08, 0xb9, 0x3a, 0x66, 0xe0, 0xeb, 0x4f, 0xe1, 0xea, + 0x82, 0x8c, 0x9e, 0xdb, 0x34, 0x44, 0x23, 0xfd, 0x64, 0x06, 0xb2, 0xe1, 0xe2, 0x72, 0xde, 0x9f, + 0x3c, 0x7b, 0x19, 0x84, 0x9f, 0x66, 0xfe, 0xec, 0xbc, 0x57, 0x72, 0x48, 0x80, 0x73, 0xbe, 0x62, + 0xbd, 0x8b, 0x76, 0x21, 0xe7, 0x59, 0x33, 0x78, 0x6c, 0x2f, 0x70, 0x1a, 0xcf, 0x5e, 0xf5, 0xda, + 0x6e, 0xf1, 0xfc, 0xd1, 0x1a, 0x04, 0x6d, 0x0c, 0x9e, 0x56, 0xbd, 0x8b, 0xae, 0x40, 0xc1, 0xe7, + 0xa0, 0xd9, 0x37, 0xb1, 0x65, 0x16, 0xe7, 0x3d, 0x61, 0x53, 0xeb, 0xeb, 0x91, 0xa7, 0x4c, 0xfa, + 0xdf, 0x78, 0x41, 0x55, 0x41, 0x0c, 0xfd, 0xf8, 0xe2, 0x6a, 0xee, 0xc8, 0x8b, 0xd1, 0x2b, 0x93, + 0x7c, 0x0a, 0xed, 0xc5, 0xa5, 0xce, 0xb8, 0x00, 0xdd, 0x84, 0x45, 0xdf, 0x0f, 0x11, 0x06, 0xc3, + 0x71, 0xc9, 0xd5, 0x63, 0x01, 0xfa, 0xd2, 0xc4, 0x43, 0x45, 0xf1, 0x01, 0x18, 0xd9, 0x11, 0x99, + 0xf4, 0xd3, 0x14, 0x3d, 0x00, 0xa1, 0xb8, 0xa2, 0x00, 0x84, 0x8e, 0xd6, 0x93, 0x0e, 0x40, 0xa0, + 0x18, 0x6c, 0x9c, 0x77, 0x00, 0x02, 0x1a, 0x74, 0x02, 0x4b, 0x1d, 0xab, 0x3f, 0x34, 0x75, 0x12, + 0x24, 0x42, 0xf4, 0xa9, 0x67, 0xa7, 0x5f, 0xf4, 0x09, 0x43, 0xe7, 0xb9, 0x09, 0x59, 0xbf, 0x85, + 0xaa, 0x50, 0x0c, 0x9d, 0xb3, 0xc0, 0xc7, 0x2d, 0x45, 0x4e, 0x5a, 0xe0, 0x34, 0x0a, 0x27, 0x61, + 0xa1, 0xf4, 0xc3, 0x14, 0xe4, 0xc3, 0x57, 0x11, 0xb5, 0x20, 0x1b, 0xdc, 0x60, 0x66, 0x9c, 0x6b, + 0x4f, 0xbe, 0xc1, 0xfe, 0x69, 0xf4, 0x5c, 0x93, 0xcf, 0x81, 0xee, 0x41, 0xb0, 0x90, 0x31, 0xe7, + 0xf0, 0x8c, 0xd4, 0xc8, 0x67, 0xf3, 0x21, 0xd2, 0x4d, 0xc8, 0x78, 0x0d, 0xf4, 0x6e, 0xe8, 0xc0, + 0x87, 0x6c, 0xb2, 0x38, 0x79, 0x6d, 0x02, 0x93, 0xf8, 0x77, 0x81, 0x5a, 0xe4, 0x17, 0x29, 0xea, + 0x10, 0x99, 0x4f, 0x7b, 0x03, 0x0a, 0x43, 0x7d, 0xd0, 0x25, 0x49, 0xa2, 0xe7, 0x14, 0xc3, 0x21, + 0x88, 0x80, 0x3c, 0x12, 0x8e, 0x63, 0x7a, 0xaf, 0x41, 0xfe, 0xbb, 0x23, 0x7d, 0xa4, 0x77, 0xb9, + 0x5a, 0x2a, 0x49, 0x2d, 0xc7, 0x60, 0x4c, 0xeb, 0x4d, 0x28, 0xb2, 0xdf, 0xbb, 0x7c, 0xbd, 0x99, + 0x24, 0xbd, 0x82, 0x07, 0x64, 0x9a, 0x6f, 0x83, 0xe8, 0xea, 0x76, 0xdf, 0x18, 0x68, 0xae, 0xaf, + 0x9b, 0x4e, 0xd2, 0x2d, 0x05, 0x50, 0xa6, 0xfd, 0x16, 0x94, 0x82, 0x2d, 0x62, 0xca, 0xb3, 0x49, + 0xca, 0x45, 0x1f, 0x49, 0x75, 0xa5, 0x1d, 0x6a, 0x2d, 0x96, 0x8f, 0x6c, 0x01, 0xd0, 0x8d, 0xf4, + 0xec, 0x4e, 0xae, 0xab, 0xc8, 0x29, 0x28, 0x82, 0xd5, 0x89, 0x34, 0xef, 0x53, 0xfa, 0xbb, 0x00, + 0x4b, 0x71, 0x19, 0x04, 0x1a, 0x02, 0x8a, 0xc9, 0x44, 0x98, 0xf1, 0x77, 0x9e, 0x3e, 0x13, 0x89, + 0x54, 0x33, 0xf8, 0x22, 0x16, 0xec, 0x48, 0x76, 0x72, 0x1f, 0xc4, 0x49, 0x30, 0xba, 0x0b, 0x2b, + 0xd1, 0x9f, 0xa8, 0xbe, 0x58, 0xcd, 0x64, 0xc9, 0x8e, 0xe9, 0x93, 0xfe, 0x2a, 0xc4, 0x57, 0xee, + 0xd7, 0x88, 0xc3, 0x37, 0x5c, 0xcf, 0x6d, 0x0a, 0xb4, 0x04, 0x05, 0x44, 0xc4, 0x3d, 0xe3, 0xcb, + 0x30, 0xcb, 0x92, 0xfc, 0x14, 0x7d, 0xf2, 0x89, 0xa1, 0xfd, 0x61, 0x69, 0x3d, 0xeb, 0x46, 0x37, + 0x60, 0xce, 0xd6, 0x35, 0xc7, 0x1a, 0x50, 0x77, 0x5f, 0xdc, 0x2e, 0x4f, 0x00, 0x47, 0x64, 0xd2, + 0xa4, 0x1f, 0x73, 0x1c, 0x7a, 0x87, 0xbc, 0x5f, 0xfa, 0x86, 0xcb, 0x7e, 0x2a, 0x4a, 0x8f, 0xfd, + 0xa8, 0x45, 0xb4, 0xbc, 0x35, 0x36, 0x7c, 0x10, 0x0e, 0x29, 0xa0, 0x32, 0xc9, 0x90, 0x1c, 0x47, + 0xeb, 0xb1, 0x7f, 0x6d, 0xc8, 0x62, 0xaf, 0x29, 0x7d, 0x26, 0x4c, 0x16, 0x03, 0xff, 0x07, 0x57, + 0xb9, 0xf1, 0x71, 0xea, 0xcb, 0xac, 0x3a, 0x8d, 0x97, 0x97, 0xe6, 0xc6, 0xcb, 0x4b, 0xf3, 0xe3, + 0xe5, 0xa5, 0x4c, 0x4c, 0x79, 0x29, 0x1b, 0x53, 0x5e, 0x82, 0x68, 0x79, 0x29, 0x37, 0x5e, 0x5e, + 0xca, 0x8f, 0x97, 0x97, 0x8a, 0x53, 0xca, 0x4b, 0x62, 0x72, 0xf5, 0xa8, 0x40, 0xab, 0x3f, 0xd1, + 0x4a, 0x4c, 0x89, 0x57, 0x38, 0x7e, 0x39, 0x0b, 0x41, 0xb5, 0x1f, 0xbd, 0x3e, 0x56, 0xe2, 0xb8, + 0x1c, 0xff, 0x13, 0x41, 0xb4, 0xc6, 0xb1, 0xe5, 0x67, 0xba, 0xd1, 0xff, 0xd0, 0x09, 0xd4, 0x6a, + 0x9a, 0xab, 0xb1, 0x34, 0x18, 0xbd, 0x09, 0xf3, 0x24, 0x0b, 0xb1, 0x2d, 0x33, 0xb6, 0xa4, 0x11, + 0xe8, 0xec, 0x31, 0x14, 0xf6, 0xe0, 0xd2, 0x8f, 0x05, 0x48, 0x13, 0x22, 0xf4, 0xd6, 0xd8, 0x54, + 0xd7, 0xa7, 0x8c, 0x19, 0x9d, 0x2f, 0x0a, 0xcd, 0x97, 0x67, 0xe6, 0x1b, 0x6f, 0xc7, 0x9d, 0xa8, + 0x2c, 0xcc, 0x2a, 0x6a, 0xad, 0xde, 0x14, 0x05, 0x04, 0x30, 0xa7, 0xa8, 0xb5, 0xd6, 0xb1, 0x2a, + 0xa6, 0xf8, 0xb7, 0x8c, 0xb1, 0x38, 0xc3, 0x7f, 0xde, 0xf8, 0x75, 0x0a, 0xe6, 0xf9, 0x5c, 0xd1, + 0x3b, 0x63, 0x33, 0xbb, 0x32, 0x7d, 0x65, 0xd1, 0xc9, 0xbd, 0x01, 0x19, 0xd7, 0x7d, 0xc8, 0x1c, + 0x1f, 0x33, 0x68, 0xd1, 0xbb, 0x32, 0xea, 0x7b, 0xd4, 0xd7, 0xe5, 0xce, 0x1f, 0xad, 0xcd, 0xf3, + 0x06, 0x9e, 0x77, 0xdd, 0x87, 0xe4, 0x03, 0xed, 0x43, 0xf6, 0x54, 0xd7, 0x6c, 0xf7, 0x9e, 0xae, + 0xb9, 0xdc, 0xaa, 0x57, 0x9f, 0x30, 0xf6, 0xa1, 0x87, 0xc7, 0x81, 0xaa, 0xf4, 0x36, 0x64, 0x7d, + 0x39, 0xda, 0x82, 0x8c, 0x31, 0x70, 0x75, 0xfb, 0x4c, 0x33, 0xa7, 0xfd, 0x5e, 0xee, 0x83, 0x36, + 0xde, 0x88, 0x33, 0x63, 0x1e, 0x32, 0xaa, 0xfa, 0x5e, 0xbb, 0xde, 0xdc, 0x6f, 0xb1, 0x6b, 0x79, + 0x28, 0x57, 0xb1, 0xba, 0x2b, 0x57, 0x55, 0xef, 0xf7, 0xa1, 0x8d, 0x1b, 0x71, 0x7a, 0x19, 0x48, + 0xd7, 0xaa, 0x6a, 0x55, 0x14, 0x88, 0x98, 0x9c, 0x5d, 0xdc, 0x6a, 0x78, 0x1a, 0xbb, 0x7b, 0x9f, + 0x3e, 0xae, 0x5c, 0xf8, 0xfd, 0xe3, 0xca, 0x85, 0x3f, 0x3f, 0xae, 0x08, 0x9f, 0x3f, 0xae, 0x08, + 0xff, 0x78, 0x5c, 0x11, 0xbe, 0x7f, 0x5e, 0x11, 0x3e, 0x3a, 0xaf, 0x08, 0xbf, 0x3a, 0xaf, 0x08, + 0xbf, 0x39, 0xaf, 0x08, 0x9f, 0x9c, 0x57, 0x84, 0x4f, 0xcf, 0x2b, 0xc2, 0x5f, 0xce, 0x2b, 0x17, + 0x3e, 0x3f, 0xaf, 0x08, 0x3f, 0xfa, 0xac, 0x72, 0xe1, 0x67, 0x9f, 0x55, 0x84, 0xf7, 0x67, 0xa9, + 0x4d, 0xfe, 0x15, 0x00, 0x00, 0xff, 0xff, 0xd7, 0x82, 0x70, 0x99, 0xac, 0x27, 0x00, 0x00, +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/agent/agent.pb_ffjson.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/agent/agent.pb_ffjson.go new file mode 100644 index 00000000..020edc99 --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/agent/agent.pb_ffjson.go @@ -0,0 +1,14735 @@ +// DO NOT EDIT! +// Code generated by ffjson +// source: agent/agent.pb.go +// DO NOT EDIT! + +package agent + +import ( + "bytes" + "encoding/base64" + "errors" + "fmt" + "github.com/mesos/mesos-go/api/v1/lib" + fflib "github.com/pquerna/ffjson/fflib/v1" + "reflect" +) + +func (mj *Call) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Call) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + if mj.GetMetrics != nil { + if true { + buf.WriteString(`"get_metrics":`) + + { + + err = mj.GetMetrics.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.SetLoggingLevel != nil { + if true { + buf.WriteString(`"set_logging_level":`) + + { + + err = mj.SetLoggingLevel.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.ListFiles != nil { + if true { + buf.WriteString(`"list_files":`) + + { + + err = mj.ListFiles.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.ReadFile != nil { + if true { + buf.WriteString(`"read_file":`) + + { + + err = mj.ReadFile.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.GetContainers != nil { + if true { + buf.WriteString(`"get_containers":`) + + { + + err = mj.GetContainers.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.LaunchNestedContainer != nil { + if true { + buf.WriteString(`"launch_nested_container":`) + + { + + err = mj.LaunchNestedContainer.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.WaitNestedContainer != nil { + if true { + buf.WriteString(`"wait_nested_container":`) + + { + + err = mj.WaitNestedContainer.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.KillNestedContainer != nil { + if true { + buf.WriteString(`"kill_nested_container":`) + + { + + err = mj.KillNestedContainer.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.RemoveNestedContainer != nil { + if true { + buf.WriteString(`"remove_nested_container":`) + + { + + err = mj.RemoveNestedContainer.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.LaunchNestedContainerSession != nil { + if true { + buf.WriteString(`"launch_nested_container_session":`) + + { + + err = mj.LaunchNestedContainerSession.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.AttachContainerInput != nil { + if true { + buf.WriteString(`"attach_container_input":`) + + { + + err = mj.AttachContainerInput.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.AttachContainerOutput != nil { + if true { + buf.WriteString(`"attach_container_output":`) + + { + + err = mj.AttachContainerOutput.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.LaunchContainer != nil { + if true { + buf.WriteString(`"launch_container":`) + + { + + err = mj.LaunchContainer.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.WaitContainer != nil { + if true { + buf.WriteString(`"wait_container":`) + + { + + err = mj.WaitContainer.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.KillContainer != nil { + if true { + buf.WriteString(`"kill_container":`) + + { + + err = mj.KillContainer.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.RemoveContainer != nil { + if true { + buf.WriteString(`"remove_container":`) + + { + + err = mj.RemoveContainer.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.AddResourceProviderConfig != nil { + if true { + buf.WriteString(`"add_resource_provider_config":`) + + { + + err = mj.AddResourceProviderConfig.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.UpdateResourceProviderConfig != nil { + if true { + buf.WriteString(`"update_resource_provider_config":`) + + { + + err = mj.UpdateResourceProviderConfig.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.RemoveResourceProviderConfig != nil { + if true { + buf.WriteString(`"remove_resource_provider_config":`) + + { + + err = mj.RemoveResourceProviderConfig.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.PruneImages != nil { + if true { + buf.WriteString(`"prune_images":`) + + { + + err = mj.PruneImages.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Callbase = iota + ffj_t_Callno_such_key + + ffj_t_Call_Type + + ffj_t_Call_GetMetrics + + ffj_t_Call_SetLoggingLevel + + ffj_t_Call_ListFiles + + ffj_t_Call_ReadFile + + ffj_t_Call_GetContainers + + ffj_t_Call_LaunchNestedContainer + + ffj_t_Call_WaitNestedContainer + + ffj_t_Call_KillNestedContainer + + ffj_t_Call_RemoveNestedContainer + + ffj_t_Call_LaunchNestedContainerSession + + ffj_t_Call_AttachContainerInput + + ffj_t_Call_AttachContainerOutput + + ffj_t_Call_LaunchContainer + + ffj_t_Call_WaitContainer + + ffj_t_Call_KillContainer + + ffj_t_Call_RemoveContainer + + ffj_t_Call_AddResourceProviderConfig + + ffj_t_Call_UpdateResourceProviderConfig + + ffj_t_Call_RemoveResourceProviderConfig + + ffj_t_Call_PruneImages +) + +var ffj_key_Call_Type = []byte("type") + +var ffj_key_Call_GetMetrics = []byte("get_metrics") + +var ffj_key_Call_SetLoggingLevel = []byte("set_logging_level") + +var ffj_key_Call_ListFiles = []byte("list_files") + +var ffj_key_Call_ReadFile = []byte("read_file") + +var ffj_key_Call_GetContainers = []byte("get_containers") + +var ffj_key_Call_LaunchNestedContainer = []byte("launch_nested_container") + +var ffj_key_Call_WaitNestedContainer = []byte("wait_nested_container") + +var ffj_key_Call_KillNestedContainer = []byte("kill_nested_container") + +var ffj_key_Call_RemoveNestedContainer = []byte("remove_nested_container") + +var ffj_key_Call_LaunchNestedContainerSession = []byte("launch_nested_container_session") + +var ffj_key_Call_AttachContainerInput = []byte("attach_container_input") + +var ffj_key_Call_AttachContainerOutput = []byte("attach_container_output") + +var ffj_key_Call_LaunchContainer = []byte("launch_container") + +var ffj_key_Call_WaitContainer = []byte("wait_container") + +var ffj_key_Call_KillContainer = []byte("kill_container") + +var ffj_key_Call_RemoveContainer = []byte("remove_container") + +var ffj_key_Call_AddResourceProviderConfig = []byte("add_resource_provider_config") + +var ffj_key_Call_UpdateResourceProviderConfig = []byte("update_resource_provider_config") + +var ffj_key_Call_RemoveResourceProviderConfig = []byte("remove_resource_provider_config") + +var ffj_key_Call_PruneImages = []byte("prune_images") + +func (uj *Call) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Call) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Callbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Callno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'a': + + if bytes.Equal(ffj_key_Call_AttachContainerInput, kn) { + currentKey = ffj_t_Call_AttachContainerInput + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Call_AttachContainerOutput, kn) { + currentKey = ffj_t_Call_AttachContainerOutput + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Call_AddResourceProviderConfig, kn) { + currentKey = ffj_t_Call_AddResourceProviderConfig + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'g': + + if bytes.Equal(ffj_key_Call_GetMetrics, kn) { + currentKey = ffj_t_Call_GetMetrics + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Call_GetContainers, kn) { + currentKey = ffj_t_Call_GetContainers + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'k': + + if bytes.Equal(ffj_key_Call_KillNestedContainer, kn) { + currentKey = ffj_t_Call_KillNestedContainer + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Call_KillContainer, kn) { + currentKey = ffj_t_Call_KillContainer + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'l': + + if bytes.Equal(ffj_key_Call_ListFiles, kn) { + currentKey = ffj_t_Call_ListFiles + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Call_LaunchNestedContainer, kn) { + currentKey = ffj_t_Call_LaunchNestedContainer + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Call_LaunchNestedContainerSession, kn) { + currentKey = ffj_t_Call_LaunchNestedContainerSession + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Call_LaunchContainer, kn) { + currentKey = ffj_t_Call_LaunchContainer + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_Call_PruneImages, kn) { + currentKey = ffj_t_Call_PruneImages + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_Call_ReadFile, kn) { + currentKey = ffj_t_Call_ReadFile + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Call_RemoveNestedContainer, kn) { + currentKey = ffj_t_Call_RemoveNestedContainer + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Call_RemoveContainer, kn) { + currentKey = ffj_t_Call_RemoveContainer + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Call_RemoveResourceProviderConfig, kn) { + currentKey = ffj_t_Call_RemoveResourceProviderConfig + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_Call_SetLoggingLevel, kn) { + currentKey = ffj_t_Call_SetLoggingLevel + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_Call_Type, kn) { + currentKey = ffj_t_Call_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'u': + + if bytes.Equal(ffj_key_Call_UpdateResourceProviderConfig, kn) { + currentKey = ffj_t_Call_UpdateResourceProviderConfig + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'w': + + if bytes.Equal(ffj_key_Call_WaitNestedContainer, kn) { + currentKey = ffj_t_Call_WaitNestedContainer + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Call_WaitContainer, kn) { + currentKey = ffj_t_Call_WaitContainer + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Call_PruneImages, kn) { + currentKey = ffj_t_Call_PruneImages + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Call_RemoveResourceProviderConfig, kn) { + currentKey = ffj_t_Call_RemoveResourceProviderConfig + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Call_UpdateResourceProviderConfig, kn) { + currentKey = ffj_t_Call_UpdateResourceProviderConfig + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Call_AddResourceProviderConfig, kn) { + currentKey = ffj_t_Call_AddResourceProviderConfig + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Call_RemoveContainer, kn) { + currentKey = ffj_t_Call_RemoveContainer + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Call_KillContainer, kn) { + currentKey = ffj_t_Call_KillContainer + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Call_WaitContainer, kn) { + currentKey = ffj_t_Call_WaitContainer + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Call_LaunchContainer, kn) { + currentKey = ffj_t_Call_LaunchContainer + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Call_AttachContainerOutput, kn) { + currentKey = ffj_t_Call_AttachContainerOutput + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Call_AttachContainerInput, kn) { + currentKey = ffj_t_Call_AttachContainerInput + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Call_LaunchNestedContainerSession, kn) { + currentKey = ffj_t_Call_LaunchNestedContainerSession + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Call_RemoveNestedContainer, kn) { + currentKey = ffj_t_Call_RemoveNestedContainer + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Call_KillNestedContainer, kn) { + currentKey = ffj_t_Call_KillNestedContainer + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Call_WaitNestedContainer, kn) { + currentKey = ffj_t_Call_WaitNestedContainer + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Call_LaunchNestedContainer, kn) { + currentKey = ffj_t_Call_LaunchNestedContainer + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Call_GetContainers, kn) { + currentKey = ffj_t_Call_GetContainers + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Call_ReadFile, kn) { + currentKey = ffj_t_Call_ReadFile + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Call_ListFiles, kn) { + currentKey = ffj_t_Call_ListFiles + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Call_SetLoggingLevel, kn) { + currentKey = ffj_t_Call_SetLoggingLevel + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Call_GetMetrics, kn) { + currentKey = ffj_t_Call_GetMetrics + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Call_Type, kn) { + currentKey = ffj_t_Call_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Callno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Call_Type: + goto handle_Type + + case ffj_t_Call_GetMetrics: + goto handle_GetMetrics + + case ffj_t_Call_SetLoggingLevel: + goto handle_SetLoggingLevel + + case ffj_t_Call_ListFiles: + goto handle_ListFiles + + case ffj_t_Call_ReadFile: + goto handle_ReadFile + + case ffj_t_Call_GetContainers: + goto handle_GetContainers + + case ffj_t_Call_LaunchNestedContainer: + goto handle_LaunchNestedContainer + + case ffj_t_Call_WaitNestedContainer: + goto handle_WaitNestedContainer + + case ffj_t_Call_KillNestedContainer: + goto handle_KillNestedContainer + + case ffj_t_Call_RemoveNestedContainer: + goto handle_RemoveNestedContainer + + case ffj_t_Call_LaunchNestedContainerSession: + goto handle_LaunchNestedContainerSession + + case ffj_t_Call_AttachContainerInput: + goto handle_AttachContainerInput + + case ffj_t_Call_AttachContainerOutput: + goto handle_AttachContainerOutput + + case ffj_t_Call_LaunchContainer: + goto handle_LaunchContainer + + case ffj_t_Call_WaitContainer: + goto handle_WaitContainer + + case ffj_t_Call_KillContainer: + goto handle_KillContainer + + case ffj_t_Call_RemoveContainer: + goto handle_RemoveContainer + + case ffj_t_Call_AddResourceProviderConfig: + goto handle_AddResourceProviderConfig + + case ffj_t_Call_UpdateResourceProviderConfig: + goto handle_UpdateResourceProviderConfig + + case ffj_t_Call_RemoveResourceProviderConfig: + goto handle_RemoveResourceProviderConfig + + case ffj_t_Call_PruneImages: + goto handle_PruneImages + + case ffj_t_Callno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=agent.Call_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_GetMetrics: + + /* handler: uj.GetMetrics type=agent.Call_GetMetrics kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.GetMetrics = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.GetMetrics == nil { + uj.GetMetrics = new(Call_GetMetrics) + } + + err = uj.GetMetrics.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_SetLoggingLevel: + + /* handler: uj.SetLoggingLevel type=agent.Call_SetLoggingLevel kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.SetLoggingLevel = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.SetLoggingLevel == nil { + uj.SetLoggingLevel = new(Call_SetLoggingLevel) + } + + err = uj.SetLoggingLevel.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ListFiles: + + /* handler: uj.ListFiles type=agent.Call_ListFiles kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.ListFiles = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.ListFiles == nil { + uj.ListFiles = new(Call_ListFiles) + } + + err = uj.ListFiles.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ReadFile: + + /* handler: uj.ReadFile type=agent.Call_ReadFile kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.ReadFile = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.ReadFile == nil { + uj.ReadFile = new(Call_ReadFile) + } + + err = uj.ReadFile.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_GetContainers: + + /* handler: uj.GetContainers type=agent.Call_GetContainers kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.GetContainers = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.GetContainers == nil { + uj.GetContainers = new(Call_GetContainers) + } + + err = uj.GetContainers.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_LaunchNestedContainer: + + /* handler: uj.LaunchNestedContainer type=agent.Call_LaunchNestedContainer kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.LaunchNestedContainer = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.LaunchNestedContainer == nil { + uj.LaunchNestedContainer = new(Call_LaunchNestedContainer) + } + + err = uj.LaunchNestedContainer.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_WaitNestedContainer: + + /* handler: uj.WaitNestedContainer type=agent.Call_WaitNestedContainer kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.WaitNestedContainer = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.WaitNestedContainer == nil { + uj.WaitNestedContainer = new(Call_WaitNestedContainer) + } + + err = uj.WaitNestedContainer.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_KillNestedContainer: + + /* handler: uj.KillNestedContainer type=agent.Call_KillNestedContainer kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.KillNestedContainer = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.KillNestedContainer == nil { + uj.KillNestedContainer = new(Call_KillNestedContainer) + } + + err = uj.KillNestedContainer.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_RemoveNestedContainer: + + /* handler: uj.RemoveNestedContainer type=agent.Call_RemoveNestedContainer kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.RemoveNestedContainer = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.RemoveNestedContainer == nil { + uj.RemoveNestedContainer = new(Call_RemoveNestedContainer) + } + + err = uj.RemoveNestedContainer.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_LaunchNestedContainerSession: + + /* handler: uj.LaunchNestedContainerSession type=agent.Call_LaunchNestedContainerSession kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.LaunchNestedContainerSession = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.LaunchNestedContainerSession == nil { + uj.LaunchNestedContainerSession = new(Call_LaunchNestedContainerSession) + } + + err = uj.LaunchNestedContainerSession.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_AttachContainerInput: + + /* handler: uj.AttachContainerInput type=agent.Call_AttachContainerInput kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.AttachContainerInput = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.AttachContainerInput == nil { + uj.AttachContainerInput = new(Call_AttachContainerInput) + } + + err = uj.AttachContainerInput.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_AttachContainerOutput: + + /* handler: uj.AttachContainerOutput type=agent.Call_AttachContainerOutput kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.AttachContainerOutput = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.AttachContainerOutput == nil { + uj.AttachContainerOutput = new(Call_AttachContainerOutput) + } + + err = uj.AttachContainerOutput.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_LaunchContainer: + + /* handler: uj.LaunchContainer type=agent.Call_LaunchContainer kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.LaunchContainer = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.LaunchContainer == nil { + uj.LaunchContainer = new(Call_LaunchContainer) + } + + err = uj.LaunchContainer.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_WaitContainer: + + /* handler: uj.WaitContainer type=agent.Call_WaitContainer kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.WaitContainer = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.WaitContainer == nil { + uj.WaitContainer = new(Call_WaitContainer) + } + + err = uj.WaitContainer.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_KillContainer: + + /* handler: uj.KillContainer type=agent.Call_KillContainer kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.KillContainer = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.KillContainer == nil { + uj.KillContainer = new(Call_KillContainer) + } + + err = uj.KillContainer.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_RemoveContainer: + + /* handler: uj.RemoveContainer type=agent.Call_RemoveContainer kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.RemoveContainer = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.RemoveContainer == nil { + uj.RemoveContainer = new(Call_RemoveContainer) + } + + err = uj.RemoveContainer.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_AddResourceProviderConfig: + + /* handler: uj.AddResourceProviderConfig type=agent.Call_AddResourceProviderConfig kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.AddResourceProviderConfig = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.AddResourceProviderConfig == nil { + uj.AddResourceProviderConfig = new(Call_AddResourceProviderConfig) + } + + err = uj.AddResourceProviderConfig.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_UpdateResourceProviderConfig: + + /* handler: uj.UpdateResourceProviderConfig type=agent.Call_UpdateResourceProviderConfig kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.UpdateResourceProviderConfig = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.UpdateResourceProviderConfig == nil { + uj.UpdateResourceProviderConfig = new(Call_UpdateResourceProviderConfig) + } + + err = uj.UpdateResourceProviderConfig.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_RemoveResourceProviderConfig: + + /* handler: uj.RemoveResourceProviderConfig type=agent.Call_RemoveResourceProviderConfig kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.RemoveResourceProviderConfig = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.RemoveResourceProviderConfig == nil { + uj.RemoveResourceProviderConfig = new(Call_RemoveResourceProviderConfig) + } + + err = uj.RemoveResourceProviderConfig.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_PruneImages: + + /* handler: uj.PruneImages type=agent.Call_PruneImages kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.PruneImages = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.PruneImages == nil { + uj.PruneImages = new(Call_PruneImages) + } + + err = uj.PruneImages.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Call_AddResourceProviderConfig) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Call_AddResourceProviderConfig) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"info":`) + + { + + err = mj.Info.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Call_AddResourceProviderConfigbase = iota + ffj_t_Call_AddResourceProviderConfigno_such_key + + ffj_t_Call_AddResourceProviderConfig_Info +) + +var ffj_key_Call_AddResourceProviderConfig_Info = []byte("info") + +func (uj *Call_AddResourceProviderConfig) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Call_AddResourceProviderConfig) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Call_AddResourceProviderConfigbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Call_AddResourceProviderConfigno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'i': + + if bytes.Equal(ffj_key_Call_AddResourceProviderConfig_Info, kn) { + currentKey = ffj_t_Call_AddResourceProviderConfig_Info + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Call_AddResourceProviderConfig_Info, kn) { + currentKey = ffj_t_Call_AddResourceProviderConfig_Info + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Call_AddResourceProviderConfigno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Call_AddResourceProviderConfig_Info: + goto handle_Info + + case ffj_t_Call_AddResourceProviderConfigno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Info: + + /* handler: uj.Info type=mesos.ResourceProviderInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.Info.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Call_AttachContainerInput) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Call_AttachContainerInput) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + if mj.ContainerID != nil { + if true { + buf.WriteString(`"container_id":`) + + { + + err = mj.ContainerID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.ProcessIO != nil { + if true { + buf.WriteString(`"process_io":`) + + { + + err = mj.ProcessIO.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Call_AttachContainerInputbase = iota + ffj_t_Call_AttachContainerInputno_such_key + + ffj_t_Call_AttachContainerInput_Type + + ffj_t_Call_AttachContainerInput_ContainerID + + ffj_t_Call_AttachContainerInput_ProcessIO +) + +var ffj_key_Call_AttachContainerInput_Type = []byte("type") + +var ffj_key_Call_AttachContainerInput_ContainerID = []byte("container_id") + +var ffj_key_Call_AttachContainerInput_ProcessIO = []byte("process_io") + +func (uj *Call_AttachContainerInput) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Call_AttachContainerInput) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Call_AttachContainerInputbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Call_AttachContainerInputno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_Call_AttachContainerInput_ContainerID, kn) { + currentKey = ffj_t_Call_AttachContainerInput_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_Call_AttachContainerInput_ProcessIO, kn) { + currentKey = ffj_t_Call_AttachContainerInput_ProcessIO + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_Call_AttachContainerInput_Type, kn) { + currentKey = ffj_t_Call_AttachContainerInput_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Call_AttachContainerInput_ProcessIO, kn) { + currentKey = ffj_t_Call_AttachContainerInput_ProcessIO + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Call_AttachContainerInput_ContainerID, kn) { + currentKey = ffj_t_Call_AttachContainerInput_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Call_AttachContainerInput_Type, kn) { + currentKey = ffj_t_Call_AttachContainerInput_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Call_AttachContainerInputno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Call_AttachContainerInput_Type: + goto handle_Type + + case ffj_t_Call_AttachContainerInput_ContainerID: + goto handle_ContainerID + + case ffj_t_Call_AttachContainerInput_ProcessIO: + goto handle_ProcessIO + + case ffj_t_Call_AttachContainerInputno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=agent.Call_AttachContainerInput_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ContainerID: + + /* handler: uj.ContainerID type=mesos.ContainerID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.ContainerID = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.ContainerID == nil { + uj.ContainerID = new(mesos.ContainerID) + } + + err = uj.ContainerID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ProcessIO: + + /* handler: uj.ProcessIO type=agent.ProcessIO kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.ProcessIO = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.ProcessIO == nil { + uj.ProcessIO = new(ProcessIO) + } + + err = uj.ProcessIO.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Call_AttachContainerOutput) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Call_AttachContainerOutput) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"container_id":`) + + { + + err = mj.ContainerID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Call_AttachContainerOutputbase = iota + ffj_t_Call_AttachContainerOutputno_such_key + + ffj_t_Call_AttachContainerOutput_ContainerID +) + +var ffj_key_Call_AttachContainerOutput_ContainerID = []byte("container_id") + +func (uj *Call_AttachContainerOutput) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Call_AttachContainerOutput) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Call_AttachContainerOutputbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Call_AttachContainerOutputno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_Call_AttachContainerOutput_ContainerID, kn) { + currentKey = ffj_t_Call_AttachContainerOutput_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_Call_AttachContainerOutput_ContainerID, kn) { + currentKey = ffj_t_Call_AttachContainerOutput_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Call_AttachContainerOutputno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Call_AttachContainerOutput_ContainerID: + goto handle_ContainerID + + case ffj_t_Call_AttachContainerOutputno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ContainerID: + + /* handler: uj.ContainerID type=mesos.ContainerID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.ContainerID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Call_GetContainers) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Call_GetContainers) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.ShowNested != nil { + if true { + if *mj.ShowNested { + buf.WriteString(`"show_nested":true`) + } else { + buf.WriteString(`"show_nested":false`) + } + buf.WriteByte(',') + } + } + if mj.ShowStandalone != nil { + if true { + if *mj.ShowStandalone { + buf.WriteString(`"show_standalone":true`) + } else { + buf.WriteString(`"show_standalone":false`) + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Call_GetContainersbase = iota + ffj_t_Call_GetContainersno_such_key + + ffj_t_Call_GetContainers_ShowNested + + ffj_t_Call_GetContainers_ShowStandalone +) + +var ffj_key_Call_GetContainers_ShowNested = []byte("show_nested") + +var ffj_key_Call_GetContainers_ShowStandalone = []byte("show_standalone") + +func (uj *Call_GetContainers) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Call_GetContainers) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Call_GetContainersbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Call_GetContainersno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 's': + + if bytes.Equal(ffj_key_Call_GetContainers_ShowNested, kn) { + currentKey = ffj_t_Call_GetContainers_ShowNested + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Call_GetContainers_ShowStandalone, kn) { + currentKey = ffj_t_Call_GetContainers_ShowStandalone + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Call_GetContainers_ShowStandalone, kn) { + currentKey = ffj_t_Call_GetContainers_ShowStandalone + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Call_GetContainers_ShowNested, kn) { + currentKey = ffj_t_Call_GetContainers_ShowNested + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Call_GetContainersno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Call_GetContainers_ShowNested: + goto handle_ShowNested + + case ffj_t_Call_GetContainers_ShowStandalone: + goto handle_ShowStandalone + + case ffj_t_Call_GetContainersno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ShowNested: + + /* handler: uj.ShowNested type=bool kind=bool quoted=false*/ + + { + if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) + } + } + + { + if tok == fflib.FFTok_null { + + uj.ShowNested = nil + + } else { + tmpb := fs.Output.Bytes() + + var tval bool + + if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { + + tval = true + + } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { + + tval = false + + } else { + err = errors.New("unexpected bytes for true/false value") + return fs.WrapErr(err) + } + + uj.ShowNested = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ShowStandalone: + + /* handler: uj.ShowStandalone type=bool kind=bool quoted=false*/ + + { + if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) + } + } + + { + if tok == fflib.FFTok_null { + + uj.ShowStandalone = nil + + } else { + tmpb := fs.Output.Bytes() + + var tval bool + + if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { + + tval = true + + } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { + + tval = false + + } else { + err = errors.New("unexpected bytes for true/false value") + return fs.WrapErr(err) + } + + uj.ShowStandalone = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Call_GetMetrics) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Call_GetMetrics) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Timeout != nil { + if true { + buf.WriteString(`"timeout":`) + + { + + err = mj.Timeout.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Call_GetMetricsbase = iota + ffj_t_Call_GetMetricsno_such_key + + ffj_t_Call_GetMetrics_Timeout +) + +var ffj_key_Call_GetMetrics_Timeout = []byte("timeout") + +func (uj *Call_GetMetrics) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Call_GetMetrics) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Call_GetMetricsbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Call_GetMetricsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 't': + + if bytes.Equal(ffj_key_Call_GetMetrics_Timeout, kn) { + currentKey = ffj_t_Call_GetMetrics_Timeout + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Call_GetMetrics_Timeout, kn) { + currentKey = ffj_t_Call_GetMetrics_Timeout + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Call_GetMetricsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Call_GetMetrics_Timeout: + goto handle_Timeout + + case ffj_t_Call_GetMetricsno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Timeout: + + /* handler: uj.Timeout type=mesos.DurationInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Timeout = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Timeout == nil { + uj.Timeout = new(mesos.DurationInfo) + } + + err = uj.Timeout.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Call_KillContainer) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Call_KillContainer) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "container_id":`) + + { + + err = mj.ContainerID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + if mj.Signal != nil { + if true { + buf.WriteString(`"signal":`) + fflib.FormatBits2(buf, uint64(*mj.Signal), 10, *mj.Signal < 0) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Call_KillContainerbase = iota + ffj_t_Call_KillContainerno_such_key + + ffj_t_Call_KillContainer_ContainerID + + ffj_t_Call_KillContainer_Signal +) + +var ffj_key_Call_KillContainer_ContainerID = []byte("container_id") + +var ffj_key_Call_KillContainer_Signal = []byte("signal") + +func (uj *Call_KillContainer) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Call_KillContainer) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Call_KillContainerbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Call_KillContainerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_Call_KillContainer_ContainerID, kn) { + currentKey = ffj_t_Call_KillContainer_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_Call_KillContainer_Signal, kn) { + currentKey = ffj_t_Call_KillContainer_Signal + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Call_KillContainer_Signal, kn) { + currentKey = ffj_t_Call_KillContainer_Signal + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Call_KillContainer_ContainerID, kn) { + currentKey = ffj_t_Call_KillContainer_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Call_KillContainerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Call_KillContainer_ContainerID: + goto handle_ContainerID + + case ffj_t_Call_KillContainer_Signal: + goto handle_Signal + + case ffj_t_Call_KillContainerno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ContainerID: + + /* handler: uj.ContainerID type=mesos.ContainerID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.ContainerID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Signal: + + /* handler: uj.Signal type=int32 kind=int32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Signal = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int32(tval) + uj.Signal = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Call_KillNestedContainer) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Call_KillNestedContainer) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "container_id":`) + + { + + err = mj.ContainerID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + if mj.Signal != nil { + if true { + buf.WriteString(`"signal":`) + fflib.FormatBits2(buf, uint64(*mj.Signal), 10, *mj.Signal < 0) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Call_KillNestedContainerbase = iota + ffj_t_Call_KillNestedContainerno_such_key + + ffj_t_Call_KillNestedContainer_ContainerID + + ffj_t_Call_KillNestedContainer_Signal +) + +var ffj_key_Call_KillNestedContainer_ContainerID = []byte("container_id") + +var ffj_key_Call_KillNestedContainer_Signal = []byte("signal") + +func (uj *Call_KillNestedContainer) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Call_KillNestedContainer) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Call_KillNestedContainerbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Call_KillNestedContainerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_Call_KillNestedContainer_ContainerID, kn) { + currentKey = ffj_t_Call_KillNestedContainer_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_Call_KillNestedContainer_Signal, kn) { + currentKey = ffj_t_Call_KillNestedContainer_Signal + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Call_KillNestedContainer_Signal, kn) { + currentKey = ffj_t_Call_KillNestedContainer_Signal + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Call_KillNestedContainer_ContainerID, kn) { + currentKey = ffj_t_Call_KillNestedContainer_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Call_KillNestedContainerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Call_KillNestedContainer_ContainerID: + goto handle_ContainerID + + case ffj_t_Call_KillNestedContainer_Signal: + goto handle_Signal + + case ffj_t_Call_KillNestedContainerno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ContainerID: + + /* handler: uj.ContainerID type=mesos.ContainerID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.ContainerID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Signal: + + /* handler: uj.Signal type=int32 kind=int32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Signal = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int32(tval) + uj.Signal = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Call_LaunchContainer) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Call_LaunchContainer) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "container_id":`) + + { + + err = mj.ContainerID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + if mj.Command != nil { + if true { + buf.WriteString(`"command":`) + + { + + err = mj.Command.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"resources":`) + if mj.Resources != nil { + buf.WriteString(`[`) + for i, v := range mj.Resources { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.Container != nil { + if true { + buf.WriteString(`"container":`) + + { + + err = mj.Container.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Call_LaunchContainerbase = iota + ffj_t_Call_LaunchContainerno_such_key + + ffj_t_Call_LaunchContainer_ContainerID + + ffj_t_Call_LaunchContainer_Command + + ffj_t_Call_LaunchContainer_Resources + + ffj_t_Call_LaunchContainer_Container +) + +var ffj_key_Call_LaunchContainer_ContainerID = []byte("container_id") + +var ffj_key_Call_LaunchContainer_Command = []byte("command") + +var ffj_key_Call_LaunchContainer_Resources = []byte("resources") + +var ffj_key_Call_LaunchContainer_Container = []byte("container") + +func (uj *Call_LaunchContainer) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Call_LaunchContainer) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Call_LaunchContainerbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Call_LaunchContainerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_Call_LaunchContainer_ContainerID, kn) { + currentKey = ffj_t_Call_LaunchContainer_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Call_LaunchContainer_Command, kn) { + currentKey = ffj_t_Call_LaunchContainer_Command + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Call_LaunchContainer_Container, kn) { + currentKey = ffj_t_Call_LaunchContainer_Container + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_Call_LaunchContainer_Resources, kn) { + currentKey = ffj_t_Call_LaunchContainer_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Call_LaunchContainer_Container, kn) { + currentKey = ffj_t_Call_LaunchContainer_Container + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Call_LaunchContainer_Resources, kn) { + currentKey = ffj_t_Call_LaunchContainer_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Call_LaunchContainer_Command, kn) { + currentKey = ffj_t_Call_LaunchContainer_Command + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Call_LaunchContainer_ContainerID, kn) { + currentKey = ffj_t_Call_LaunchContainer_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Call_LaunchContainerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Call_LaunchContainer_ContainerID: + goto handle_ContainerID + + case ffj_t_Call_LaunchContainer_Command: + goto handle_Command + + case ffj_t_Call_LaunchContainer_Resources: + goto handle_Resources + + case ffj_t_Call_LaunchContainer_Container: + goto handle_Container + + case ffj_t_Call_LaunchContainerno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ContainerID: + + /* handler: uj.ContainerID type=mesos.ContainerID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.ContainerID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Command: + + /* handler: uj.Command type=mesos.CommandInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Command = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Command == nil { + uj.Command = new(mesos.CommandInfo) + } + + err = uj.Command.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Resources: + + /* handler: uj.Resources type=[]mesos.Resource kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Resources = nil + } else { + + uj.Resources = []mesos.Resource{} + + wantVal := true + + for { + + var tmp_uj__Resources mesos.Resource + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Resources type=mesos.Resource kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Resources.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Resources = append(uj.Resources, tmp_uj__Resources) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Container: + + /* handler: uj.Container type=mesos.ContainerInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Container = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Container == nil { + uj.Container = new(mesos.ContainerInfo) + } + + err = uj.Container.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Call_LaunchNestedContainer) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Call_LaunchNestedContainer) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "container_id":`) + + { + + err = mj.ContainerID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + if mj.Command != nil { + if true { + buf.WriteString(`"command":`) + + { + + err = mj.Command.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Container != nil { + if true { + buf.WriteString(`"container":`) + + { + + err = mj.Container.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Call_LaunchNestedContainerbase = iota + ffj_t_Call_LaunchNestedContainerno_such_key + + ffj_t_Call_LaunchNestedContainer_ContainerID + + ffj_t_Call_LaunchNestedContainer_Command + + ffj_t_Call_LaunchNestedContainer_Container +) + +var ffj_key_Call_LaunchNestedContainer_ContainerID = []byte("container_id") + +var ffj_key_Call_LaunchNestedContainer_Command = []byte("command") + +var ffj_key_Call_LaunchNestedContainer_Container = []byte("container") + +func (uj *Call_LaunchNestedContainer) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Call_LaunchNestedContainer) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Call_LaunchNestedContainerbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Call_LaunchNestedContainerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_Call_LaunchNestedContainer_ContainerID, kn) { + currentKey = ffj_t_Call_LaunchNestedContainer_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Call_LaunchNestedContainer_Command, kn) { + currentKey = ffj_t_Call_LaunchNestedContainer_Command + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Call_LaunchNestedContainer_Container, kn) { + currentKey = ffj_t_Call_LaunchNestedContainer_Container + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Call_LaunchNestedContainer_Container, kn) { + currentKey = ffj_t_Call_LaunchNestedContainer_Container + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Call_LaunchNestedContainer_Command, kn) { + currentKey = ffj_t_Call_LaunchNestedContainer_Command + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Call_LaunchNestedContainer_ContainerID, kn) { + currentKey = ffj_t_Call_LaunchNestedContainer_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Call_LaunchNestedContainerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Call_LaunchNestedContainer_ContainerID: + goto handle_ContainerID + + case ffj_t_Call_LaunchNestedContainer_Command: + goto handle_Command + + case ffj_t_Call_LaunchNestedContainer_Container: + goto handle_Container + + case ffj_t_Call_LaunchNestedContainerno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ContainerID: + + /* handler: uj.ContainerID type=mesos.ContainerID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.ContainerID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Command: + + /* handler: uj.Command type=mesos.CommandInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Command = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Command == nil { + uj.Command = new(mesos.CommandInfo) + } + + err = uj.Command.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Container: + + /* handler: uj.Container type=mesos.ContainerInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Container = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Container == nil { + uj.Container = new(mesos.ContainerInfo) + } + + err = uj.Container.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Call_LaunchNestedContainerSession) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Call_LaunchNestedContainerSession) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "container_id":`) + + { + + err = mj.ContainerID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + if mj.Command != nil { + if true { + buf.WriteString(`"command":`) + + { + + err = mj.Command.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Container != nil { + if true { + buf.WriteString(`"container":`) + + { + + err = mj.Container.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Call_LaunchNestedContainerSessionbase = iota + ffj_t_Call_LaunchNestedContainerSessionno_such_key + + ffj_t_Call_LaunchNestedContainerSession_ContainerID + + ffj_t_Call_LaunchNestedContainerSession_Command + + ffj_t_Call_LaunchNestedContainerSession_Container +) + +var ffj_key_Call_LaunchNestedContainerSession_ContainerID = []byte("container_id") + +var ffj_key_Call_LaunchNestedContainerSession_Command = []byte("command") + +var ffj_key_Call_LaunchNestedContainerSession_Container = []byte("container") + +func (uj *Call_LaunchNestedContainerSession) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Call_LaunchNestedContainerSession) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Call_LaunchNestedContainerSessionbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Call_LaunchNestedContainerSessionno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_Call_LaunchNestedContainerSession_ContainerID, kn) { + currentKey = ffj_t_Call_LaunchNestedContainerSession_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Call_LaunchNestedContainerSession_Command, kn) { + currentKey = ffj_t_Call_LaunchNestedContainerSession_Command + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Call_LaunchNestedContainerSession_Container, kn) { + currentKey = ffj_t_Call_LaunchNestedContainerSession_Container + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Call_LaunchNestedContainerSession_Container, kn) { + currentKey = ffj_t_Call_LaunchNestedContainerSession_Container + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Call_LaunchNestedContainerSession_Command, kn) { + currentKey = ffj_t_Call_LaunchNestedContainerSession_Command + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Call_LaunchNestedContainerSession_ContainerID, kn) { + currentKey = ffj_t_Call_LaunchNestedContainerSession_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Call_LaunchNestedContainerSessionno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Call_LaunchNestedContainerSession_ContainerID: + goto handle_ContainerID + + case ffj_t_Call_LaunchNestedContainerSession_Command: + goto handle_Command + + case ffj_t_Call_LaunchNestedContainerSession_Container: + goto handle_Container + + case ffj_t_Call_LaunchNestedContainerSessionno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ContainerID: + + /* handler: uj.ContainerID type=mesos.ContainerID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.ContainerID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Command: + + /* handler: uj.Command type=mesos.CommandInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Command = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Command == nil { + uj.Command = new(mesos.CommandInfo) + } + + err = uj.Command.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Container: + + /* handler: uj.Container type=mesos.ContainerInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Container = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Container == nil { + uj.Container = new(mesos.ContainerInfo) + } + + err = uj.Container.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Call_ListFiles) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Call_ListFiles) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"path":`) + fflib.WriteJsonString(buf, string(mj.Path)) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Call_ListFilesbase = iota + ffj_t_Call_ListFilesno_such_key + + ffj_t_Call_ListFiles_Path +) + +var ffj_key_Call_ListFiles_Path = []byte("path") + +func (uj *Call_ListFiles) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Call_ListFiles) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Call_ListFilesbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Call_ListFilesno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'p': + + if bytes.Equal(ffj_key_Call_ListFiles_Path, kn) { + currentKey = ffj_t_Call_ListFiles_Path + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Call_ListFiles_Path, kn) { + currentKey = ffj_t_Call_ListFiles_Path + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Call_ListFilesno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Call_ListFiles_Path: + goto handle_Path + + case ffj_t_Call_ListFilesno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Path: + + /* handler: uj.Path type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Path = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Call_PruneImages) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Call_PruneImages) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"excluded_images":`) + if mj.ExcludedImages != nil { + buf.WriteString(`[`) + for i, v := range mj.ExcludedImages { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Call_PruneImagesbase = iota + ffj_t_Call_PruneImagesno_such_key + + ffj_t_Call_PruneImages_ExcludedImages +) + +var ffj_key_Call_PruneImages_ExcludedImages = []byte("excluded_images") + +func (uj *Call_PruneImages) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Call_PruneImages) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Call_PruneImagesbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Call_PruneImagesno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'e': + + if bytes.Equal(ffj_key_Call_PruneImages_ExcludedImages, kn) { + currentKey = ffj_t_Call_PruneImages_ExcludedImages + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Call_PruneImages_ExcludedImages, kn) { + currentKey = ffj_t_Call_PruneImages_ExcludedImages + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Call_PruneImagesno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Call_PruneImages_ExcludedImages: + goto handle_ExcludedImages + + case ffj_t_Call_PruneImagesno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ExcludedImages: + + /* handler: uj.ExcludedImages type=[]mesos.Image kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.ExcludedImages = nil + } else { + + uj.ExcludedImages = []mesos.Image{} + + wantVal := true + + for { + + var tmp_uj__ExcludedImages mesos.Image + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__ExcludedImages type=mesos.Image kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__ExcludedImages.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.ExcludedImages = append(uj.ExcludedImages, tmp_uj__ExcludedImages) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Call_ReadFile) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Call_ReadFile) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "path":`) + fflib.WriteJsonString(buf, string(mj.Path)) + buf.WriteString(`,"offset":`) + fflib.FormatBits2(buf, uint64(mj.Offset), 10, false) + buf.WriteByte(',') + if mj.Length != nil { + if true { + buf.WriteString(`"length":`) + fflib.FormatBits2(buf, uint64(*mj.Length), 10, false) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Call_ReadFilebase = iota + ffj_t_Call_ReadFileno_such_key + + ffj_t_Call_ReadFile_Path + + ffj_t_Call_ReadFile_Offset + + ffj_t_Call_ReadFile_Length +) + +var ffj_key_Call_ReadFile_Path = []byte("path") + +var ffj_key_Call_ReadFile_Offset = []byte("offset") + +var ffj_key_Call_ReadFile_Length = []byte("length") + +func (uj *Call_ReadFile) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Call_ReadFile) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Call_ReadFilebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Call_ReadFileno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'l': + + if bytes.Equal(ffj_key_Call_ReadFile_Length, kn) { + currentKey = ffj_t_Call_ReadFile_Length + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'o': + + if bytes.Equal(ffj_key_Call_ReadFile_Offset, kn) { + currentKey = ffj_t_Call_ReadFile_Offset + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_Call_ReadFile_Path, kn) { + currentKey = ffj_t_Call_ReadFile_Path + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Call_ReadFile_Length, kn) { + currentKey = ffj_t_Call_ReadFile_Length + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Call_ReadFile_Offset, kn) { + currentKey = ffj_t_Call_ReadFile_Offset + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Call_ReadFile_Path, kn) { + currentKey = ffj_t_Call_ReadFile_Path + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Call_ReadFileno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Call_ReadFile_Path: + goto handle_Path + + case ffj_t_Call_ReadFile_Offset: + goto handle_Offset + + case ffj_t_Call_ReadFile_Length: + goto handle_Length + + case ffj_t_Call_ReadFileno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Path: + + /* handler: uj.Path type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Path = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Offset: + + /* handler: uj.Offset type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + uj.Offset = uint64(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Length: + + /* handler: uj.Length type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Length = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.Length = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Call_RemoveContainer) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Call_RemoveContainer) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"container_id":`) + + { + + err = mj.ContainerID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Call_RemoveContainerbase = iota + ffj_t_Call_RemoveContainerno_such_key + + ffj_t_Call_RemoveContainer_ContainerID +) + +var ffj_key_Call_RemoveContainer_ContainerID = []byte("container_id") + +func (uj *Call_RemoveContainer) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Call_RemoveContainer) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Call_RemoveContainerbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Call_RemoveContainerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_Call_RemoveContainer_ContainerID, kn) { + currentKey = ffj_t_Call_RemoveContainer_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_Call_RemoveContainer_ContainerID, kn) { + currentKey = ffj_t_Call_RemoveContainer_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Call_RemoveContainerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Call_RemoveContainer_ContainerID: + goto handle_ContainerID + + case ffj_t_Call_RemoveContainerno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ContainerID: + + /* handler: uj.ContainerID type=mesos.ContainerID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.ContainerID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Call_RemoveNestedContainer) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Call_RemoveNestedContainer) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"container_id":`) + + { + + err = mj.ContainerID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Call_RemoveNestedContainerbase = iota + ffj_t_Call_RemoveNestedContainerno_such_key + + ffj_t_Call_RemoveNestedContainer_ContainerID +) + +var ffj_key_Call_RemoveNestedContainer_ContainerID = []byte("container_id") + +func (uj *Call_RemoveNestedContainer) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Call_RemoveNestedContainer) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Call_RemoveNestedContainerbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Call_RemoveNestedContainerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_Call_RemoveNestedContainer_ContainerID, kn) { + currentKey = ffj_t_Call_RemoveNestedContainer_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_Call_RemoveNestedContainer_ContainerID, kn) { + currentKey = ffj_t_Call_RemoveNestedContainer_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Call_RemoveNestedContainerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Call_RemoveNestedContainer_ContainerID: + goto handle_ContainerID + + case ffj_t_Call_RemoveNestedContainerno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ContainerID: + + /* handler: uj.ContainerID type=mesos.ContainerID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.ContainerID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Call_RemoveResourceProviderConfig) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Call_RemoveResourceProviderConfig) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"type":`) + fflib.WriteJsonString(buf, string(mj.Type)) + buf.WriteString(`,"name":`) + fflib.WriteJsonString(buf, string(mj.Name)) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Call_RemoveResourceProviderConfigbase = iota + ffj_t_Call_RemoveResourceProviderConfigno_such_key + + ffj_t_Call_RemoveResourceProviderConfig_Type + + ffj_t_Call_RemoveResourceProviderConfig_Name +) + +var ffj_key_Call_RemoveResourceProviderConfig_Type = []byte("type") + +var ffj_key_Call_RemoveResourceProviderConfig_Name = []byte("name") + +func (uj *Call_RemoveResourceProviderConfig) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Call_RemoveResourceProviderConfig) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Call_RemoveResourceProviderConfigbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Call_RemoveResourceProviderConfigno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'n': + + if bytes.Equal(ffj_key_Call_RemoveResourceProviderConfig_Name, kn) { + currentKey = ffj_t_Call_RemoveResourceProviderConfig_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_Call_RemoveResourceProviderConfig_Type, kn) { + currentKey = ffj_t_Call_RemoveResourceProviderConfig_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Call_RemoveResourceProviderConfig_Name, kn) { + currentKey = ffj_t_Call_RemoveResourceProviderConfig_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Call_RemoveResourceProviderConfig_Type, kn) { + currentKey = ffj_t_Call_RemoveResourceProviderConfig_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Call_RemoveResourceProviderConfigno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Call_RemoveResourceProviderConfig_Type: + goto handle_Type + + case ffj_t_Call_RemoveResourceProviderConfig_Name: + goto handle_Name + + case ffj_t_Call_RemoveResourceProviderConfigno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Type = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Name: + + /* handler: uj.Name type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Name = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Call_SetLoggingLevel) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Call_SetLoggingLevel) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"level":`) + fflib.FormatBits2(buf, uint64(mj.Level), 10, false) + buf.WriteString(`,"duration":`) + + { + + err = mj.Duration.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Call_SetLoggingLevelbase = iota + ffj_t_Call_SetLoggingLevelno_such_key + + ffj_t_Call_SetLoggingLevel_Level + + ffj_t_Call_SetLoggingLevel_Duration +) + +var ffj_key_Call_SetLoggingLevel_Level = []byte("level") + +var ffj_key_Call_SetLoggingLevel_Duration = []byte("duration") + +func (uj *Call_SetLoggingLevel) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Call_SetLoggingLevel) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Call_SetLoggingLevelbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Call_SetLoggingLevelno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'd': + + if bytes.Equal(ffj_key_Call_SetLoggingLevel_Duration, kn) { + currentKey = ffj_t_Call_SetLoggingLevel_Duration + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'l': + + if bytes.Equal(ffj_key_Call_SetLoggingLevel_Level, kn) { + currentKey = ffj_t_Call_SetLoggingLevel_Level + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Call_SetLoggingLevel_Duration, kn) { + currentKey = ffj_t_Call_SetLoggingLevel_Duration + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Call_SetLoggingLevel_Level, kn) { + currentKey = ffj_t_Call_SetLoggingLevel_Level + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Call_SetLoggingLevelno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Call_SetLoggingLevel_Level: + goto handle_Level + + case ffj_t_Call_SetLoggingLevel_Duration: + goto handle_Duration + + case ffj_t_Call_SetLoggingLevelno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Level: + + /* handler: uj.Level type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + uj.Level = uint32(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Duration: + + /* handler: uj.Duration type=mesos.DurationInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.Duration.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Call_UpdateResourceProviderConfig) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Call_UpdateResourceProviderConfig) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"info":`) + + { + + err = mj.Info.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Call_UpdateResourceProviderConfigbase = iota + ffj_t_Call_UpdateResourceProviderConfigno_such_key + + ffj_t_Call_UpdateResourceProviderConfig_Info +) + +var ffj_key_Call_UpdateResourceProviderConfig_Info = []byte("info") + +func (uj *Call_UpdateResourceProviderConfig) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Call_UpdateResourceProviderConfig) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Call_UpdateResourceProviderConfigbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Call_UpdateResourceProviderConfigno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'i': + + if bytes.Equal(ffj_key_Call_UpdateResourceProviderConfig_Info, kn) { + currentKey = ffj_t_Call_UpdateResourceProviderConfig_Info + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Call_UpdateResourceProviderConfig_Info, kn) { + currentKey = ffj_t_Call_UpdateResourceProviderConfig_Info + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Call_UpdateResourceProviderConfigno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Call_UpdateResourceProviderConfig_Info: + goto handle_Info + + case ffj_t_Call_UpdateResourceProviderConfigno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Info: + + /* handler: uj.Info type=mesos.ResourceProviderInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.Info.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Call_WaitContainer) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Call_WaitContainer) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"container_id":`) + + { + + err = mj.ContainerID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Call_WaitContainerbase = iota + ffj_t_Call_WaitContainerno_such_key + + ffj_t_Call_WaitContainer_ContainerID +) + +var ffj_key_Call_WaitContainer_ContainerID = []byte("container_id") + +func (uj *Call_WaitContainer) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Call_WaitContainer) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Call_WaitContainerbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Call_WaitContainerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_Call_WaitContainer_ContainerID, kn) { + currentKey = ffj_t_Call_WaitContainer_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_Call_WaitContainer_ContainerID, kn) { + currentKey = ffj_t_Call_WaitContainer_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Call_WaitContainerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Call_WaitContainer_ContainerID: + goto handle_ContainerID + + case ffj_t_Call_WaitContainerno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ContainerID: + + /* handler: uj.ContainerID type=mesos.ContainerID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.ContainerID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Call_WaitNestedContainer) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Call_WaitNestedContainer) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"container_id":`) + + { + + err = mj.ContainerID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Call_WaitNestedContainerbase = iota + ffj_t_Call_WaitNestedContainerno_such_key + + ffj_t_Call_WaitNestedContainer_ContainerID +) + +var ffj_key_Call_WaitNestedContainer_ContainerID = []byte("container_id") + +func (uj *Call_WaitNestedContainer) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Call_WaitNestedContainer) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Call_WaitNestedContainerbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Call_WaitNestedContainerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_Call_WaitNestedContainer_ContainerID, kn) { + currentKey = ffj_t_Call_WaitNestedContainer_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_Call_WaitNestedContainer_ContainerID, kn) { + currentKey = ffj_t_Call_WaitNestedContainer_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Call_WaitNestedContainerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Call_WaitNestedContainer_ContainerID: + goto handle_ContainerID + + case ffj_t_Call_WaitNestedContainerno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ContainerID: + + /* handler: uj.ContainerID type=mesos.ContainerID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.ContainerID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *ProcessIO) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *ProcessIO) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + if mj.Data != nil { + if true { + buf.WriteString(`"data":`) + + { + + err = mj.Data.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Control != nil { + if true { + buf.WriteString(`"control":`) + + { + + err = mj.Control.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_ProcessIObase = iota + ffj_t_ProcessIOno_such_key + + ffj_t_ProcessIO_Type + + ffj_t_ProcessIO_Data + + ffj_t_ProcessIO_Control +) + +var ffj_key_ProcessIO_Type = []byte("type") + +var ffj_key_ProcessIO_Data = []byte("data") + +var ffj_key_ProcessIO_Control = []byte("control") + +func (uj *ProcessIO) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *ProcessIO) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_ProcessIObase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_ProcessIOno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_ProcessIO_Control, kn) { + currentKey = ffj_t_ProcessIO_Control + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'd': + + if bytes.Equal(ffj_key_ProcessIO_Data, kn) { + currentKey = ffj_t_ProcessIO_Data + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_ProcessIO_Type, kn) { + currentKey = ffj_t_ProcessIO_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_ProcessIO_Control, kn) { + currentKey = ffj_t_ProcessIO_Control + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_ProcessIO_Data, kn) { + currentKey = ffj_t_ProcessIO_Data + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_ProcessIO_Type, kn) { + currentKey = ffj_t_ProcessIO_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_ProcessIOno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_ProcessIO_Type: + goto handle_Type + + case ffj_t_ProcessIO_Data: + goto handle_Data + + case ffj_t_ProcessIO_Control: + goto handle_Control + + case ffj_t_ProcessIOno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=agent.ProcessIO_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Data: + + /* handler: uj.Data type=agent.ProcessIO_Data kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Data = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Data == nil { + uj.Data = new(ProcessIO_Data) + } + + err = uj.Data.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Control: + + /* handler: uj.Control type=agent.ProcessIO_Control kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Control = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Control == nil { + uj.Control = new(ProcessIO_Control) + } + + err = uj.Control.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *ProcessIO_Control) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *ProcessIO_Control) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + if mj.TTYInfo != nil { + if true { + buf.WriteString(`"tty_info":`) + + { + + err = mj.TTYInfo.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Heartbeat != nil { + if true { + buf.WriteString(`"heartbeat":`) + + { + + err = mj.Heartbeat.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_ProcessIO_Controlbase = iota + ffj_t_ProcessIO_Controlno_such_key + + ffj_t_ProcessIO_Control_Type + + ffj_t_ProcessIO_Control_TTYInfo + + ffj_t_ProcessIO_Control_Heartbeat +) + +var ffj_key_ProcessIO_Control_Type = []byte("type") + +var ffj_key_ProcessIO_Control_TTYInfo = []byte("tty_info") + +var ffj_key_ProcessIO_Control_Heartbeat = []byte("heartbeat") + +func (uj *ProcessIO_Control) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *ProcessIO_Control) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_ProcessIO_Controlbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_ProcessIO_Controlno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'h': + + if bytes.Equal(ffj_key_ProcessIO_Control_Heartbeat, kn) { + currentKey = ffj_t_ProcessIO_Control_Heartbeat + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_ProcessIO_Control_Type, kn) { + currentKey = ffj_t_ProcessIO_Control_Type + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ProcessIO_Control_TTYInfo, kn) { + currentKey = ffj_t_ProcessIO_Control_TTYInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_ProcessIO_Control_Heartbeat, kn) { + currentKey = ffj_t_ProcessIO_Control_Heartbeat + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_ProcessIO_Control_TTYInfo, kn) { + currentKey = ffj_t_ProcessIO_Control_TTYInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_ProcessIO_Control_Type, kn) { + currentKey = ffj_t_ProcessIO_Control_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_ProcessIO_Controlno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_ProcessIO_Control_Type: + goto handle_Type + + case ffj_t_ProcessIO_Control_TTYInfo: + goto handle_TTYInfo + + case ffj_t_ProcessIO_Control_Heartbeat: + goto handle_Heartbeat + + case ffj_t_ProcessIO_Controlno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=agent.ProcessIO_Control_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_TTYInfo: + + /* handler: uj.TTYInfo type=mesos.TTYInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.TTYInfo = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.TTYInfo == nil { + uj.TTYInfo = new(mesos.TTYInfo) + } + + err = uj.TTYInfo.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Heartbeat: + + /* handler: uj.Heartbeat type=agent.ProcessIO_Control_Heartbeat kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Heartbeat = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Heartbeat == nil { + uj.Heartbeat = new(ProcessIO_Control_Heartbeat) + } + + err = uj.Heartbeat.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *ProcessIO_Control_Heartbeat) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *ProcessIO_Control_Heartbeat) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Interval != nil { + if true { + buf.WriteString(`"interval":`) + + { + + err = mj.Interval.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_ProcessIO_Control_Heartbeatbase = iota + ffj_t_ProcessIO_Control_Heartbeatno_such_key + + ffj_t_ProcessIO_Control_Heartbeat_Interval +) + +var ffj_key_ProcessIO_Control_Heartbeat_Interval = []byte("interval") + +func (uj *ProcessIO_Control_Heartbeat) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *ProcessIO_Control_Heartbeat) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_ProcessIO_Control_Heartbeatbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_ProcessIO_Control_Heartbeatno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'i': + + if bytes.Equal(ffj_key_ProcessIO_Control_Heartbeat_Interval, kn) { + currentKey = ffj_t_ProcessIO_Control_Heartbeat_Interval + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_ProcessIO_Control_Heartbeat_Interval, kn) { + currentKey = ffj_t_ProcessIO_Control_Heartbeat_Interval + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_ProcessIO_Control_Heartbeatno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_ProcessIO_Control_Heartbeat_Interval: + goto handle_Interval + + case ffj_t_ProcessIO_Control_Heartbeatno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Interval: + + /* handler: uj.Interval type=mesos.DurationInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Interval = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Interval == nil { + uj.Interval = new(mesos.DurationInfo) + } + + err = uj.Interval.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *ProcessIO_Data) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *ProcessIO_Data) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + if len(mj.Data) != 0 { + buf.WriteString(`"data":`) + if mj.Data != nil { + buf.WriteString(`"`) + { + enc := base64.NewEncoder(base64.StdEncoding, buf) + enc.Write(reflect.Indirect(reflect.ValueOf(mj.Data)).Bytes()) + enc.Close() + } + buf.WriteString(`"`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_ProcessIO_Database = iota + ffj_t_ProcessIO_Datano_such_key + + ffj_t_ProcessIO_Data_Type + + ffj_t_ProcessIO_Data_Data +) + +var ffj_key_ProcessIO_Data_Type = []byte("type") + +var ffj_key_ProcessIO_Data_Data = []byte("data") + +func (uj *ProcessIO_Data) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *ProcessIO_Data) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_ProcessIO_Database + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_ProcessIO_Datano_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'd': + + if bytes.Equal(ffj_key_ProcessIO_Data_Data, kn) { + currentKey = ffj_t_ProcessIO_Data_Data + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_ProcessIO_Data_Type, kn) { + currentKey = ffj_t_ProcessIO_Data_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_ProcessIO_Data_Data, kn) { + currentKey = ffj_t_ProcessIO_Data_Data + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_ProcessIO_Data_Type, kn) { + currentKey = ffj_t_ProcessIO_Data_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_ProcessIO_Datano_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_ProcessIO_Data_Type: + goto handle_Type + + case ffj_t_ProcessIO_Data_Data: + goto handle_Data + + case ffj_t_ProcessIO_Datano_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=agent.ProcessIO_Data_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Data: + + /* handler: uj.Data type=[]uint8 kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Data = nil + } else { + b := make([]byte, base64.StdEncoding.DecodedLen(fs.Output.Len())) + n, err := base64.StdEncoding.Decode(b, fs.Output.Bytes()) + if err != nil { + return fs.WrapErr(err) + } + + v := reflect.ValueOf(&uj.Data).Elem() + v.SetBytes(b[0:n]) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Response) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Response) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + if mj.GetHealth != nil { + if true { + buf.WriteString(`"get_health":`) + + { + + err = mj.GetHealth.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.GetFlags != nil { + if true { + buf.WriteString(`"get_flags":`) + + { + + err = mj.GetFlags.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.GetVersion != nil { + if true { + buf.WriteString(`"get_version":`) + + { + + err = mj.GetVersion.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.GetMetrics != nil { + if true { + buf.WriteString(`"get_metrics":`) + + { + + err = mj.GetMetrics.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.GetLoggingLevel != nil { + if true { + buf.WriteString(`"get_logging_level":`) + + { + + err = mj.GetLoggingLevel.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.ListFiles != nil { + if true { + buf.WriteString(`"list_files":`) + + { + + err = mj.ListFiles.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.ReadFile != nil { + if true { + buf.WriteString(`"read_file":`) + + { + + err = mj.ReadFile.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.GetState != nil { + if true { + buf.WriteString(`"get_state":`) + + { + + err = mj.GetState.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.GetContainers != nil { + if true { + buf.WriteString(`"get_containers":`) + + { + + err = mj.GetContainers.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.GetFrameworks != nil { + if true { + buf.WriteString(`"get_frameworks":`) + + { + + err = mj.GetFrameworks.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.GetExecutors != nil { + if true { + buf.WriteString(`"get_executors":`) + + { + + err = mj.GetExecutors.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.GetTasks != nil { + if true { + buf.WriteString(`"get_tasks":`) + + { + + err = mj.GetTasks.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.GetAgent != nil { + if true { + buf.WriteString(`"get_agent":`) + + { + + err = mj.GetAgent.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.GetResourceProviders != nil { + if true { + buf.WriteString(`"get_resource_providers":`) + + { + + err = mj.GetResourceProviders.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.WaitNestedContainer != nil { + if true { + buf.WriteString(`"wait_nested_container":`) + + { + + err = mj.WaitNestedContainer.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.WaitContainer != nil { + if true { + buf.WriteString(`"wait_container":`) + + { + + err = mj.WaitContainer.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Responsebase = iota + ffj_t_Responseno_such_key + + ffj_t_Response_Type + + ffj_t_Response_GetHealth + + ffj_t_Response_GetFlags + + ffj_t_Response_GetVersion + + ffj_t_Response_GetMetrics + + ffj_t_Response_GetLoggingLevel + + ffj_t_Response_ListFiles + + ffj_t_Response_ReadFile + + ffj_t_Response_GetState + + ffj_t_Response_GetContainers + + ffj_t_Response_GetFrameworks + + ffj_t_Response_GetExecutors + + ffj_t_Response_GetTasks + + ffj_t_Response_GetAgent + + ffj_t_Response_GetResourceProviders + + ffj_t_Response_WaitNestedContainer + + ffj_t_Response_WaitContainer +) + +var ffj_key_Response_Type = []byte("type") + +var ffj_key_Response_GetHealth = []byte("get_health") + +var ffj_key_Response_GetFlags = []byte("get_flags") + +var ffj_key_Response_GetVersion = []byte("get_version") + +var ffj_key_Response_GetMetrics = []byte("get_metrics") + +var ffj_key_Response_GetLoggingLevel = []byte("get_logging_level") + +var ffj_key_Response_ListFiles = []byte("list_files") + +var ffj_key_Response_ReadFile = []byte("read_file") + +var ffj_key_Response_GetState = []byte("get_state") + +var ffj_key_Response_GetContainers = []byte("get_containers") + +var ffj_key_Response_GetFrameworks = []byte("get_frameworks") + +var ffj_key_Response_GetExecutors = []byte("get_executors") + +var ffj_key_Response_GetTasks = []byte("get_tasks") + +var ffj_key_Response_GetAgent = []byte("get_agent") + +var ffj_key_Response_GetResourceProviders = []byte("get_resource_providers") + +var ffj_key_Response_WaitNestedContainer = []byte("wait_nested_container") + +var ffj_key_Response_WaitContainer = []byte("wait_container") + +func (uj *Response) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Response) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Responsebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Responseno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'g': + + if bytes.Equal(ffj_key_Response_GetHealth, kn) { + currentKey = ffj_t_Response_GetHealth + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Response_GetFlags, kn) { + currentKey = ffj_t_Response_GetFlags + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Response_GetVersion, kn) { + currentKey = ffj_t_Response_GetVersion + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Response_GetMetrics, kn) { + currentKey = ffj_t_Response_GetMetrics + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Response_GetLoggingLevel, kn) { + currentKey = ffj_t_Response_GetLoggingLevel + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Response_GetState, kn) { + currentKey = ffj_t_Response_GetState + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Response_GetContainers, kn) { + currentKey = ffj_t_Response_GetContainers + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Response_GetFrameworks, kn) { + currentKey = ffj_t_Response_GetFrameworks + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Response_GetExecutors, kn) { + currentKey = ffj_t_Response_GetExecutors + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Response_GetTasks, kn) { + currentKey = ffj_t_Response_GetTasks + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Response_GetAgent, kn) { + currentKey = ffj_t_Response_GetAgent + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Response_GetResourceProviders, kn) { + currentKey = ffj_t_Response_GetResourceProviders + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'l': + + if bytes.Equal(ffj_key_Response_ListFiles, kn) { + currentKey = ffj_t_Response_ListFiles + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_Response_ReadFile, kn) { + currentKey = ffj_t_Response_ReadFile + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_Response_Type, kn) { + currentKey = ffj_t_Response_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'w': + + if bytes.Equal(ffj_key_Response_WaitNestedContainer, kn) { + currentKey = ffj_t_Response_WaitNestedContainer + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Response_WaitContainer, kn) { + currentKey = ffj_t_Response_WaitContainer + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_Response_WaitContainer, kn) { + currentKey = ffj_t_Response_WaitContainer + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_WaitNestedContainer, kn) { + currentKey = ffj_t_Response_WaitNestedContainer + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_GetResourceProviders, kn) { + currentKey = ffj_t_Response_GetResourceProviders + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Response_GetAgent, kn) { + currentKey = ffj_t_Response_GetAgent + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_GetTasks, kn) { + currentKey = ffj_t_Response_GetTasks + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_GetExecutors, kn) { + currentKey = ffj_t_Response_GetExecutors + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_GetFrameworks, kn) { + currentKey = ffj_t_Response_GetFrameworks + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_GetContainers, kn) { + currentKey = ffj_t_Response_GetContainers + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_GetState, kn) { + currentKey = ffj_t_Response_GetState + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Response_ReadFile, kn) { + currentKey = ffj_t_Response_ReadFile + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_ListFiles, kn) { + currentKey = ffj_t_Response_ListFiles + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Response_GetLoggingLevel, kn) { + currentKey = ffj_t_Response_GetLoggingLevel + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_GetMetrics, kn) { + currentKey = ffj_t_Response_GetMetrics + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_GetVersion, kn) { + currentKey = ffj_t_Response_GetVersion + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_GetFlags, kn) { + currentKey = ffj_t_Response_GetFlags + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Response_GetHealth, kn) { + currentKey = ffj_t_Response_GetHealth + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Response_Type, kn) { + currentKey = ffj_t_Response_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Responseno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Response_Type: + goto handle_Type + + case ffj_t_Response_GetHealth: + goto handle_GetHealth + + case ffj_t_Response_GetFlags: + goto handle_GetFlags + + case ffj_t_Response_GetVersion: + goto handle_GetVersion + + case ffj_t_Response_GetMetrics: + goto handle_GetMetrics + + case ffj_t_Response_GetLoggingLevel: + goto handle_GetLoggingLevel + + case ffj_t_Response_ListFiles: + goto handle_ListFiles + + case ffj_t_Response_ReadFile: + goto handle_ReadFile + + case ffj_t_Response_GetState: + goto handle_GetState + + case ffj_t_Response_GetContainers: + goto handle_GetContainers + + case ffj_t_Response_GetFrameworks: + goto handle_GetFrameworks + + case ffj_t_Response_GetExecutors: + goto handle_GetExecutors + + case ffj_t_Response_GetTasks: + goto handle_GetTasks + + case ffj_t_Response_GetAgent: + goto handle_GetAgent + + case ffj_t_Response_GetResourceProviders: + goto handle_GetResourceProviders + + case ffj_t_Response_WaitNestedContainer: + goto handle_WaitNestedContainer + + case ffj_t_Response_WaitContainer: + goto handle_WaitContainer + + case ffj_t_Responseno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=agent.Response_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_GetHealth: + + /* handler: uj.GetHealth type=agent.Response_GetHealth kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.GetHealth = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.GetHealth == nil { + uj.GetHealth = new(Response_GetHealth) + } + + err = uj.GetHealth.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_GetFlags: + + /* handler: uj.GetFlags type=agent.Response_GetFlags kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.GetFlags = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.GetFlags == nil { + uj.GetFlags = new(Response_GetFlags) + } + + err = uj.GetFlags.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_GetVersion: + + /* handler: uj.GetVersion type=agent.Response_GetVersion kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.GetVersion = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.GetVersion == nil { + uj.GetVersion = new(Response_GetVersion) + } + + err = uj.GetVersion.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_GetMetrics: + + /* handler: uj.GetMetrics type=agent.Response_GetMetrics kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.GetMetrics = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.GetMetrics == nil { + uj.GetMetrics = new(Response_GetMetrics) + } + + err = uj.GetMetrics.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_GetLoggingLevel: + + /* handler: uj.GetLoggingLevel type=agent.Response_GetLoggingLevel kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.GetLoggingLevel = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.GetLoggingLevel == nil { + uj.GetLoggingLevel = new(Response_GetLoggingLevel) + } + + err = uj.GetLoggingLevel.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ListFiles: + + /* handler: uj.ListFiles type=agent.Response_ListFiles kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.ListFiles = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.ListFiles == nil { + uj.ListFiles = new(Response_ListFiles) + } + + err = uj.ListFiles.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ReadFile: + + /* handler: uj.ReadFile type=agent.Response_ReadFile kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.ReadFile = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.ReadFile == nil { + uj.ReadFile = new(Response_ReadFile) + } + + err = uj.ReadFile.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_GetState: + + /* handler: uj.GetState type=agent.Response_GetState kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.GetState = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.GetState == nil { + uj.GetState = new(Response_GetState) + } + + err = uj.GetState.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_GetContainers: + + /* handler: uj.GetContainers type=agent.Response_GetContainers kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.GetContainers = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.GetContainers == nil { + uj.GetContainers = new(Response_GetContainers) + } + + err = uj.GetContainers.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_GetFrameworks: + + /* handler: uj.GetFrameworks type=agent.Response_GetFrameworks kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.GetFrameworks = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.GetFrameworks == nil { + uj.GetFrameworks = new(Response_GetFrameworks) + } + + err = uj.GetFrameworks.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_GetExecutors: + + /* handler: uj.GetExecutors type=agent.Response_GetExecutors kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.GetExecutors = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.GetExecutors == nil { + uj.GetExecutors = new(Response_GetExecutors) + } + + err = uj.GetExecutors.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_GetTasks: + + /* handler: uj.GetTasks type=agent.Response_GetTasks kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.GetTasks = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.GetTasks == nil { + uj.GetTasks = new(Response_GetTasks) + } + + err = uj.GetTasks.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_GetAgent: + + /* handler: uj.GetAgent type=agent.Response_GetAgent kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.GetAgent = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.GetAgent == nil { + uj.GetAgent = new(Response_GetAgent) + } + + err = uj.GetAgent.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_GetResourceProviders: + + /* handler: uj.GetResourceProviders type=agent.Response_GetResourceProviders kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.GetResourceProviders = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.GetResourceProviders == nil { + uj.GetResourceProviders = new(Response_GetResourceProviders) + } + + err = uj.GetResourceProviders.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_WaitNestedContainer: + + /* handler: uj.WaitNestedContainer type=agent.Response_WaitNestedContainer kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.WaitNestedContainer = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.WaitNestedContainer == nil { + uj.WaitNestedContainer = new(Response_WaitNestedContainer) + } + + err = uj.WaitNestedContainer.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_WaitContainer: + + /* handler: uj.WaitContainer type=agent.Response_WaitContainer kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.WaitContainer = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.WaitContainer == nil { + uj.WaitContainer = new(Response_WaitContainer) + } + + err = uj.WaitContainer.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Response_GetAgent) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Response_GetAgent) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.AgentInfo != nil { + if true { + buf.WriteString(`"agent_info":`) + + { + + err = mj.AgentInfo.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Response_GetAgentbase = iota + ffj_t_Response_GetAgentno_such_key + + ffj_t_Response_GetAgent_AgentInfo +) + +var ffj_key_Response_GetAgent_AgentInfo = []byte("agent_info") + +func (uj *Response_GetAgent) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Response_GetAgent) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Response_GetAgentbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Response_GetAgentno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'a': + + if bytes.Equal(ffj_key_Response_GetAgent_AgentInfo, kn) { + currentKey = ffj_t_Response_GetAgent_AgentInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_Response_GetAgent_AgentInfo, kn) { + currentKey = ffj_t_Response_GetAgent_AgentInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Response_GetAgentno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Response_GetAgent_AgentInfo: + goto handle_AgentInfo + + case ffj_t_Response_GetAgentno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_AgentInfo: + + /* handler: uj.AgentInfo type=mesos.AgentInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.AgentInfo = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.AgentInfo == nil { + uj.AgentInfo = new(mesos.AgentInfo) + } + + err = uj.AgentInfo.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Response_GetContainers) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Response_GetContainers) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"containers":`) + if mj.Containers != nil { + buf.WriteString(`[`) + for i, v := range mj.Containers { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Response_GetContainersbase = iota + ffj_t_Response_GetContainersno_such_key + + ffj_t_Response_GetContainers_Containers +) + +var ffj_key_Response_GetContainers_Containers = []byte("containers") + +func (uj *Response_GetContainers) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Response_GetContainers) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Response_GetContainersbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Response_GetContainersno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_Response_GetContainers_Containers, kn) { + currentKey = ffj_t_Response_GetContainers_Containers + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Response_GetContainers_Containers, kn) { + currentKey = ffj_t_Response_GetContainers_Containers + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Response_GetContainersno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Response_GetContainers_Containers: + goto handle_Containers + + case ffj_t_Response_GetContainersno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Containers: + + /* handler: uj.Containers type=[]agent.Response_GetContainers_Container kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Containers = nil + } else { + + uj.Containers = []Response_GetContainers_Container{} + + wantVal := true + + for { + + var tmp_uj__Containers Response_GetContainers_Container + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Containers type=agent.Response_GetContainers_Container kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Containers.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Containers = append(uj.Containers, tmp_uj__Containers) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Response_GetContainers_Container) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Response_GetContainers_Container) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.FrameworkID != nil { + if true { + buf.WriteString(`"framework_id":`) + + { + + err = mj.FrameworkID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.ExecutorID != nil { + if true { + buf.WriteString(`"executor_id":`) + + { + + err = mj.ExecutorID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.ExecutorName != nil { + if true { + buf.WriteString(`"executor_name":`) + fflib.WriteJsonString(buf, string(*mj.ExecutorName)) + buf.WriteByte(',') + } + } + buf.WriteString(`"container_id":`) + + { + + err = mj.ContainerID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + if mj.ContainerStatus != nil { + if true { + buf.WriteString(`"container_status":`) + + { + + err = mj.ContainerStatus.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.ResourceStatistics != nil { + if true { + buf.WriteString(`"resource_statistics":`) + + { + + err = mj.ResourceStatistics.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Response_GetContainers_Containerbase = iota + ffj_t_Response_GetContainers_Containerno_such_key + + ffj_t_Response_GetContainers_Container_FrameworkID + + ffj_t_Response_GetContainers_Container_ExecutorID + + ffj_t_Response_GetContainers_Container_ExecutorName + + ffj_t_Response_GetContainers_Container_ContainerID + + ffj_t_Response_GetContainers_Container_ContainerStatus + + ffj_t_Response_GetContainers_Container_ResourceStatistics +) + +var ffj_key_Response_GetContainers_Container_FrameworkID = []byte("framework_id") + +var ffj_key_Response_GetContainers_Container_ExecutorID = []byte("executor_id") + +var ffj_key_Response_GetContainers_Container_ExecutorName = []byte("executor_name") + +var ffj_key_Response_GetContainers_Container_ContainerID = []byte("container_id") + +var ffj_key_Response_GetContainers_Container_ContainerStatus = []byte("container_status") + +var ffj_key_Response_GetContainers_Container_ResourceStatistics = []byte("resource_statistics") + +func (uj *Response_GetContainers_Container) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Response_GetContainers_Container) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Response_GetContainers_Containerbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Response_GetContainers_Containerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_Response_GetContainers_Container_ContainerID, kn) { + currentKey = ffj_t_Response_GetContainers_Container_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Response_GetContainers_Container_ContainerStatus, kn) { + currentKey = ffj_t_Response_GetContainers_Container_ContainerStatus + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'e': + + if bytes.Equal(ffj_key_Response_GetContainers_Container_ExecutorID, kn) { + currentKey = ffj_t_Response_GetContainers_Container_ExecutorID + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Response_GetContainers_Container_ExecutorName, kn) { + currentKey = ffj_t_Response_GetContainers_Container_ExecutorName + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'f': + + if bytes.Equal(ffj_key_Response_GetContainers_Container_FrameworkID, kn) { + currentKey = ffj_t_Response_GetContainers_Container_FrameworkID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_Response_GetContainers_Container_ResourceStatistics, kn) { + currentKey = ffj_t_Response_GetContainers_Container_ResourceStatistics + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Response_GetContainers_Container_ResourceStatistics, kn) { + currentKey = ffj_t_Response_GetContainers_Container_ResourceStatistics + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_GetContainers_Container_ContainerStatus, kn) { + currentKey = ffj_t_Response_GetContainers_Container_ContainerStatus + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Response_GetContainers_Container_ContainerID, kn) { + currentKey = ffj_t_Response_GetContainers_Container_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Response_GetContainers_Container_ExecutorName, kn) { + currentKey = ffj_t_Response_GetContainers_Container_ExecutorName + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Response_GetContainers_Container_ExecutorID, kn) { + currentKey = ffj_t_Response_GetContainers_Container_ExecutorID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_GetContainers_Container_FrameworkID, kn) { + currentKey = ffj_t_Response_GetContainers_Container_FrameworkID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Response_GetContainers_Containerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Response_GetContainers_Container_FrameworkID: + goto handle_FrameworkID + + case ffj_t_Response_GetContainers_Container_ExecutorID: + goto handle_ExecutorID + + case ffj_t_Response_GetContainers_Container_ExecutorName: + goto handle_ExecutorName + + case ffj_t_Response_GetContainers_Container_ContainerID: + goto handle_ContainerID + + case ffj_t_Response_GetContainers_Container_ContainerStatus: + goto handle_ContainerStatus + + case ffj_t_Response_GetContainers_Container_ResourceStatistics: + goto handle_ResourceStatistics + + case ffj_t_Response_GetContainers_Containerno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_FrameworkID: + + /* handler: uj.FrameworkID type=mesos.FrameworkID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.FrameworkID = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.FrameworkID == nil { + uj.FrameworkID = new(mesos.FrameworkID) + } + + err = uj.FrameworkID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ExecutorID: + + /* handler: uj.ExecutorID type=mesos.ExecutorID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.ExecutorID = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.ExecutorID == nil { + uj.ExecutorID = new(mesos.ExecutorID) + } + + err = uj.ExecutorID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ExecutorName: + + /* handler: uj.ExecutorName type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.ExecutorName = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.ExecutorName = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ContainerID: + + /* handler: uj.ContainerID type=mesos.ContainerID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.ContainerID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ContainerStatus: + + /* handler: uj.ContainerStatus type=mesos.ContainerStatus kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.ContainerStatus = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.ContainerStatus == nil { + uj.ContainerStatus = new(mesos.ContainerStatus) + } + + err = uj.ContainerStatus.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ResourceStatistics: + + /* handler: uj.ResourceStatistics type=mesos.ResourceStatistics kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.ResourceStatistics = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.ResourceStatistics == nil { + uj.ResourceStatistics = new(mesos.ResourceStatistics) + } + + err = uj.ResourceStatistics.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Response_GetExecutors) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Response_GetExecutors) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"executors":`) + if mj.Executors != nil { + buf.WriteString(`[`) + for i, v := range mj.Executors { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteString(`,"completed_executors":`) + if mj.CompletedExecutors != nil { + buf.WriteString(`[`) + for i, v := range mj.CompletedExecutors { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Response_GetExecutorsbase = iota + ffj_t_Response_GetExecutorsno_such_key + + ffj_t_Response_GetExecutors_Executors + + ffj_t_Response_GetExecutors_CompletedExecutors +) + +var ffj_key_Response_GetExecutors_Executors = []byte("executors") + +var ffj_key_Response_GetExecutors_CompletedExecutors = []byte("completed_executors") + +func (uj *Response_GetExecutors) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Response_GetExecutors) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Response_GetExecutorsbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Response_GetExecutorsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_Response_GetExecutors_CompletedExecutors, kn) { + currentKey = ffj_t_Response_GetExecutors_CompletedExecutors + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'e': + + if bytes.Equal(ffj_key_Response_GetExecutors_Executors, kn) { + currentKey = ffj_t_Response_GetExecutors_Executors + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Response_GetExecutors_CompletedExecutors, kn) { + currentKey = ffj_t_Response_GetExecutors_CompletedExecutors + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_GetExecutors_Executors, kn) { + currentKey = ffj_t_Response_GetExecutors_Executors + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Response_GetExecutorsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Response_GetExecutors_Executors: + goto handle_Executors + + case ffj_t_Response_GetExecutors_CompletedExecutors: + goto handle_CompletedExecutors + + case ffj_t_Response_GetExecutorsno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Executors: + + /* handler: uj.Executors type=[]agent.Response_GetExecutors_Executor kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Executors = nil + } else { + + uj.Executors = []Response_GetExecutors_Executor{} + + wantVal := true + + for { + + var tmp_uj__Executors Response_GetExecutors_Executor + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Executors type=agent.Response_GetExecutors_Executor kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Executors.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Executors = append(uj.Executors, tmp_uj__Executors) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_CompletedExecutors: + + /* handler: uj.CompletedExecutors type=[]agent.Response_GetExecutors_Executor kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.CompletedExecutors = nil + } else { + + uj.CompletedExecutors = []Response_GetExecutors_Executor{} + + wantVal := true + + for { + + var tmp_uj__CompletedExecutors Response_GetExecutors_Executor + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__CompletedExecutors type=agent.Response_GetExecutors_Executor kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__CompletedExecutors.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.CompletedExecutors = append(uj.CompletedExecutors, tmp_uj__CompletedExecutors) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Response_GetExecutors_Executor) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Response_GetExecutors_Executor) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"executor_info":`) + + { + + err = mj.ExecutorInfo.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Response_GetExecutors_Executorbase = iota + ffj_t_Response_GetExecutors_Executorno_such_key + + ffj_t_Response_GetExecutors_Executor_ExecutorInfo +) + +var ffj_key_Response_GetExecutors_Executor_ExecutorInfo = []byte("executor_info") + +func (uj *Response_GetExecutors_Executor) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Response_GetExecutors_Executor) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Response_GetExecutors_Executorbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Response_GetExecutors_Executorno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'e': + + if bytes.Equal(ffj_key_Response_GetExecutors_Executor_ExecutorInfo, kn) { + currentKey = ffj_t_Response_GetExecutors_Executor_ExecutorInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_Response_GetExecutors_Executor_ExecutorInfo, kn) { + currentKey = ffj_t_Response_GetExecutors_Executor_ExecutorInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Response_GetExecutors_Executorno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Response_GetExecutors_Executor_ExecutorInfo: + goto handle_ExecutorInfo + + case ffj_t_Response_GetExecutors_Executorno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ExecutorInfo: + + /* handler: uj.ExecutorInfo type=mesos.ExecutorInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.ExecutorInfo.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Response_GetFlags) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Response_GetFlags) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"flags":`) + if mj.Flags != nil { + buf.WriteString(`[`) + for i, v := range mj.Flags { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Response_GetFlagsbase = iota + ffj_t_Response_GetFlagsno_such_key + + ffj_t_Response_GetFlags_Flags +) + +var ffj_key_Response_GetFlags_Flags = []byte("flags") + +func (uj *Response_GetFlags) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Response_GetFlags) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Response_GetFlagsbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Response_GetFlagsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'f': + + if bytes.Equal(ffj_key_Response_GetFlags_Flags, kn) { + currentKey = ffj_t_Response_GetFlags_Flags + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Response_GetFlags_Flags, kn) { + currentKey = ffj_t_Response_GetFlags_Flags + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Response_GetFlagsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Response_GetFlags_Flags: + goto handle_Flags + + case ffj_t_Response_GetFlagsno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Flags: + + /* handler: uj.Flags type=[]mesos.Flag kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Flags = nil + } else { + + uj.Flags = []mesos.Flag{} + + wantVal := true + + for { + + var tmp_uj__Flags mesos.Flag + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Flags type=mesos.Flag kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Flags.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Flags = append(uj.Flags, tmp_uj__Flags) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Response_GetFrameworks) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Response_GetFrameworks) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"frameworks":`) + if mj.Frameworks != nil { + buf.WriteString(`[`) + for i, v := range mj.Frameworks { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteString(`,"completed_frameworks":`) + if mj.CompletedFrameworks != nil { + buf.WriteString(`[`) + for i, v := range mj.CompletedFrameworks { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Response_GetFrameworksbase = iota + ffj_t_Response_GetFrameworksno_such_key + + ffj_t_Response_GetFrameworks_Frameworks + + ffj_t_Response_GetFrameworks_CompletedFrameworks +) + +var ffj_key_Response_GetFrameworks_Frameworks = []byte("frameworks") + +var ffj_key_Response_GetFrameworks_CompletedFrameworks = []byte("completed_frameworks") + +func (uj *Response_GetFrameworks) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Response_GetFrameworks) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Response_GetFrameworksbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Response_GetFrameworksno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_Response_GetFrameworks_CompletedFrameworks, kn) { + currentKey = ffj_t_Response_GetFrameworks_CompletedFrameworks + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'f': + + if bytes.Equal(ffj_key_Response_GetFrameworks_Frameworks, kn) { + currentKey = ffj_t_Response_GetFrameworks_Frameworks + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Response_GetFrameworks_CompletedFrameworks, kn) { + currentKey = ffj_t_Response_GetFrameworks_CompletedFrameworks + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_GetFrameworks_Frameworks, kn) { + currentKey = ffj_t_Response_GetFrameworks_Frameworks + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Response_GetFrameworksno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Response_GetFrameworks_Frameworks: + goto handle_Frameworks + + case ffj_t_Response_GetFrameworks_CompletedFrameworks: + goto handle_CompletedFrameworks + + case ffj_t_Response_GetFrameworksno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Frameworks: + + /* handler: uj.Frameworks type=[]agent.Response_GetFrameworks_Framework kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Frameworks = nil + } else { + + uj.Frameworks = []Response_GetFrameworks_Framework{} + + wantVal := true + + for { + + var tmp_uj__Frameworks Response_GetFrameworks_Framework + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Frameworks type=agent.Response_GetFrameworks_Framework kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Frameworks.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Frameworks = append(uj.Frameworks, tmp_uj__Frameworks) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_CompletedFrameworks: + + /* handler: uj.CompletedFrameworks type=[]agent.Response_GetFrameworks_Framework kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.CompletedFrameworks = nil + } else { + + uj.CompletedFrameworks = []Response_GetFrameworks_Framework{} + + wantVal := true + + for { + + var tmp_uj__CompletedFrameworks Response_GetFrameworks_Framework + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__CompletedFrameworks type=agent.Response_GetFrameworks_Framework kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__CompletedFrameworks.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.CompletedFrameworks = append(uj.CompletedFrameworks, tmp_uj__CompletedFrameworks) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Response_GetFrameworks_Framework) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Response_GetFrameworks_Framework) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"framework_info":`) + + { + + err = mj.FrameworkInfo.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Response_GetFrameworks_Frameworkbase = iota + ffj_t_Response_GetFrameworks_Frameworkno_such_key + + ffj_t_Response_GetFrameworks_Framework_FrameworkInfo +) + +var ffj_key_Response_GetFrameworks_Framework_FrameworkInfo = []byte("framework_info") + +func (uj *Response_GetFrameworks_Framework) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Response_GetFrameworks_Framework) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Response_GetFrameworks_Frameworkbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Response_GetFrameworks_Frameworkno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'f': + + if bytes.Equal(ffj_key_Response_GetFrameworks_Framework_FrameworkInfo, kn) { + currentKey = ffj_t_Response_GetFrameworks_Framework_FrameworkInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Response_GetFrameworks_Framework_FrameworkInfo, kn) { + currentKey = ffj_t_Response_GetFrameworks_Framework_FrameworkInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Response_GetFrameworks_Frameworkno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Response_GetFrameworks_Framework_FrameworkInfo: + goto handle_FrameworkInfo + + case ffj_t_Response_GetFrameworks_Frameworkno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_FrameworkInfo: + + /* handler: uj.FrameworkInfo type=mesos.FrameworkInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.FrameworkInfo.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Response_GetHealth) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Response_GetHealth) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + if mj.Healthy { + buf.WriteString(`{"healthy":true`) + } else { + buf.WriteString(`{"healthy":false`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Response_GetHealthbase = iota + ffj_t_Response_GetHealthno_such_key + + ffj_t_Response_GetHealth_Healthy +) + +var ffj_key_Response_GetHealth_Healthy = []byte("healthy") + +func (uj *Response_GetHealth) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Response_GetHealth) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Response_GetHealthbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Response_GetHealthno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'h': + + if bytes.Equal(ffj_key_Response_GetHealth_Healthy, kn) { + currentKey = ffj_t_Response_GetHealth_Healthy + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Response_GetHealth_Healthy, kn) { + currentKey = ffj_t_Response_GetHealth_Healthy + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Response_GetHealthno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Response_GetHealth_Healthy: + goto handle_Healthy + + case ffj_t_Response_GetHealthno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Healthy: + + /* handler: uj.Healthy type=bool kind=bool quoted=false*/ + + { + if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) + } + } + + { + if tok == fflib.FFTok_null { + + } else { + tmpb := fs.Output.Bytes() + + if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { + + uj.Healthy = true + + } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { + + uj.Healthy = false + + } else { + err = errors.New("unexpected bytes for true/false value") + return fs.WrapErr(err) + } + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Response_GetLoggingLevel) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Response_GetLoggingLevel) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"level":`) + fflib.FormatBits2(buf, uint64(mj.Level), 10, false) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Response_GetLoggingLevelbase = iota + ffj_t_Response_GetLoggingLevelno_such_key + + ffj_t_Response_GetLoggingLevel_Level +) + +var ffj_key_Response_GetLoggingLevel_Level = []byte("level") + +func (uj *Response_GetLoggingLevel) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Response_GetLoggingLevel) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Response_GetLoggingLevelbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Response_GetLoggingLevelno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'l': + + if bytes.Equal(ffj_key_Response_GetLoggingLevel_Level, kn) { + currentKey = ffj_t_Response_GetLoggingLevel_Level + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Response_GetLoggingLevel_Level, kn) { + currentKey = ffj_t_Response_GetLoggingLevel_Level + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Response_GetLoggingLevelno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Response_GetLoggingLevel_Level: + goto handle_Level + + case ffj_t_Response_GetLoggingLevelno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Level: + + /* handler: uj.Level type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + uj.Level = uint32(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Response_GetMetrics) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Response_GetMetrics) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"metrics":`) + if mj.Metrics != nil { + buf.WriteString(`[`) + for i, v := range mj.Metrics { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Response_GetMetricsbase = iota + ffj_t_Response_GetMetricsno_such_key + + ffj_t_Response_GetMetrics_Metrics +) + +var ffj_key_Response_GetMetrics_Metrics = []byte("metrics") + +func (uj *Response_GetMetrics) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Response_GetMetrics) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Response_GetMetricsbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Response_GetMetricsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'm': + + if bytes.Equal(ffj_key_Response_GetMetrics_Metrics, kn) { + currentKey = ffj_t_Response_GetMetrics_Metrics + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Response_GetMetrics_Metrics, kn) { + currentKey = ffj_t_Response_GetMetrics_Metrics + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Response_GetMetricsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Response_GetMetrics_Metrics: + goto handle_Metrics + + case ffj_t_Response_GetMetricsno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Metrics: + + /* handler: uj.Metrics type=[]mesos.Metric kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Metrics = nil + } else { + + uj.Metrics = []mesos.Metric{} + + wantVal := true + + for { + + var tmp_uj__Metrics mesos.Metric + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Metrics type=mesos.Metric kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Metrics.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Metrics = append(uj.Metrics, tmp_uj__Metrics) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Response_GetResourceProviders) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Response_GetResourceProviders) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"resource_providers":`) + if mj.ResourceProviders != nil { + buf.WriteString(`[`) + for i, v := range mj.ResourceProviders { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Response_GetResourceProvidersbase = iota + ffj_t_Response_GetResourceProvidersno_such_key + + ffj_t_Response_GetResourceProviders_ResourceProviders +) + +var ffj_key_Response_GetResourceProviders_ResourceProviders = []byte("resource_providers") + +func (uj *Response_GetResourceProviders) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Response_GetResourceProviders) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Response_GetResourceProvidersbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Response_GetResourceProvidersno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'r': + + if bytes.Equal(ffj_key_Response_GetResourceProviders_ResourceProviders, kn) { + currentKey = ffj_t_Response_GetResourceProviders_ResourceProviders + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Response_GetResourceProviders_ResourceProviders, kn) { + currentKey = ffj_t_Response_GetResourceProviders_ResourceProviders + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Response_GetResourceProvidersno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Response_GetResourceProviders_ResourceProviders: + goto handle_ResourceProviders + + case ffj_t_Response_GetResourceProvidersno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ResourceProviders: + + /* handler: uj.ResourceProviders type=[]agent.Response_GetResourceProviders_ResourceProvider kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.ResourceProviders = nil + } else { + + uj.ResourceProviders = []Response_GetResourceProviders_ResourceProvider{} + + wantVal := true + + for { + + var tmp_uj__ResourceProviders Response_GetResourceProviders_ResourceProvider + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__ResourceProviders type=agent.Response_GetResourceProviders_ResourceProvider kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__ResourceProviders.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.ResourceProviders = append(uj.ResourceProviders, tmp_uj__ResourceProviders) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Response_GetResourceProviders_ResourceProvider) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Response_GetResourceProviders_ResourceProvider) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"resource_provider_info":`) + + { + + err = mj.ResourceProviderInfo.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Response_GetResourceProviders_ResourceProviderbase = iota + ffj_t_Response_GetResourceProviders_ResourceProviderno_such_key + + ffj_t_Response_GetResourceProviders_ResourceProvider_ResourceProviderInfo +) + +var ffj_key_Response_GetResourceProviders_ResourceProvider_ResourceProviderInfo = []byte("resource_provider_info") + +func (uj *Response_GetResourceProviders_ResourceProvider) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Response_GetResourceProviders_ResourceProvider) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Response_GetResourceProviders_ResourceProviderbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Response_GetResourceProviders_ResourceProviderno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'r': + + if bytes.Equal(ffj_key_Response_GetResourceProviders_ResourceProvider_ResourceProviderInfo, kn) { + currentKey = ffj_t_Response_GetResourceProviders_ResourceProvider_ResourceProviderInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Response_GetResourceProviders_ResourceProvider_ResourceProviderInfo, kn) { + currentKey = ffj_t_Response_GetResourceProviders_ResourceProvider_ResourceProviderInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Response_GetResourceProviders_ResourceProviderno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Response_GetResourceProviders_ResourceProvider_ResourceProviderInfo: + goto handle_ResourceProviderInfo + + case ffj_t_Response_GetResourceProviders_ResourceProviderno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ResourceProviderInfo: + + /* handler: uj.ResourceProviderInfo type=mesos.ResourceProviderInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.ResourceProviderInfo.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Response_GetState) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Response_GetState) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.GetTasks != nil { + if true { + buf.WriteString(`"get_tasks":`) + + { + + err = mj.GetTasks.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.GetExecutors != nil { + if true { + buf.WriteString(`"get_executors":`) + + { + + err = mj.GetExecutors.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.GetFrameworks != nil { + if true { + buf.WriteString(`"get_frameworks":`) + + { + + err = mj.GetFrameworks.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Response_GetStatebase = iota + ffj_t_Response_GetStateno_such_key + + ffj_t_Response_GetState_GetTasks + + ffj_t_Response_GetState_GetExecutors + + ffj_t_Response_GetState_GetFrameworks +) + +var ffj_key_Response_GetState_GetTasks = []byte("get_tasks") + +var ffj_key_Response_GetState_GetExecutors = []byte("get_executors") + +var ffj_key_Response_GetState_GetFrameworks = []byte("get_frameworks") + +func (uj *Response_GetState) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Response_GetState) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Response_GetStatebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Response_GetStateno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'g': + + if bytes.Equal(ffj_key_Response_GetState_GetTasks, kn) { + currentKey = ffj_t_Response_GetState_GetTasks + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Response_GetState_GetExecutors, kn) { + currentKey = ffj_t_Response_GetState_GetExecutors + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Response_GetState_GetFrameworks, kn) { + currentKey = ffj_t_Response_GetState_GetFrameworks + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Response_GetState_GetFrameworks, kn) { + currentKey = ffj_t_Response_GetState_GetFrameworks + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_GetState_GetExecutors, kn) { + currentKey = ffj_t_Response_GetState_GetExecutors + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_GetState_GetTasks, kn) { + currentKey = ffj_t_Response_GetState_GetTasks + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Response_GetStateno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Response_GetState_GetTasks: + goto handle_GetTasks + + case ffj_t_Response_GetState_GetExecutors: + goto handle_GetExecutors + + case ffj_t_Response_GetState_GetFrameworks: + goto handle_GetFrameworks + + case ffj_t_Response_GetStateno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_GetTasks: + + /* handler: uj.GetTasks type=agent.Response_GetTasks kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.GetTasks = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.GetTasks == nil { + uj.GetTasks = new(Response_GetTasks) + } + + err = uj.GetTasks.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_GetExecutors: + + /* handler: uj.GetExecutors type=agent.Response_GetExecutors kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.GetExecutors = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.GetExecutors == nil { + uj.GetExecutors = new(Response_GetExecutors) + } + + err = uj.GetExecutors.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_GetFrameworks: + + /* handler: uj.GetFrameworks type=agent.Response_GetFrameworks kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.GetFrameworks = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.GetFrameworks == nil { + uj.GetFrameworks = new(Response_GetFrameworks) + } + + err = uj.GetFrameworks.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Response_GetTasks) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Response_GetTasks) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"pending_tasks":`) + if mj.PendingTasks != nil { + buf.WriteString(`[`) + for i, v := range mj.PendingTasks { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteString(`,"queued_tasks":`) + if mj.QueuedTasks != nil { + buf.WriteString(`[`) + for i, v := range mj.QueuedTasks { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteString(`,"launched_tasks":`) + if mj.LaunchedTasks != nil { + buf.WriteString(`[`) + for i, v := range mj.LaunchedTasks { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteString(`,"terminated_tasks":`) + if mj.TerminatedTasks != nil { + buf.WriteString(`[`) + for i, v := range mj.TerminatedTasks { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteString(`,"completed_tasks":`) + if mj.CompletedTasks != nil { + buf.WriteString(`[`) + for i, v := range mj.CompletedTasks { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Response_GetTasksbase = iota + ffj_t_Response_GetTasksno_such_key + + ffj_t_Response_GetTasks_PendingTasks + + ffj_t_Response_GetTasks_QueuedTasks + + ffj_t_Response_GetTasks_LaunchedTasks + + ffj_t_Response_GetTasks_TerminatedTasks + + ffj_t_Response_GetTasks_CompletedTasks +) + +var ffj_key_Response_GetTasks_PendingTasks = []byte("pending_tasks") + +var ffj_key_Response_GetTasks_QueuedTasks = []byte("queued_tasks") + +var ffj_key_Response_GetTasks_LaunchedTasks = []byte("launched_tasks") + +var ffj_key_Response_GetTasks_TerminatedTasks = []byte("terminated_tasks") + +var ffj_key_Response_GetTasks_CompletedTasks = []byte("completed_tasks") + +func (uj *Response_GetTasks) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Response_GetTasks) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Response_GetTasksbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Response_GetTasksno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_Response_GetTasks_CompletedTasks, kn) { + currentKey = ffj_t_Response_GetTasks_CompletedTasks + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'l': + + if bytes.Equal(ffj_key_Response_GetTasks_LaunchedTasks, kn) { + currentKey = ffj_t_Response_GetTasks_LaunchedTasks + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_Response_GetTasks_PendingTasks, kn) { + currentKey = ffj_t_Response_GetTasks_PendingTasks + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'q': + + if bytes.Equal(ffj_key_Response_GetTasks_QueuedTasks, kn) { + currentKey = ffj_t_Response_GetTasks_QueuedTasks + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_Response_GetTasks_TerminatedTasks, kn) { + currentKey = ffj_t_Response_GetTasks_TerminatedTasks + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Response_GetTasks_CompletedTasks, kn) { + currentKey = ffj_t_Response_GetTasks_CompletedTasks + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_GetTasks_TerminatedTasks, kn) { + currentKey = ffj_t_Response_GetTasks_TerminatedTasks + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_GetTasks_LaunchedTasks, kn) { + currentKey = ffj_t_Response_GetTasks_LaunchedTasks + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_GetTasks_QueuedTasks, kn) { + currentKey = ffj_t_Response_GetTasks_QueuedTasks + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_GetTasks_PendingTasks, kn) { + currentKey = ffj_t_Response_GetTasks_PendingTasks + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Response_GetTasksno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Response_GetTasks_PendingTasks: + goto handle_PendingTasks + + case ffj_t_Response_GetTasks_QueuedTasks: + goto handle_QueuedTasks + + case ffj_t_Response_GetTasks_LaunchedTasks: + goto handle_LaunchedTasks + + case ffj_t_Response_GetTasks_TerminatedTasks: + goto handle_TerminatedTasks + + case ffj_t_Response_GetTasks_CompletedTasks: + goto handle_CompletedTasks + + case ffj_t_Response_GetTasksno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_PendingTasks: + + /* handler: uj.PendingTasks type=[]mesos.Task kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.PendingTasks = nil + } else { + + uj.PendingTasks = []mesos.Task{} + + wantVal := true + + for { + + var tmp_uj__PendingTasks mesos.Task + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__PendingTasks type=mesos.Task kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__PendingTasks.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.PendingTasks = append(uj.PendingTasks, tmp_uj__PendingTasks) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_QueuedTasks: + + /* handler: uj.QueuedTasks type=[]mesos.Task kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.QueuedTasks = nil + } else { + + uj.QueuedTasks = []mesos.Task{} + + wantVal := true + + for { + + var tmp_uj__QueuedTasks mesos.Task + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__QueuedTasks type=mesos.Task kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__QueuedTasks.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.QueuedTasks = append(uj.QueuedTasks, tmp_uj__QueuedTasks) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_LaunchedTasks: + + /* handler: uj.LaunchedTasks type=[]mesos.Task kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.LaunchedTasks = nil + } else { + + uj.LaunchedTasks = []mesos.Task{} + + wantVal := true + + for { + + var tmp_uj__LaunchedTasks mesos.Task + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__LaunchedTasks type=mesos.Task kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__LaunchedTasks.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.LaunchedTasks = append(uj.LaunchedTasks, tmp_uj__LaunchedTasks) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_TerminatedTasks: + + /* handler: uj.TerminatedTasks type=[]mesos.Task kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.TerminatedTasks = nil + } else { + + uj.TerminatedTasks = []mesos.Task{} + + wantVal := true + + for { + + var tmp_uj__TerminatedTasks mesos.Task + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__TerminatedTasks type=mesos.Task kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__TerminatedTasks.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.TerminatedTasks = append(uj.TerminatedTasks, tmp_uj__TerminatedTasks) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_CompletedTasks: + + /* handler: uj.CompletedTasks type=[]mesos.Task kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.CompletedTasks = nil + } else { + + uj.CompletedTasks = []mesos.Task{} + + wantVal := true + + for { + + var tmp_uj__CompletedTasks mesos.Task + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__CompletedTasks type=mesos.Task kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__CompletedTasks.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.CompletedTasks = append(uj.CompletedTasks, tmp_uj__CompletedTasks) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Response_GetVersion) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Response_GetVersion) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"version_info":`) + + { + + err = mj.VersionInfo.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Response_GetVersionbase = iota + ffj_t_Response_GetVersionno_such_key + + ffj_t_Response_GetVersion_VersionInfo +) + +var ffj_key_Response_GetVersion_VersionInfo = []byte("version_info") + +func (uj *Response_GetVersion) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Response_GetVersion) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Response_GetVersionbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Response_GetVersionno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'v': + + if bytes.Equal(ffj_key_Response_GetVersion_VersionInfo, kn) { + currentKey = ffj_t_Response_GetVersion_VersionInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Response_GetVersion_VersionInfo, kn) { + currentKey = ffj_t_Response_GetVersion_VersionInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Response_GetVersionno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Response_GetVersion_VersionInfo: + goto handle_VersionInfo + + case ffj_t_Response_GetVersionno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_VersionInfo: + + /* handler: uj.VersionInfo type=mesos.VersionInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.VersionInfo.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Response_ListFiles) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Response_ListFiles) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"file_infos":`) + if mj.FileInfos != nil { + buf.WriteString(`[`) + for i, v := range mj.FileInfos { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Response_ListFilesbase = iota + ffj_t_Response_ListFilesno_such_key + + ffj_t_Response_ListFiles_FileInfos +) + +var ffj_key_Response_ListFiles_FileInfos = []byte("file_infos") + +func (uj *Response_ListFiles) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Response_ListFiles) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Response_ListFilesbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Response_ListFilesno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'f': + + if bytes.Equal(ffj_key_Response_ListFiles_FileInfos, kn) { + currentKey = ffj_t_Response_ListFiles_FileInfos + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Response_ListFiles_FileInfos, kn) { + currentKey = ffj_t_Response_ListFiles_FileInfos + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Response_ListFilesno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Response_ListFiles_FileInfos: + goto handle_FileInfos + + case ffj_t_Response_ListFilesno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_FileInfos: + + /* handler: uj.FileInfos type=[]mesos.FileInfo kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.FileInfos = nil + } else { + + uj.FileInfos = []mesos.FileInfo{} + + wantVal := true + + for { + + var tmp_uj__FileInfos mesos.FileInfo + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__FileInfos type=mesos.FileInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__FileInfos.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.FileInfos = append(uj.FileInfos, tmp_uj__FileInfos) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Response_ReadFile) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Response_ReadFile) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "size":`) + fflib.FormatBits2(buf, uint64(mj.Size), 10, false) + buf.WriteByte(',') + if len(mj.Data) != 0 { + buf.WriteString(`"data":`) + if mj.Data != nil { + buf.WriteString(`"`) + { + enc := base64.NewEncoder(base64.StdEncoding, buf) + enc.Write(reflect.Indirect(reflect.ValueOf(mj.Data)).Bytes()) + enc.Close() + } + buf.WriteString(`"`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Response_ReadFilebase = iota + ffj_t_Response_ReadFileno_such_key + + ffj_t_Response_ReadFile_Size + + ffj_t_Response_ReadFile_Data +) + +var ffj_key_Response_ReadFile_Size = []byte("size") + +var ffj_key_Response_ReadFile_Data = []byte("data") + +func (uj *Response_ReadFile) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Response_ReadFile) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Response_ReadFilebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Response_ReadFileno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'd': + + if bytes.Equal(ffj_key_Response_ReadFile_Data, kn) { + currentKey = ffj_t_Response_ReadFile_Data + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_Response_ReadFile_Size, kn) { + currentKey = ffj_t_Response_ReadFile_Size + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Response_ReadFile_Data, kn) { + currentKey = ffj_t_Response_ReadFile_Data + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_ReadFile_Size, kn) { + currentKey = ffj_t_Response_ReadFile_Size + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Response_ReadFileno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Response_ReadFile_Size: + goto handle_Size + + case ffj_t_Response_ReadFile_Data: + goto handle_Data + + case ffj_t_Response_ReadFileno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Size: + + /* handler: uj.Size type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + uj.Size = uint64(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Data: + + /* handler: uj.Data type=[]uint8 kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Data = nil + } else { + b := make([]byte, base64.StdEncoding.DecodedLen(fs.Output.Len())) + n, err := base64.StdEncoding.Decode(b, fs.Output.Bytes()) + if err != nil { + return fs.WrapErr(err) + } + + v := reflect.ValueOf(&uj.Data).Elem() + v.SetBytes(b[0:n]) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Response_WaitContainer) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Response_WaitContainer) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.ExitStatus != nil { + if true { + buf.WriteString(`"exit_status":`) + fflib.FormatBits2(buf, uint64(*mj.ExitStatus), 10, *mj.ExitStatus < 0) + buf.WriteByte(',') + } + } + if mj.State != nil { + if true { + buf.WriteString(`"state":`) + + { + + obj, err = mj.State.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + if mj.Reason != nil { + if true { + buf.WriteString(`"reason":`) + + { + + obj, err = mj.Reason.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + if mj.Limitation != nil { + if true { + buf.WriteString(`"limitation":`) + + { + + err = mj.Limitation.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Message != nil { + if true { + buf.WriteString(`"message":`) + fflib.WriteJsonString(buf, string(*mj.Message)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Response_WaitContainerbase = iota + ffj_t_Response_WaitContainerno_such_key + + ffj_t_Response_WaitContainer_ExitStatus + + ffj_t_Response_WaitContainer_State + + ffj_t_Response_WaitContainer_Reason + + ffj_t_Response_WaitContainer_Limitation + + ffj_t_Response_WaitContainer_Message +) + +var ffj_key_Response_WaitContainer_ExitStatus = []byte("exit_status") + +var ffj_key_Response_WaitContainer_State = []byte("state") + +var ffj_key_Response_WaitContainer_Reason = []byte("reason") + +var ffj_key_Response_WaitContainer_Limitation = []byte("limitation") + +var ffj_key_Response_WaitContainer_Message = []byte("message") + +func (uj *Response_WaitContainer) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Response_WaitContainer) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Response_WaitContainerbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Response_WaitContainerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'e': + + if bytes.Equal(ffj_key_Response_WaitContainer_ExitStatus, kn) { + currentKey = ffj_t_Response_WaitContainer_ExitStatus + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'l': + + if bytes.Equal(ffj_key_Response_WaitContainer_Limitation, kn) { + currentKey = ffj_t_Response_WaitContainer_Limitation + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'm': + + if bytes.Equal(ffj_key_Response_WaitContainer_Message, kn) { + currentKey = ffj_t_Response_WaitContainer_Message + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_Response_WaitContainer_Reason, kn) { + currentKey = ffj_t_Response_WaitContainer_Reason + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_Response_WaitContainer_State, kn) { + currentKey = ffj_t_Response_WaitContainer_State + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Response_WaitContainer_Message, kn) { + currentKey = ffj_t_Response_WaitContainer_Message + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Response_WaitContainer_Limitation, kn) { + currentKey = ffj_t_Response_WaitContainer_Limitation + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_WaitContainer_Reason, kn) { + currentKey = ffj_t_Response_WaitContainer_Reason + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_WaitContainer_State, kn) { + currentKey = ffj_t_Response_WaitContainer_State + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_WaitContainer_ExitStatus, kn) { + currentKey = ffj_t_Response_WaitContainer_ExitStatus + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Response_WaitContainerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Response_WaitContainer_ExitStatus: + goto handle_ExitStatus + + case ffj_t_Response_WaitContainer_State: + goto handle_State + + case ffj_t_Response_WaitContainer_Reason: + goto handle_Reason + + case ffj_t_Response_WaitContainer_Limitation: + goto handle_Limitation + + case ffj_t_Response_WaitContainer_Message: + goto handle_Message + + case ffj_t_Response_WaitContainerno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ExitStatus: + + /* handler: uj.ExitStatus type=int32 kind=int32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.ExitStatus = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int32(tval) + uj.ExitStatus = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_State: + + /* handler: uj.State type=mesos.TaskState kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.State = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.State == nil { + uj.State = new(mesos.TaskState) + } + + err = uj.State.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Reason: + + /* handler: uj.Reason type=mesos.TaskStatus_Reason kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Reason = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.Reason == nil { + uj.Reason = new(mesos.TaskStatus_Reason) + } + + err = uj.Reason.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Limitation: + + /* handler: uj.Limitation type=mesos.TaskResourceLimitation kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Limitation = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Limitation == nil { + uj.Limitation = new(mesos.TaskResourceLimitation) + } + + err = uj.Limitation.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Message: + + /* handler: uj.Message type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Message = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Message = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Response_WaitNestedContainer) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Response_WaitNestedContainer) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.ExitStatus != nil { + if true { + buf.WriteString(`"exit_status":`) + fflib.FormatBits2(buf, uint64(*mj.ExitStatus), 10, *mj.ExitStatus < 0) + buf.WriteByte(',') + } + } + if mj.State != nil { + if true { + buf.WriteString(`"state":`) + + { + + obj, err = mj.State.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + if mj.Reason != nil { + if true { + buf.WriteString(`"reason":`) + + { + + obj, err = mj.Reason.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + if mj.Limitation != nil { + if true { + buf.WriteString(`"limitation":`) + + { + + err = mj.Limitation.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Message != nil { + if true { + buf.WriteString(`"message":`) + fflib.WriteJsonString(buf, string(*mj.Message)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Response_WaitNestedContainerbase = iota + ffj_t_Response_WaitNestedContainerno_such_key + + ffj_t_Response_WaitNestedContainer_ExitStatus + + ffj_t_Response_WaitNestedContainer_State + + ffj_t_Response_WaitNestedContainer_Reason + + ffj_t_Response_WaitNestedContainer_Limitation + + ffj_t_Response_WaitNestedContainer_Message +) + +var ffj_key_Response_WaitNestedContainer_ExitStatus = []byte("exit_status") + +var ffj_key_Response_WaitNestedContainer_State = []byte("state") + +var ffj_key_Response_WaitNestedContainer_Reason = []byte("reason") + +var ffj_key_Response_WaitNestedContainer_Limitation = []byte("limitation") + +var ffj_key_Response_WaitNestedContainer_Message = []byte("message") + +func (uj *Response_WaitNestedContainer) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Response_WaitNestedContainer) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Response_WaitNestedContainerbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Response_WaitNestedContainerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'e': + + if bytes.Equal(ffj_key_Response_WaitNestedContainer_ExitStatus, kn) { + currentKey = ffj_t_Response_WaitNestedContainer_ExitStatus + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'l': + + if bytes.Equal(ffj_key_Response_WaitNestedContainer_Limitation, kn) { + currentKey = ffj_t_Response_WaitNestedContainer_Limitation + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'm': + + if bytes.Equal(ffj_key_Response_WaitNestedContainer_Message, kn) { + currentKey = ffj_t_Response_WaitNestedContainer_Message + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_Response_WaitNestedContainer_Reason, kn) { + currentKey = ffj_t_Response_WaitNestedContainer_Reason + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_Response_WaitNestedContainer_State, kn) { + currentKey = ffj_t_Response_WaitNestedContainer_State + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Response_WaitNestedContainer_Message, kn) { + currentKey = ffj_t_Response_WaitNestedContainer_Message + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Response_WaitNestedContainer_Limitation, kn) { + currentKey = ffj_t_Response_WaitNestedContainer_Limitation + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_WaitNestedContainer_Reason, kn) { + currentKey = ffj_t_Response_WaitNestedContainer_Reason + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_WaitNestedContainer_State, kn) { + currentKey = ffj_t_Response_WaitNestedContainer_State + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Response_WaitNestedContainer_ExitStatus, kn) { + currentKey = ffj_t_Response_WaitNestedContainer_ExitStatus + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Response_WaitNestedContainerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Response_WaitNestedContainer_ExitStatus: + goto handle_ExitStatus + + case ffj_t_Response_WaitNestedContainer_State: + goto handle_State + + case ffj_t_Response_WaitNestedContainer_Reason: + goto handle_Reason + + case ffj_t_Response_WaitNestedContainer_Limitation: + goto handle_Limitation + + case ffj_t_Response_WaitNestedContainer_Message: + goto handle_Message + + case ffj_t_Response_WaitNestedContainerno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ExitStatus: + + /* handler: uj.ExitStatus type=int32 kind=int32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.ExitStatus = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int32(tval) + uj.ExitStatus = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_State: + + /* handler: uj.State type=mesos.TaskState kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.State = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.State == nil { + uj.State = new(mesos.TaskState) + } + + err = uj.State.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Reason: + + /* handler: uj.Reason type=mesos.TaskStatus_Reason kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Reason = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.Reason == nil { + uj.Reason = new(mesos.TaskStatus_Reason) + } + + err = uj.Reason.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Limitation: + + /* handler: uj.Limitation type=mesos.TaskResourceLimitation kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Limitation = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Limitation == nil { + uj.Limitation = new(mesos.TaskResourceLimitation) + } + + err = uj.Limitation.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Message: + + /* handler: uj.Message type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Message = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Message = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/agent/agent.proto b/vendor/github.com/mesos/mesos-go/api/v1/lib/agent/agent.proto new file mode 100644 index 00000000..f81834bd --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/agent/agent.proto @@ -0,0 +1,690 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto2"; + +package mesos.agent; + +import "github.com/mesos/mesos-go/api/v1/lib/mesos.proto"; +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option go_package = "agent"; +option (gogoproto.benchgen_all) = true; +option (gogoproto.enum_stringer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_unrecognized_all) = false; +option (gogoproto.gostring_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.protosizer_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.verbose_equal_all) = true; + +/** + * Calls that can be sent to the v1 agent API. + * + * A call is described using the standard protocol buffer "union" + * trick, see + * https://developers.google.com/protocol-buffers/docs/techniques#union. + */ +message Call { + // If a call of type `Call::FOO` requires additional parameters they can be + // included in the corresponding `Call::Foo` message. Similarly, if a call + // receives a synchronous response it will be returned as a `Response` + // message of type `Response::FOO`; see `Call::LaunchNestedContainerSession` + // and `Call::AttachContainerOutput` for exceptions. + enum Type { + UNKNOWN = 0; + + GET_HEALTH = 1; // Retrieves the agent's health status. + GET_FLAGS = 2; // Retrieves the agent's flag configuration. + GET_VERSION = 3; // Retrieves the agent's version information. + GET_METRICS = 4; // See 'GetMetrics' below. + + GET_LOGGING_LEVEL = 5; // Retrieves the agent's logging level. + SET_LOGGING_LEVEL = 6; // See 'SetLoggingLevel' below. + + LIST_FILES = 7; + READ_FILE = 8; // See 'ReadFile' below. + + GET_STATE = 9; + + GET_CONTAINERS = 10; + + // Retrieves the information about known frameworks. + GET_FRAMEWORKS = 11; + + // Retrieves the information about known executors. + GET_EXECUTORS = 12; + + // Retrieves the information about known tasks. + GET_TASKS = 13; + + // Retrieves the agent information. + GET_AGENT = 20; + + // Retrieves the information about known resource providers. + GET_RESOURCE_PROVIDERS = 26; + + // Calls for managing nested containers underneath an executor's container. + // Some of these calls are deprecated in favor of the calls + // for both standalone or nested containers further below. + LAUNCH_NESTED_CONTAINER = 14 [deprecated = true]; + WAIT_NESTED_CONTAINER = 15 [deprecated = true]; + KILL_NESTED_CONTAINER = 16 [deprecated = true]; + REMOVE_NESTED_CONTAINER = 21 [deprecated = true]; + + // See 'LaunchNestedContainerSession' below. + LAUNCH_NESTED_CONTAINER_SESSION = 17; + + ATTACH_CONTAINER_INPUT = 18; // See 'AttachContainerInput' below. + ATTACH_CONTAINER_OUTPUT = 19; // see 'AttachContainerOutput' below. + + // Calls for managing standalone containers + // or containers nested underneath another container. + LAUNCH_CONTAINER = 22; // See 'LaunchContainer' below. + WAIT_CONTAINER = 23; // See 'WaitContainer' below. + KILL_CONTAINER = 24; // See 'KillContainer' below. + REMOVE_CONTAINER = 25; // See 'RemoveContainer' below. + + ADD_RESOURCE_PROVIDER_CONFIG = 27; // See 'AddResourceProviderConfig' below. // NOLINT + UPDATE_RESOURCE_PROVIDER_CONFIG = 28; // See 'UpdateResourceProviderConfig' below. // NOLINT + REMOVE_RESOURCE_PROVIDER_CONFIG = 29; // See 'RemoveResourceProviderConfig' below. // NOLINT + + // Prune unused container images. + PRUNE_IMAGES = 30; + + option (gogoproto.goproto_enum_prefix) = true; + } + + // Provides a snapshot of the current metrics tracked by the agent. + message GetMetrics { + // If set, `timeout` would be used to determines the maximum amount of time + // the API will take to respond. If the timeout is exceeded, some metrics + // may not be included in the response. + optional DurationInfo timeout = 1; + } + + // Sets the logging verbosity level for a specified duration. Mesos uses + // [glog](https://github.com/google/glog) for logging. The library only uses + // verbose logging which means nothing will be output unless the verbosity + // level is set (by default it's 0, libprocess uses levels 1, 2, and 3). + message SetLoggingLevel { + // The verbosity level. + required uint32 level = 1 [(gogoproto.nullable) = false]; + // The duration to keep verbosity level toggled. After this duration, the + // verbosity level of log would revert to the original level. + required DurationInfo duration = 2 [(gogoproto.nullable) = false]; + } + + // Provides the file listing for a directory. + message ListFiles { + required string path = 1 [(gogoproto.nullable) = false]; + } + + // Reads data from a file. + message ReadFile { + // The path of file. + required string path = 1 [(gogoproto.nullable) = false]; + + // Initial offset in file to start reading from. + required uint64 offset = 2 [(gogoproto.nullable) = false]; + + // The maximum number of bytes to read. The read length is capped at 16 + // memory pages. + optional uint64 length = 3; + } + + // Lists active containers on the agent. + message GetContainers { + optional bool show_nested = 1; + optional bool show_standalone = 2; + } + + // Deprecated in favor of `LaunchContainer`. + message LaunchNestedContainer { + required ContainerID container_id = 1 [(gogoproto.customname) = "ContainerID", (gogoproto.nullable) = false]; + optional CommandInfo command = 2; + optional ContainerInfo container = 3; + } + + // Deprecated in favor of `WaitContainer`. + message WaitNestedContainer { + required ContainerID container_id = 1 [(gogoproto.customname) = "ContainerID", (gogoproto.nullable) = false]; + } + + // Deprecated in favor of `KillContainer`. + message KillNestedContainer { + required ContainerID container_id = 1 [(gogoproto.customname) = "ContainerID", (gogoproto.nullable) = false]; + optional int32 signal = 2; + } + + // Deprecated in favor of `RemoveContainer`. + message RemoveNestedContainer { + required ContainerID container_id = 1 [(gogoproto.customname) = "ContainerID", (gogoproto.nullable) = false]; + } + + // Launches a nested container within an executor's tree of containers. + // The differences between this call and `LaunchNestedContainer` are: + // 1) The container's life-cycle is tied to the lifetime of the + // connection used to make this call, i.e., if the connection ever + // breaks, the container will be destroyed. + // 2) The nested container shares the same namespaces and cgroups as + // its parent container. + // 3) Results in a streaming response of type `ProcessIO`. So the call + // needs to be made on a persistent connection. + message LaunchNestedContainerSession { + required ContainerID container_id = 1 [(gogoproto.customname) = "ContainerID", (gogoproto.nullable) = false]; + optional CommandInfo command = 2; + optional ContainerInfo container = 3; + } + + // Attaches the caller to the STDIN of the entry point of the container. + // Clients can use this to stream input data to a container. + // Note that this call needs to be made on a persistent connection by + // streaming a CONTAINER_ID message followed by one or more PROCESS_IO + // messages. + message AttachContainerInput { + enum Type { + UNKNOWN = 0; + CONTAINER_ID = 1; + PROCESS_IO = 2; + option (gogoproto.goproto_enum_prefix) = true; + } + + optional Type type = 1 [(gogoproto.nullable) = false]; + optional ContainerID container_id = 2 [(gogoproto.customname) = "ContainerID"]; + optional ProcessIO process_io = 3 [(gogoproto.customname) = "ProcessIO"]; + } + + // Attaches the caller to the STDOUT and STDERR of the entrypoint of + // the container. Clients can use this to stream output/error from the + // container. This call will result in a streaming response of `ProcessIO`; + // so this call needs to be made on a persistent connection. + message AttachContainerOutput { + required ContainerID container_id = 1 [(gogoproto.customname) = "ContainerID", (gogoproto.nullable) = false]; + } + + // Launches a either a "standalone" container on this agent + // or a nested container within another tree of containers. + // + // A standalone container is launched by specifying a ContainerID + // with no parent. Standalone containers bypass the normal offer cycle + // between the master and agent. Unlike other containers, a standalone + // container does not have an executor or any tasks. This means the + // standalone container does not report back to Mesos or any framework + // and must be supervised separately. + // + // A nested container is launched by specifying a ContainerID with + // another existing container (including standalone containers) + // as the parent. + // + // Returns 200 OK if the new container launch succeeds. + // Returns 202 Accepted if the requested ContainerID is already in use + // by a standalone or nested container. + // Returns 400 Bad Request if the container launch fails. + message LaunchContainer { + // NOTE: Some characters cannot be used in the ID. All characters + // must be valid filesystem path characters. In addition, '/' and '.' + // are reserved. + required ContainerID container_id = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "ContainerID"]; + + optional CommandInfo command = 2; + + // NOTE: Nested containers may not specify resources and instead + // share resources with its parent container. + // + // TODO(josephw): These resources are purely used for isolation + // and are not accounted for by the Mesos master (if connected). + // It is the caller's responsibility to ensure that resources are + // not overcommitted (e.g. CPU and memory) or conflicting (e.g. ports + // and volumes). Once there is support for preempting tasks and a + // way to update the resources advertised by the agent, these standalone + // container resources should be accounted for by the master. + repeated Resource resources = 3 [(gogoproto.nullable) = false]; + + optional ContainerInfo container = 4; + } + + // Waits for the standalone or nested container to terminate + // and returns the exit status. + // + // Returns 200 OK if and when the container exits. + // Returns 404 Not Found if the container does not exist. + message WaitContainer { + required ContainerID container_id = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "ContainerID"]; + } + + // Kills the standalone or nested container. The signal to be sent + // to the container can be specified in the 'signal' field. + // + // Returns 200 OK if the signal is sent successfully. + // Returns 404 Not Found if the container does not exist. + message KillContainer { + required ContainerID container_id = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "ContainerID"]; + + // Defaults to SIGKILL. + optional int32 signal = 2; + } + + // Removes a container's artifacts (runtime and sandbox directories). + // + // For nested containers, it is important to use this call if multiple + // nested containers are launched under the same parent container, because + // garbage collection only takes place at the parent container. Artifacts + // belonging to nested containers will not be garbage collected while + // the parent container is running. + // + // TODO(josephw): A standalone container's runtime directory is currently + // garbage collected as soon as the container exits. To allow the user to + // retrieve the exit status reliably, the runtime directory cannot be + // garbage collected immediately. Instead, the user will eventually be + // required to make this call after the standalone container has exited. + // Also, a standalone container's sandbox directory is currently not + // garbage collected and is only deleted via this call. + // + // Returns 200 OK if the removal is successful or if the parent container + // (for nested containers) does not exist. + // Returns 500 Internal Server Error if anything goes wrong, including + // if the container is still running or does not exist. + // + // TODO(josephw): Consider returning a 400 Bad Request instead of 500 + // Internal Server Error when the user tries to remove a running or + // nonexistent nested container. + message RemoveContainer { + required ContainerID container_id = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "ContainerID"]; + } + + // Adds a new resource provider config file. + // + // The content of the `info` field will be written into a new config file in + // the resource provider config directory, and a new resource provider will be + // launched asynchronously based on the config. Callers must not set the + // `info.id` field. This call is idempotent, so if a config file identical to + // the content of the `info` field already exists, this call will return + // without launching a resource provider. Note that if a config file is + // placed into the resource provider config directory out-of-band after the + // agent starts up, it will not be checked against this call. + // + // Returns 200 OK if a new config file is created, or an identical config file + // exists. + // Returns 400 Bad Request if `info` is not well-formed. + // Returns 403 Forbidden if the call is not authorized. + // Returns 409 Conflict if another config file that describes a + // resource provider of the same type and name exists, but the content is + // not identical. + // Returns 500 Internal Server Error if anything goes wrong. + message AddResourceProviderConfig { + required ResourceProviderInfo info = 1 [(gogoproto.nullable) = false]; + } + + // Updates an existing resource provider config file. + // + // The content of the `info` field will be written into an existing config + // file that describes a resource provider of the specified type and name in + // the resource provider config directory, and the corresponding resource + // provider will be relaunched asynchronously to reflect the changes in the + // config. Callers must not set the `info.id` field. This call is idempotent, + // so if there is no change in the config, this call will return without + // relaunching the resource provider. Note that if a config file is placed + // into the resource provider config directory out-of-band after the agent + // starts up, it will not be checked against this call. + // + // Returns 200 OK if an existing config file is updated, or there is no change + // in the config file. + // Returns 400 Bad Request if `info` is not well-formed. + // Returns 403 Forbidden if the call is not authorized. + // Returns 404 Not Found if no config file describes a resource + // provider of the same type and name exists. + // Returns 500 Internal Server Error if anything goes wrong. + message UpdateResourceProviderConfig { + required ResourceProviderInfo info = 1 [(gogoproto.nullable) = false]; + } + + // Removes a config file from the resource provider config directory. + // + // The config file that describes the resource provider of the specified type + // and name will be removed, and the corresponding resource provider will be + // terminated asynchronously. This call is idempotent, so if no matching + // config file exists, this call will return without terminating any resource + // provider. Note that if a config file is placed into the resource provider + // config directory out-of-band after the agent starts up, it will not be + // checked against this call. + // + // Returns 200 OK if the config file is removed, or no matching config file + // exists. + // Returns 403 Forbidden if the call is not authorized. + // Returns 500 Internal Server Error if anything goes wrong. + message RemoveResourceProviderConfig { + required string type = 1 [(gogoproto.nullable) = false]; + required string name = 2 [(gogoproto.nullable) = false]; + } + + // Prune unused container images from image store. + // + // Images and layers referenced by active containers as well as + // image references specified in `excluded_images` will not be pruned. + message PruneImages { + repeated Image excluded_images = 1 [(gogoproto.nullable) = false]; + } + + optional Type type = 1 [(gogoproto.nullable) = false]; + + optional GetMetrics get_metrics = 2; + optional SetLoggingLevel set_logging_level = 3; + optional ListFiles list_files = 4; + optional ReadFile read_file = 5; + + optional GetContainers get_containers = 20; + + optional LaunchNestedContainer launch_nested_container = 6 + [deprecated = true]; + + optional WaitNestedContainer wait_nested_container = 7 [deprecated = true]; + optional KillNestedContainer kill_nested_container = 8 [deprecated = true]; + optional RemoveNestedContainer remove_nested_container = 12 + [deprecated = true]; + + optional LaunchNestedContainerSession launch_nested_container_session = 9; + optional AttachContainerInput attach_container_input = 10; + optional AttachContainerOutput attach_container_output = 11; + optional LaunchContainer launch_container = 13; + optional WaitContainer wait_container = 14; + optional KillContainer kill_container = 15; + optional RemoveContainer remove_container = 16; + + optional AddResourceProviderConfig add_resource_provider_config = 17; + optional UpdateResourceProviderConfig update_resource_provider_config = 18; + optional RemoveResourceProviderConfig remove_resource_provider_config = 19; + + optional PruneImages prune_images = 21; +} + + +/** + * Synchronous responses for all calls made to the v1 agent API. + */ +message Response { + // Each of the responses of type `FOO` corresponds to `Foo` message below. + enum Type { + UNKNOWN = 0; + + GET_HEALTH = 1; // See 'GetHealth' below. + GET_FLAGS = 2; // See 'GetFlags' below. + GET_VERSION = 3; // See 'GetVersion' below. + GET_METRICS = 4; // See 'GetMetrics' below. + + GET_LOGGING_LEVEL = 5; // See 'GetLoggingLevel' below. + + LIST_FILES = 6; + READ_FILE = 7; // See 'ReadFile' below. + + GET_STATE = 8; + + GET_CONTAINERS = 9; + GET_FRAMEWORKS = 10; // See 'GetFrameworks' below. + GET_EXECUTORS = 11; // See 'GetExecutors' below. + GET_TASKS = 12; // See 'GetTasks' below. + GET_AGENT = 14; // See 'GetAgent' below. + GET_RESOURCE_PROVIDERS = 16; // See 'GetResourceProviders' below. + + WAIT_NESTED_CONTAINER = 13 [deprecated = true]; + WAIT_CONTAINER = 15; // See 'WaitContainer' below. + + option (gogoproto.goproto_enum_prefix) = true; + } + + // `healthy` would be true if the agent is healthy. Delayed responses are also + // indicative of the poor health of the agent. + message GetHealth { + required bool healthy = 1 [(gogoproto.nullable) = false]; + } + + // Contains the flag configuration of the agent. + message GetFlags { + repeated Flag flags = 1 [(gogoproto.nullable) = false]; + } + + // Contains the version information of the agent. + message GetVersion { + required VersionInfo version_info = 1 [(gogoproto.nullable) = false]; + } + + // Contains a snapshot of the current metrics. + message GetMetrics { + repeated Metric metrics = 1 [(gogoproto.nullable) = false]; + } + + // Contains the logging level of the agent. + message GetLoggingLevel { + required uint32 level = 1 [(gogoproto.nullable) = false]; + } + + // Contains the file listing(similar to `ls -l`) for a directory. + message ListFiles { + repeated FileInfo file_infos = 1 [(gogoproto.nullable) = false]; + } + + // Contains the file data. + message ReadFile { + // The size of file (in bytes). + required uint64 size = 1 [(gogoproto.nullable) = false]; + + required bytes data = 2; + } + + // Contains full state of the agent i.e. information about the tasks, + // frameworks and executors running in the cluster. + message GetState { + optional GetTasks get_tasks = 1; + optional GetExecutors get_executors = 2; + optional GetFrameworks get_frameworks = 3; + } + + // Information about containers running on this agent. It contains + // ContainerStatus and ResourceStatistics along with some metadata + // of the containers. + message GetContainers { + message Container { + optional FrameworkID framework_id = 1 [(gogoproto.customname) = "FrameworkID"]; + optional ExecutorID executor_id = 2 [(gogoproto.customname) = "ExecutorID"]; + optional string executor_name = 3; + required ContainerID container_id = 4 [(gogoproto.customname) = "ContainerID", (gogoproto.nullable) = false]; + optional ContainerStatus container_status = 5; + optional ResourceStatistics resource_statistics = 6; + } + + repeated Container containers = 1 [(gogoproto.nullable) = false]; + } + + // Information about all the frameworks known to the agent at the current + // time. + message GetFrameworks { + message Framework { + required FrameworkInfo framework_info = 1 [(gogoproto.nullable) = false]; + } + + repeated Framework frameworks = 1 [(gogoproto.nullable) = false]; + repeated Framework completed_frameworks = 2 [(gogoproto.nullable) = false]; + } + + // Lists information about all the executors known to the agent at the + // current time. + message GetExecutors { + message Executor { + required ExecutorInfo executor_info = 1 [(gogoproto.nullable) = false]; + } + + repeated Executor executors = 1 [(gogoproto.nullable) = false]; + repeated Executor completed_executors = 2 [(gogoproto.nullable) = false]; + } + + // Lists information about all the tasks known to the agent at the current + // time. + message GetTasks { + // Tasks that are pending in the agent's queue before an executor is + // launched. + repeated Task pending_tasks = 1 [(gogoproto.nullable) = false]; + + // Tasks that are enqueued for a launched executor that has not yet + // registered. + repeated Task queued_tasks = 2 [(gogoproto.nullable) = false]; + + // Tasks that are running. + repeated Task launched_tasks = 3 [(gogoproto.nullable) = false]; + + // Tasks that are terminated but pending updates. + repeated Task terminated_tasks = 4 [(gogoproto.nullable) = false]; + + // Tasks that are terminated and updates acked. + repeated Task completed_tasks = 5 [(gogoproto.nullable) = false]; + } + + // Contains the agent's information. + message GetAgent { + optional AgentInfo agent_info = 1; + } + + // Lists information about all resource providers known to the agent + // at the current time. + message GetResourceProviders { + message ResourceProvider { + required ResourceProviderInfo resource_provider_info = 1 [(gogoproto.nullable) = false]; + } + + repeated ResourceProvider resource_providers = 1 [(gogoproto.nullable) = false]; + } + + // Returns termination information about the nested container. + message WaitNestedContainer { + // Wait status of the lead process in the container. Note that this + // is the return value of `wait(2)`, so callers must use the `wait(2)` + // family of macros to extract whether the process exited cleanly and + // what the exit code was. + optional int32 exit_status = 1; + + // The `state` and `reason` fields may be populated if the Mesos agent + // terminates the container. In the absence of any special knowledge, + // executors should propagate this information via the `status` field + // of an `Update` call for the corresponding TaskID. + optional TaskState state = 2; + optional TaskStatus.Reason reason = 3; + + // This field will be populated if the task was terminated due to + // a resource limitation. + optional TaskResourceLimitation limitation = 4; + + optional string message = 5; + } + + // Returns termination information about the standalone or nested container. + message WaitContainer { + // Wait status of the lead process in the container. Note that this + // is the return value of `wait(2)`, so callers must use the `wait(2)` + // family of macros to extract whether the process exited cleanly and + // what the exit code was. + optional int32 exit_status = 1; + + // The `state` and `reason` fields may be populated if the Mesos agent + // terminates the container. In the absence of any special knowledge, + // executors should propagate this information via the `status` field + // of an `Update` call for the corresponding TaskID. + optional TaskState state = 2; + optional TaskStatus.Reason reason = 3; + + // This field will be populated if the task was terminated due to + // a resource limitation. + optional TaskResourceLimitation limitation = 4; + + optional string message = 5; + } + + optional Type type = 1 [(gogoproto.nullable) = false]; + + optional GetHealth get_health = 2; + optional GetFlags get_flags = 3; + optional GetVersion get_version = 4; + optional GetMetrics get_metrics = 5; + optional GetLoggingLevel get_logging_level = 6; + optional ListFiles list_files = 7; + optional ReadFile read_file = 8; + optional GetState get_state = 9; + optional GetContainers get_containers = 10; + optional GetFrameworks get_frameworks = 11; + optional GetExecutors get_executors = 12; + optional GetTasks get_tasks = 13; + optional GetAgent get_agent = 15; + optional GetResourceProviders get_resource_providers = 17; + optional WaitNestedContainer wait_nested_container = 14; + optional WaitContainer wait_container = 16; +} + + +/** + * Streaming response to `Call::LAUNCH_NESTED_CONTAINER_SESSION` and + * `Call::ATTACH_CONTAINER_OUTPUT`. + * + * This message is also used to stream request data for + * `Call::ATTACH_CONTAINER_INPUT`. + */ +message ProcessIO { + enum Type { + UNKNOWN = 0; + DATA = 1; + CONTROL = 2; + option (gogoproto.goproto_enum_prefix) = true; + } + + message Data { + enum Type { + UNKNOWN = 0; + STDIN = 1; + STDOUT = 2; + STDERR = 3; + option (gogoproto.goproto_enum_prefix) = true; + } + + optional Type type = 1 [(gogoproto.nullable) = false]; + optional bytes data = 2; + } + + + message Control { + enum Type { + UNKNOWN = 0; + TTY_INFO = 1; + HEARTBEAT = 2; + option (gogoproto.goproto_enum_prefix) = true; + } + + message Heartbeat { + optional DurationInfo interval = 1; + } + + optional Type type = 1 [(gogoproto.nullable) = false]; + optional TTYInfo tty_info = 2 [(gogoproto.customname) = "TTYInfo"]; + optional Heartbeat heartbeat = 3; + } + + optional Type type = 1 [(gogoproto.nullable) = false]; + optional Data data = 2; + optional Control control = 3; +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/agent/calls/calls.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/agent/calls/calls.go new file mode 100644 index 00000000..d35c1e70 --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/agent/calls/calls.go @@ -0,0 +1,256 @@ +package calls + +import ( + "time" + + "github.com/mesos/mesos-go/api/v1/lib" + "github.com/mesos/mesos-go/api/v1/lib/agent" +) + +func GetHealth() *agent.Call { return &agent.Call{Type: agent.Call_GET_HEALTH} } + +func GetFlags() *agent.Call { return &agent.Call{Type: agent.Call_GET_FLAGS} } + +func GetVersion() *agent.Call { return &agent.Call{Type: agent.Call_GET_VERSION} } + +func GetMetrics(d *time.Duration) (call *agent.Call) { + call = &agent.Call{ + Type: agent.Call_GET_METRICS, + GetMetrics: &agent.Call_GetMetrics{}, + } + if d != nil { + call.GetMetrics.Timeout = &mesos.DurationInfo{ + Nanoseconds: d.Nanoseconds(), + } + } + return +} + +func GetLoggingLevel() *agent.Call { return &agent.Call{Type: agent.Call_GET_LOGGING_LEVEL} } + +func SetLoggingLevel(level uint32, d time.Duration) *agent.Call { + return &agent.Call{ + Type: agent.Call_SET_LOGGING_LEVEL, + SetLoggingLevel: &agent.Call_SetLoggingLevel{ + Duration: mesos.DurationInfo{Nanoseconds: d.Nanoseconds()}, + Level: level, + }, + } +} + +func ListFiles(path string) *agent.Call { + return &agent.Call{ + Type: agent.Call_LIST_FILES, + ListFiles: &agent.Call_ListFiles{ + Path: path, + }, + } +} + +func ReadFile(path string, offset uint64) *agent.Call { + return &agent.Call{ + Type: agent.Call_READ_FILE, + ReadFile: &agent.Call_ReadFile{ + Path: path, + Offset: offset, + }, + } +} + +func ReadFileWithLength(path string, offset, length uint64) (call *agent.Call) { + call = ReadFile(path, offset) + call.ReadFile.Length = &length + return +} + +func GetState() *agent.Call { return &agent.Call{Type: agent.Call_GET_STATE} } + +func GetContainers() *agent.Call { return &agent.Call{Type: agent.Call_GET_CONTAINERS} } + +func GetFrameworks() *agent.Call { return &agent.Call{Type: agent.Call_GET_FRAMEWORKS} } + +func GetExecutors() *agent.Call { return &agent.Call{Type: agent.Call_GET_EXECUTORS} } + +func GetTasks() *agent.Call { return &agent.Call{Type: agent.Call_GET_TASKS} } + +func GetAgent() *agent.Call { return &agent.Call{Type: agent.Call_GET_AGENT} } + +func GetResourceProviders() *agent.Call { return &agent.Call{Type: agent.Call_GET_RESOURCE_PROVIDERS} } + +func LaunchNestedContainer(cid mesos.ContainerID, cmd *mesos.CommandInfo, ci *mesos.ContainerInfo) *agent.Call { + return &agent.Call{ + Type: agent.Call_LAUNCH_NESTED_CONTAINER, + LaunchNestedContainer: &agent.Call_LaunchNestedContainer{ + ContainerID: cid, + Command: cmd, + Container: ci, + }, + } +} + +func LaunchContainer(cid mesos.ContainerID, cmd *mesos.CommandInfo, ci *mesos.ContainerInfo, r []mesos.Resource) *agent.Call { + return &agent.Call{ + Type: agent.Call_LAUNCH_CONTAINER, + LaunchContainer: &agent.Call_LaunchContainer{ + ContainerID: cid, + Command: cmd, + Container: ci, + Resources: r, + }, + } +} + +func WaitNestedContainer(cid mesos.ContainerID) *agent.Call { + return &agent.Call{ + Type: agent.Call_WAIT_NESTED_CONTAINER, + WaitNestedContainer: &agent.Call_WaitNestedContainer{ + ContainerID: cid, + }, + } +} + +func WaitContainer(cid mesos.ContainerID) *agent.Call { + return &agent.Call{ + Type: agent.Call_WAIT_CONTAINER, + WaitContainer: &agent.Call_WaitContainer{ + ContainerID: cid, + }, + } +} + +func KillNestedContainer(cid mesos.ContainerID) *agent.Call { + return &agent.Call{ + Type: agent.Call_KILL_NESTED_CONTAINER, + KillNestedContainer: &agent.Call_KillNestedContainer{ + ContainerID: cid, + }, + } +} + +func KillContainer(cid mesos.ContainerID) *agent.Call { + return &agent.Call{ + Type: agent.Call_KILL_CONTAINER, + KillContainer: &agent.Call_KillContainer{ + ContainerID: cid, + }, + } +} + +func RemoveNestedContainer(cid mesos.ContainerID) *agent.Call { + return &agent.Call{ + Type: agent.Call_REMOVE_NESTED_CONTAINER, + RemoveNestedContainer: &agent.Call_RemoveNestedContainer{ + ContainerID: cid, + }, + } +} + +func RemoveContainer(cid mesos.ContainerID) *agent.Call { + return &agent.Call{ + Type: agent.Call_REMOVE_CONTAINER, + RemoveContainer: &agent.Call_RemoveContainer{ + ContainerID: cid, + }, + } +} + +func LaunchNestedContainerSession(cid mesos.ContainerID, cmd *mesos.CommandInfo, ci *mesos.ContainerInfo) *agent.Call { + return &agent.Call{ + Type: agent.Call_LAUNCH_NESTED_CONTAINER_SESSION, + LaunchNestedContainerSession: &agent.Call_LaunchNestedContainerSession{ + ContainerID: cid, + Command: cmd, + Container: ci, + }, + } +} + +func AttachContainerOutput(cid mesos.ContainerID) *agent.Call { + return &agent.Call{ + Type: agent.Call_ATTACH_CONTAINER_OUTPUT, + AttachContainerOutput: &agent.Call_AttachContainerOutput{ + ContainerID: cid, + }, + } +} + +// AttachContainerInput returns a Call that is used to initiate attachment to a container's stdin. +// Callers should first send this Call followed by one or more AttachContainerInputXxx calls. +func AttachContainerInput(cid mesos.ContainerID) *agent.Call { + return &agent.Call{ + Type: agent.Call_ATTACH_CONTAINER_INPUT, + AttachContainerInput: &agent.Call_AttachContainerInput{ + Type: agent.Call_AttachContainerInput_CONTAINER_ID, + ContainerID: &cid, + }, + } +} + +func AttachContainerInputData(data []byte) *agent.Call { + return &agent.Call{ + Type: agent.Call_ATTACH_CONTAINER_INPUT, + AttachContainerInput: &agent.Call_AttachContainerInput{ + Type: agent.Call_AttachContainerInput_PROCESS_IO, + ProcessIO: &agent.ProcessIO{ + Type: agent.ProcessIO_DATA, + Data: &agent.ProcessIO_Data{ + Type: agent.ProcessIO_Data_STDIN, + Data: data, + }, + }, + }, + } +} + +func AttachContainerInputTTY(t *mesos.TTYInfo) *agent.Call { + return &agent.Call{ + Type: agent.Call_ATTACH_CONTAINER_INPUT, + AttachContainerInput: &agent.Call_AttachContainerInput{ + Type: agent.Call_AttachContainerInput_PROCESS_IO, + ProcessIO: &agent.ProcessIO{ + Type: agent.ProcessIO_CONTROL, + Control: &agent.ProcessIO_Control{ + Type: agent.ProcessIO_Control_TTY_INFO, + TTYInfo: t, + }, + }, + }, + } +} + +func AddResourceProviderConfig(rpi mesos.ResourceProviderInfo) *agent.Call { + return &agent.Call{ + Type: agent.Call_ADD_RESOURCE_PROVIDER_CONFIG, + AddResourceProviderConfig: &agent.Call_AddResourceProviderConfig{ + Info: rpi, + }, + } +} + +func UpdateResourceProviderConfig(rpi mesos.ResourceProviderInfo) *agent.Call { + return &agent.Call{ + Type: agent.Call_UPDATE_RESOURCE_PROVIDER_CONFIG, + UpdateResourceProviderConfig: &agent.Call_UpdateResourceProviderConfig{ + Info: rpi, + }, + } +} + +func RemoveResourceProviderConfig(typ, name string) *agent.Call { + return &agent.Call{ + Type: agent.Call_REMOVE_RESOURCE_PROVIDER_CONFIG, + RemoveResourceProviderConfig: &agent.Call_RemoveResourceProviderConfig{ + Type: typ, + Name: name, + }, + } +} + +func PruneImages(excluded []mesos.Image) *agent.Call { + return &agent.Call{ + Type: agent.Call_PRUNE_IMAGES, + PruneImages: &agent.Call_PruneImages{ + ExcludedImages: excluded, + }, + } +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/agent/calls/calls_generated.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/agent/calls/calls_generated.go new file mode 100644 index 00000000..98816f55 --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/agent/calls/calls_generated.go @@ -0,0 +1,129 @@ +package calls + +// go generate -import github.com/mesos/mesos-go/api/v1/lib/agent -type C:agent.Call +// GENERATED CODE FOLLOWS; DO NOT EDIT. + +import ( + "context" + + "github.com/mesos/mesos-go/api/v1/lib" + "github.com/mesos/mesos-go/api/v1/lib/encoding" + + "github.com/mesos/mesos-go/api/v1/lib/agent" +) + +type ( + // Request generates a Call that's sent to a Mesos agent. Subsequent invocations are expected to + // yield equivalent calls. Intended for use w/ non-streaming requests to an agent. + Request interface { + Call() *agent.Call + } + + // RequestFunc is the functional adaptation of Request. + RequestFunc func() *agent.Call + + // RequestStreaming generates a Call that's send to a Mesos agent. Subsequent invocations MAY generate + // different Call objects. No more Call objects are expected once a nil is returned to signal the end of + // of the request stream. + RequestStreaming interface { + Request + IsStreaming() + } + + // RequestStreamingFunc is the functional adaptation of RequestStreaming. + RequestStreamingFunc func() *agent.Call + + // Send issues a Request to a Mesos agent and properly manages Call-specific mechanics. + Sender interface { + Send(context.Context, Request) (mesos.Response, error) + } + + // SenderFunc is the functional adaptation of the Sender interface + SenderFunc func(context.Context, Request) (mesos.Response, error) +) + +func (f RequestFunc) Call() *agent.Call { return f() } + +func (f RequestFunc) Marshaler() encoding.Marshaler { + // avoid returning (*agent.Call)(nil) for interface type + if call := f(); call != nil { + return call + } + return nil +} + +func (f RequestStreamingFunc) Push(c ...*agent.Call) RequestStreamingFunc { return Push(f, c...) } + +func (f RequestStreamingFunc) Marshaler() encoding.Marshaler { + // avoid returning (*agent.Call)(nil) for interface type + if call := f(); call != nil { + return call + } + return nil +} + +func (f RequestStreamingFunc) IsStreaming() {} + +func (f RequestStreamingFunc) Call() *agent.Call { return f() } + +// Push prepends one or more calls onto a request stream. If no calls are given then the original stream is returned. +func Push(r RequestStreaming, c ...*agent.Call) RequestStreamingFunc { + return func() *agent.Call { + if len(c) == 0 { + return r.Call() + } + head := c[0] + c = c[1:] + return head + } +} + +// Empty generates a stream that always returns nil. +func Empty() RequestStreamingFunc { return func() *agent.Call { return nil } } + +var ( + _ = Request(RequestFunc(nil)) + _ = RequestStreaming(RequestStreamingFunc(nil)) + _ = Sender(SenderFunc(nil)) +) + +// NonStreaming returns a RequestFunc that always generates the same Call. +func NonStreaming(c *agent.Call) RequestFunc { return func() *agent.Call { return c } } + +// FromChan returns a streaming request that fetches calls from the given channel until it closes. +// If a nil chan is specified then the returned func will always generate nil. +func FromChan(ch <-chan *agent.Call) RequestStreamingFunc { + if ch == nil { + // avoid blocking forever if we're handed a nil chan + return func() *agent.Call { return nil } + } + return func() *agent.Call { + if m, ok := <-ch; ok { + return m + } + return nil + } +} + +// Send implements the Sender interface for SenderFunc +func (f SenderFunc) Send(ctx context.Context, r Request) (mesos.Response, error) { + return f(ctx, r) +} + +// IgnoreResponse generates a sender that closes any non-nil response received by Mesos. +func IgnoreResponse(s Sender) SenderFunc { + return func(ctx context.Context, r Request) (mesos.Response, error) { + resp, err := s.Send(ctx, r) + if resp != nil { + resp.Close() + } + return nil, err + } +} + +// SendNoData is a convenience func that executes the given Call using the provided Sender +// and always drops the response data. +func SendNoData(ctx context.Context, sender Sender, r Request) (err error) { + _, err = IgnoreResponse(sender).Send(ctx, r) + return +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/agent/calls/gen.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/agent/calls/gen.go new file mode 100644 index 00000000..53693c06 --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/agent/calls/gen.go @@ -0,0 +1,3 @@ +package calls + +//go:generate go run ../../extras/gen/sender.go ../../extras/gen/gen.go -import github.com/mesos/mesos-go/api/v1/lib/agent -type C:agent.Call diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/client.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/client.go new file mode 100644 index 00000000..233fe362 --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/client.go @@ -0,0 +1,71 @@ +package mesos + +// DEPRECATED in favor of github.com/mesos/mesos-go/api/v1/lib/client + +import ( + "io" + + "github.com/mesos/mesos-go/api/v1/lib/encoding" +) + +// A Client represents a Mesos API client which can send Calls and return +// a streaming Decoder from which callers can read Events from, an io.Closer to +// close the event stream on graceful termination and an error in case of failure. +type Client interface { + Do(encoding.Marshaler) (Response, error) +} + +// ClientFunc is a functional adapter of the Client interface +type ClientFunc func(encoding.Marshaler) (Response, error) + +// Do implements Client +func (cf ClientFunc) Do(m encoding.Marshaler) (Response, error) { return cf(m) } + +// Response captures the output of a Mesos API operation. Callers are responsible for invoking +// Close when they're finished processing the response otherwise there may be connection leaks. +type Response interface { + io.Closer + encoding.Decoder +} + +// ResponseDecorator optionally modifies the behavior of a Response +type ResponseDecorator interface { + Decorate(Response) Response +} + +// ResponseDecoratorFunc is the functional adapter for ResponseDecorator +type ResponseDecoratorFunc func(Response) Response + +func (f ResponseDecoratorFunc) Decorate(r Response) Response { return f(r) } + +// CloseFunc is the functional adapter for io.Closer +type CloseFunc func() error + +// Close implements io.Closer +func (f CloseFunc) Close() error { return f() } + +// ResponseWrapper delegates to optional overrides for invocations of Response methods. +type ResponseWrapper struct { + Response Response + Closer io.Closer + Decoder encoding.Decoder +} + +func (wrapper *ResponseWrapper) Close() error { + if wrapper.Closer != nil { + return wrapper.Closer.Close() + } + if wrapper.Response != nil { + return wrapper.Response.Close() + } + return nil +} + +func (wrapper *ResponseWrapper) Decode(u encoding.Unmarshaler) error { + if wrapper.Decoder != nil { + return wrapper.Decoder.Decode(u) + } + return wrapper.Response.Decode(u) +} + +var _ = Response(&ResponseWrapper{}) diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/client/client.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/client/client.go new file mode 100644 index 00000000..0f0d0dd8 --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/client/client.go @@ -0,0 +1,54 @@ +package client + +import ( + "github.com/mesos/mesos-go/api/v1/lib/encoding" +) + +type ( + // ResponseClass indicates the kind of response that a caller is expecting from Mesos. + ResponseClass int + + // Request is a non-streaming request from the client to the server. + // Marshaler always returns the same object; the object is sent once to the server and then + // a response is expected. + Request interface { + Marshaler() encoding.Marshaler + } + + // RequestStreaming is a streaming request from the client to the server. + // Marshaler returns a new object for upon each invocation, nil when there are no more objects to send. + // Client implementations are expected to differentiate between Request and RequestStreaming either by + // type-switching or by attempting interface conversion. + RequestStreaming interface { + Request + IsStreaming() + } + + RequestFunc func() encoding.Marshaler + RequestStreamingFunc func() encoding.Marshaler +) + +var ( + _ = Request(RequestFunc(nil)) + _ = RequestStreaming(RequestStreamingFunc(nil)) +) + +func (f RequestFunc) Marshaler() encoding.Marshaler { return f() } +func (f RequestStreamingFunc) Marshaler() encoding.Marshaler { return f() } +func (f RequestStreamingFunc) IsStreaming() {} + +// RequestSingleton generates a non-streaming Request that always returns the same marshaler +func RequestSingleton(m encoding.Marshaler) Request { + return RequestFunc(func() encoding.Marshaler { return m }) +} + +const ( + ResponseClassSingleton ResponseClass = iota + ResponseClassStreaming + ResponseClassNoData + + // ResponseClassAuto should be used with versions of Mesos prior to 1.2.x. + // Otherwise, this type is deprecated and callers should use ResponseClassSingleton + // or ResponseClassStreaming instead. + ResponseClassAuto +) diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/debug/logger.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/debug/logger.go new file mode 100644 index 00000000..571be7d9 --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/debug/logger.go @@ -0,0 +1,17 @@ +package debug + +import "log" + +type Logger bool + +func (d Logger) Log(v ...interface{}) { + if d { + log.Print(v...) + } +} + +func (d Logger) Logf(s string, v ...interface{}) { + if d { + log.Printf(s, v...) + } +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/doc.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/doc.go new file mode 100644 index 00000000..9c749fe3 --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/doc.go @@ -0,0 +1,3 @@ +// Package mesos presents common v1 HTTP API message types in addition to extension APIs that +// aim to simplify use of the machine-generated code. +package mesos diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/codecs/codecs.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/codecs/codecs.go new file mode 100644 index 00000000..bff5aa89 --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/codecs/codecs.go @@ -0,0 +1,33 @@ +package codecs + +import ( + "github.com/mesos/mesos-go/api/v1/lib/encoding" + "github.com/mesos/mesos-go/api/v1/lib/encoding/json" + "github.com/mesos/mesos-go/api/v1/lib/encoding/proto" +) + +const ( + // MediaTypeProtobuf is the Protobuf serialization format media type. + MediaTypeProtobuf = encoding.MediaType("application/x-protobuf") + // MediaTypeJSON is the JSON serialiation format media type. + MediaTypeJSON = encoding.MediaType("application/json") + + NameProtobuf = "protobuf" + NameJSON = "json" +) + +// ByMediaType are pre-configured default Codecs, ready to use OOTB +var ByMediaType = map[encoding.MediaType]encoding.Codec{ + MediaTypeProtobuf: encoding.Codec{ + Name: NameProtobuf, + Type: MediaTypeProtobuf, + NewEncoder: proto.NewEncoder, + NewDecoder: proto.NewDecoder, + }, + MediaTypeJSON: encoding.Codec{ + Name: NameJSON, + Type: MediaTypeJSON, + NewEncoder: json.NewEncoder, + NewDecoder: json.NewDecoder, + }, +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/framing/decoder.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/framing/decoder.go new file mode 100644 index 00000000..51e159c8 --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/framing/decoder.go @@ -0,0 +1,34 @@ +package framing + +type ( + // UnmarshalFunc translates bytes to objects + UnmarshalFunc func([]byte, interface{}) error + + // Decoder reads and decodes Protobuf messages from an io.Reader. + Decoder interface { + // Decode reads the next encoded message from its input and stores it + // in the value pointed to by m. If m isn't a proto.Message, Decode will panic. + Decode(interface{}) error + } + + // DecoderFunc is the functional adaptation of Decoder + DecoderFunc func(interface{}) error +) + +func (f DecoderFunc) Decode(m interface{}) error { return f(m) } + +var _ = Decoder(DecoderFunc(nil)) + +// NewDecoder returns a new Decoder that reads from the given frame Reader. +func NewDecoder(r Reader, uf UnmarshalFunc) DecoderFunc { + return func(m interface{}) error { + // Note: the buf returned by ReadFrame will change over time, it can't be sub-sliced + // and then those sub-slices retained. Examination of generated proto code seems to indicate + // that byte buffers are copied vs. referenced by sub-slice (gogo protoc). + frame, err := r.ReadFrame() + if err != nil { + return err + } + return uf(frame, m) + } +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/framing/framing.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/framing/framing.go new file mode 100644 index 00000000..0e05720b --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/framing/framing.go @@ -0,0 +1,70 @@ +package framing + +import ( + "io" + "io/ioutil" +) + +type Error string + +func (err Error) Error() string { return string(err) } + +const ( + ErrorUnderrun = Error("frame underrun, unexpected EOF") + ErrorBadSize = Error("bad frame size") + ErrorOversizedFrame = Error("oversized frame, max size exceeded") +) + +type ( + // Reader generates data frames from some source, returning io.EOF when the end of the input stream is + // detected. + Reader interface { + ReadFrame() (frame []byte, err error) + } + + // ReaderFunc is the functional adaptation of Reader. + ReaderFunc func() ([]byte, error) + + // Writer sends whole frames to some endpoint; returns io.ErrShortWrite if the frame is only partially written. + Writer interface { + WriteFrame(frame []byte) error + } + + // WriterFunc is the functional adaptation of Writer. + WriterFunc func([]byte) error +) + +func (f ReaderFunc) ReadFrame() ([]byte, error) { return f() } +func (f WriterFunc) WriteFrame(b []byte) error { return f(b) } + +var _ = Reader(ReaderFunc(nil)) +var _ = Writer(WriterFunc(nil)) + +// EOFReaderFunc always returns nil, io.EOF; it implements the ReaderFunc API. +func EOFReaderFunc() ([]byte, error) { return nil, io.EOF } + +var _ = ReaderFunc(EOFReaderFunc) // sanity check + +// ReadAll returns a reader func that returns the complete contents of `r` in a single frame. +// A zero length frame is treated as an "end of stream" condition, returning io.EOF. +func ReadAll(r io.Reader) ReaderFunc { + return func() (b []byte, err error) { + b, err = ioutil.ReadAll(r) + if len(b) == 0 && err == nil { + err = io.EOF + } + return + } +} + +// WriterFor adapts an io.Writer to the Writer interface. All buffers are written to `w` without decoration or +// modification. +func WriterFor(w io.Writer) WriterFunc { + return func(b []byte) error { + n, err := w.Write(b) + if err == nil && n != len(b) { + return io.ErrShortWrite + } + return err + } +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/json/json.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/json/json.go new file mode 100644 index 00000000..d7fc2843 --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/json/json.go @@ -0,0 +1,28 @@ +package json + +import ( + "encoding/json" + + "github.com/mesos/mesos-go/api/v1/lib/encoding" + "github.com/mesos/mesos-go/api/v1/lib/encoding/framing" +) + +// NewEncoder returns a new Encoder of Calls to JSON messages written to +// the given io.Writer. +func NewEncoder(s encoding.Sink) encoding.Encoder { + w := s() + return encoding.EncoderFunc(func(m encoding.Marshaler) error { + b, err := json.Marshal(m) + if err != nil { + return err + } + return w.WriteFrame(b) + }) +} + +// NewDecoder returns a new Decoder of JSON messages read from the given source. +func NewDecoder(s encoding.Source) encoding.Decoder { + r := s() + dec := framing.NewDecoder(r, json.Unmarshal) + return encoding.DecoderFunc(func(u encoding.Unmarshaler) error { return dec.Decode(u) }) +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/proto/doc.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/proto/doc.go new file mode 100644 index 00000000..789cdf87 --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/proto/doc.go @@ -0,0 +1,4 @@ +// Package proto implements protobuf utilities such as functional options to +// construct complex structs and encoders and decoders composable with +// io.ReadWriters. +package proto diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/proto/encoding.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/proto/encoding.go new file mode 100644 index 00000000..4300e490 --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/proto/encoding.go @@ -0,0 +1,30 @@ +package proto + +import ( + "github.com/gogo/protobuf/proto" + "github.com/mesos/mesos-go/api/v1/lib/encoding" + "github.com/mesos/mesos-go/api/v1/lib/encoding/framing" +) + +// NewEncoder returns a new Encoder of Calls to Protobuf messages written to +// the given io.Writer. +func NewEncoder(s encoding.Sink) encoding.Encoder { + w := s() + return encoding.EncoderFunc(func(m encoding.Marshaler) error { + b, err := proto.Marshal(m.(proto.Message)) + if err != nil { + return err + } + return w.WriteFrame(b) + }) +} + +// NewDecoder returns a new Decoder of Protobuf messages read from the given Source. +func NewDecoder(s encoding.Source) encoding.Decoder { + r := s() + var ( + uf = func(b []byte, m interface{}) error { return proto.Unmarshal(b, m.(proto.Message)) } + dec = framing.NewDecoder(r, uf) + ) + return encoding.DecoderFunc(func(u encoding.Unmarshaler) error { return dec.Decode(u) }) +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/types.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/types.go new file mode 100644 index 00000000..75530814 --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/encoding/types.go @@ -0,0 +1,111 @@ +package encoding + +import ( + "encoding/json" + "io" + + pb "github.com/gogo/protobuf/proto" + "github.com/mesos/mesos-go/api/v1/lib/encoding/framing" +) + +type MediaType string + +// ContentType returns the HTTP Content-Type associated with the MediaType +func (m MediaType) ContentType() string { return string(m) } + +type ( + Source func() framing.Reader + Sink func() framing.Writer + + // A Codec composes encoding and decoding of a serialization format. + Codec struct { + Name string + Type MediaType + NewEncoder func(Sink) Encoder + NewDecoder func(Source) Decoder + } + + SourceFactory interface { + NewSource(r io.Reader) Source + } + SourceFactoryFunc func(r io.Reader) Source + + SinkFactory interface { + NewSink(w io.Writer) Sink + } + SinkFactoryFunc func(w io.Writer) Sink +) + +func (f SourceFactoryFunc) NewSource(r io.Reader) Source { return f(r) } + +func (f SinkFactoryFunc) NewSink(w io.Writer) Sink { return f(w) } + +var ( + _ = SourceFactory(SourceFactoryFunc(nil)) + _ = SinkFactory(SinkFactoryFunc(nil)) +) + +// SourceReader returns a Source that buffers all input from the given io.Reader +// and returns the contents in a single frame. +func SourceReader(r io.Reader) Source { + ch := make(chan framing.ReaderFunc, 1) + ch <- framing.ReadAll(r) + return func() framing.Reader { + select { + case f := <-ch: + return f + default: + return framing.ReaderFunc(framing.EOFReaderFunc) + } + } +} + +// SinkWriter returns a Sink that sends a frame to an io.Writer with no decoration. +func SinkWriter(w io.Writer) Sink { return func() framing.Writer { return framing.WriterFor(w) } } + +// String implements the fmt.Stringer interface. +func (c *Codec) String() string { + if c == nil { + return "" + } + return c.Name +} + +type ( + // Marshaler composes the supported marshaling formats. + Marshaler interface { + pb.Marshaler + json.Marshaler + } + // Unmarshaler composes the supporter unmarshaling formats. + Unmarshaler interface { + pb.Unmarshaler + json.Unmarshaler + } + // An Encoder encodes a given Marshaler or returns an error in case of failure. + Encoder interface { + Encode(Marshaler) error + } + + // EncoderFunc is the functional adapter for Encoder + EncoderFunc func(Marshaler) error + + // A Decoder decodes a given Unmarshaler or returns an error in case of failure. + Decoder interface { + Decode(Unmarshaler) error + } + + // DecoderFunc is the functional adapter for Decoder + DecoderFunc func(Unmarshaler) error +) + +// Decode implements the Decoder interface +func (f DecoderFunc) Decode(u Unmarshaler) error { return f(u) } + +// Encode implements the Encoder interface +func (f EncoderFunc) Encode(m Marshaler) error { return f(m) } + +var ( + _ = Encoder(EncoderFunc(nil)) + _ = Decoder(DecoderFunc(nil)) +) diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/filters.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/filters.go new file mode 100644 index 00000000..73cbf588 --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/filters.go @@ -0,0 +1,26 @@ +package mesos + +import "time" + +type FilterOpt func(*Filters) + +func (f *Filters) With(opts ...FilterOpt) *Filters { + for _, o := range opts { + o(f) + } + return f +} + +func RefuseSeconds(d time.Duration) FilterOpt { + return func(f *Filters) { + s := d.Seconds() + f.RefuseSeconds = &s + } +} + +func OptionalFilters(fo ...FilterOpt) *Filters { + if len(fo) == 0 { + return nil + } + return (&Filters{}).With(fo...) +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/fixedpoint.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/fixedpoint.go new file mode 100644 index 00000000..c330309b --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/fixedpoint.go @@ -0,0 +1,35 @@ +package mesos + +// fixed point scalar math from mesos:src/common/values.cpp +// -- +// We manipulate scalar values by converting them from floating point to a +// fixed point representation, doing a calculation, and then converting +// the result back to floating point. We deliberately only preserve three +// decimal digits of precision in the fixed point representation. This +// ensures that client applications see predictable numerical behavior, at +// the expense of sacrificing some precision. + +import "math" + +func convertToFloat64(f int64) float64 { + // NOTE: We do the conversion from fixed point via integer division + // and then modulus, rather than a single floating point division. + // This ensures that we only apply floating point division to inputs + // in the range [0,999], which is easier to check for correctness. + var ( + quotient = float64(f / 1000) + remainder = float64(f%1000) / 1000.0 + ) + return quotient + remainder +} + +func convertToFixed64(f float64) int64 { + return round64(f * 1000) +} + +func round64(f float64) int64 { + if math.Abs(f) < 0.5 { + return 0 + } + return int64(f + math.Copysign(0.5, f)) +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/httpcli/apierrors/apierrors.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/httpcli/apierrors/apierrors.go new file mode 100644 index 00000000..c5d6335b --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/httpcli/apierrors/apierrors.go @@ -0,0 +1,161 @@ +package apierrors + +import ( + "io" + "io/ioutil" + "net/http" +) + +// Code is a Mesos HTTP v1 API response status code +type Code int + +const ( + // MsgNotLeader is returned by Do calls that are sent to a non leading Mesos master. + MsgNotLeader = "call sent to a non-leading master" + // MsgAuth is returned by Do calls that are not successfully authenticated. + MsgAuth = "call not authenticated" + // MsgUnsubscribed is returned by Do calls that are sent before a subscription is established. + MsgUnsubscribed = "no subscription established" + // MsgVersion is returned by Do calls that are sent to an incompatible API version. + MsgVersion = "incompatible API version" + // MsgMalformed is returned by Do calls that are malformed. + MsgMalformed = "malformed request" + // MsgMediaType is returned by Do calls that are sent with an unsupported media type. + MsgMediaType = "unsupported media type" + // MsgRateLimit is returned by Do calls that are rate limited. This is a temporary condition + // that should clear. + MsgRateLimit = "rate limited" + // MsgUnavailable is returned by Do calls that are sent to a master or agent that's in recovery, or + // does not yet realize that it's the leader. This is a temporary condition that should clear. + MsgUnavailable = "mesos server unavailable" + // MsgNotFound could happen if the master or agent libprocess has not yet set up http routes. + MsgNotFound = "mesos http endpoint not found" + + CodeNotLeader = Code(http.StatusTemporaryRedirect) + CodeNotAuthenticated = Code(http.StatusUnauthorized) + CodeUnsubscribed = Code(http.StatusForbidden) + CodeIncompatibleVersion = Code(http.StatusConflict) + CodeMalformedRequest = Code(http.StatusBadRequest) + CodeUnsupportedMediaType = Code(http.StatusNotAcceptable) + CodeRateLimitExceeded = Code(http.StatusTooManyRequests) + CodeMesosUnavailable = Code(http.StatusServiceUnavailable) + CodeNotFound = Code(http.StatusNotFound) + + MaxSizeDetails = 4 * 1024 // MaxSizeDetails limits the length of the details message read from a response body +) + +var ( + // ErrorTable maps HTTP response codes to their respective Mesos v1 API error messages. + ErrorTable = map[Code]string{ + CodeNotLeader: MsgNotLeader, + CodeMalformedRequest: MsgMalformed, + CodeIncompatibleVersion: MsgVersion, + CodeUnsubscribed: MsgUnsubscribed, + CodeNotAuthenticated: MsgAuth, + CodeUnsupportedMediaType: MsgMediaType, + CodeNotFound: MsgNotFound, + CodeMesosUnavailable: MsgUnavailable, + CodeRateLimitExceeded: MsgRateLimit, + } +) + +// Error captures HTTP v1 API error codes and messages generated by Mesos. +type Error struct { + code Code // code is the HTTP response status code generated by Mesos + message string // message briefly summarizes the nature of the error, possibly includes details from Mesos +} + +// IsError returns true for all HTTP status codes that are not considered informational or successful. +func (code Code) IsError() bool { + return code >= 300 +} + +// FromResponse returns an `*Error` for a response containing a status code that indicates an error condition. +// The response body (if any) is captured in the Error.Details field. +// Returns nil for nil responses and responses with non-error status codes. +// See IsErrorCode. +func FromResponse(res *http.Response) error { + if res == nil { + return nil + } + + code := Code(res.StatusCode) + if !code.IsError() { + // non-error HTTP response codes don't generate errors + return nil + } + + var details string + + if res.Body != nil { + defer res.Body.Close() + buf, _ := ioutil.ReadAll(io.LimitReader(res.Body, MaxSizeDetails)) + details = string(buf) + } + + return code.Error(details) +} + +// Error generates an error from the given status code and detail string. +func (code Code) Error(details string) error { + if !code.IsError() { + return nil + } + err := &Error{ + code: code, + message: ErrorTable[code], + } + if details != "" { + err.message = err.message + ": " + details + } + return err +} + +// Error implements error interface +func (e *Error) Error() string { return e.message } + +// Temporary returns true if the error is a temporary condition that should eventually clear. +func (e *Error) Temporary() bool { + switch e.code { + // TODO(jdef): NotFound **could** be a temporary error because there's a race at mesos startup in which the + // HTTP server responds before the internal listeners have been initialized. But it could also be reported + // because the client is accessing an invalid endpoint; as of right now, a client cannot distinguish between + // these cases. + // https://issues.apache.org/jira/browse/MESOS-7697 + case CodeRateLimitExceeded, CodeMesosUnavailable: + return true + default: + return false + } +} + +// CodesIndicatingSubscriptionLoss is a set of apierror.Code entries which each indicate that +// the event subscription stream has been severed between the scheduler and mesos. It's respresented +// as a public map variable so that clients can program additional error codes (if such are discovered) +// without hacking the code of the mesos-go library directly. +var CodesIndicatingSubscriptionLoss = func(codes ...Code) map[Code]struct{} { + result := make(map[Code]struct{}, len(codes)) + for _, code := range codes { + result[code] = struct{}{} + } + return result +}( + // expand this list as we discover other errors that guarantee we've lost our event subscription. + CodeUnsubscribed, +) + +// SubscriptionLoss returns true if the error indicates that the event subscription stream has been severed +// between mesos and a mesos client. +func (e *Error) SubscriptionLoss() (result bool) { + _, result = CodesIndicatingSubscriptionLoss[e.code] + return +} + +// Matches returns true if the given error is an API error with a matching error code +func (code Code) Matches(err error) bool { + if err == nil { + return !code.IsError() + } + apiErr, ok := err.(*Error) + return ok && apiErr.code == code +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/httpcli/auth_basic.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/httpcli/auth_basic.go new file mode 100644 index 00000000..5cad3e9d --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/httpcli/auth_basic.go @@ -0,0 +1,33 @@ +package httpcli + +import ( + "net/http" +) + +// roundTripperFunc is the functional adaptation of http.RoundTripper +type roundTripperFunc func(*http.Request) (*http.Response, error) + +// RoundTrip implements RoundTripper for roundTripperFunc +func (f roundTripperFunc) RoundTrip(req *http.Request) (*http.Response, error) { return f(req) } + +// BasicAuth generates a functional config option that sets HTTP Basic authentication for a Client +func BasicAuth(username, passwd string) ConfigOpt { + // TODO(jdef) this could be more efficient. according to the stdlib we're not supposed to + // mutate the original Request, so we copy here (including headers). another approach would + // be to generate a functional RequestOpt that adds the right header. + return WrapRoundTripper(func(rt http.RoundTripper) http.RoundTripper { + return roundTripperFunc(func(req *http.Request) (*http.Response, error) { + var h http.Header + if req.Header != nil { + h = make(http.Header, len(req.Header)) + for k, v := range req.Header { + h[k] = append(make([]string, 0, len(v)), v...) + } + } + clonedReq := *req + clonedReq.Header = h + clonedReq.SetBasicAuth(username, passwd) + return rt.RoundTrip(&clonedReq) + }) + }) +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/httpcli/http.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/httpcli/http.go new file mode 100644 index 00000000..55bf9649 --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/httpcli/http.go @@ -0,0 +1,614 @@ +package httpcli + +import ( + "bytes" + "context" + "crypto/tls" + "fmt" + "io" + "io/ioutil" + "net" + "net/http" + "sync" + "time" + + "github.com/mesos/mesos-go/api/v1/lib" + "github.com/mesos/mesos-go/api/v1/lib/client" + logger "github.com/mesos/mesos-go/api/v1/lib/debug" + "github.com/mesos/mesos-go/api/v1/lib/encoding" + "github.com/mesos/mesos-go/api/v1/lib/encoding/codecs" + "github.com/mesos/mesos-go/api/v1/lib/encoding/framing" + "github.com/mesos/mesos-go/api/v1/lib/httpcli/apierrors" + "github.com/mesos/mesos-go/api/v1/lib/recordio" +) + +func noRedirect(req *http.Request, via []*http.Request) error { return http.ErrUseLastResponse } + +// ProtocolError is returned when we receive a response from Mesos that is outside of the HTTP API specification. +// Receipt of the following will yield protocol errors: +// - any unexpected non-error HTTP response codes (e.g. 199) +// - any unexpected Content-Type +type ProtocolError string + +// Error implements error interface +func (pe ProtocolError) Error() string { return string(pe) } + +const ( + debug = logger.Logger(false) + mediaTypeRecordIO = encoding.MediaType("application/recordio") +) + +// DoFunc sends an HTTP request and returns an HTTP response. +// +// An error is returned if caused by client policy (such as +// http.Client.CheckRedirect), or if there was an HTTP protocol error. A +// non-2xx response doesn't cause an error. +// +// When err is nil, resp always contains a non-nil resp.Body. +// +// Callers should close resp.Body when done reading from it. If resp.Body is +// not closed, an underlying RoundTripper (typically Transport) may not be able +// to re-use a persistent TCP connection to the server for a subsequent +// "keep-alive" request. +// +// The request Body, if non-nil, will be closed by an underlying Transport, +// even on errors. +type DoFunc func(*http.Request) (*http.Response, error) + +// Response captures the output of a Mesos HTTP API operation. Callers are responsible for invoking +// Close when they're finished processing the response otherwise there may be connection leaks. +type Response struct { + io.Closer + encoding.Decoder + Header http.Header +} + +// ErrorMapperFunc generates an error for the given response. +type ErrorMapperFunc func(*http.Response) error + +// ResponseHandler is invoked to process an HTTP response. Callers SHALL invoke Close for +// a non-nil Response, even when errors are returned. +type ResponseHandler func(*http.Response, client.ResponseClass, error) (mesos.Response, error) + +// A Client is a Mesos HTTP APIs client. +type Client struct { + url string + do DoFunc + header http.Header + codec encoding.Codec + errorMapper ErrorMapperFunc + requestOpts []RequestOpt + buildRequestFunc func(client.Request, client.ResponseClass, ...RequestOpt) (*http.Request, error) + handleResponse ResponseHandler +} + +var ( + DefaultCodec = codecs.ByMediaType[codecs.MediaTypeProtobuf] + DefaultHeaders = http.Header{} + + // DefaultConfigOpt represents the default client config options. + DefaultConfigOpt = []ConfigOpt{ + Transport(func(t *http.Transport) { + // all calls should be ack'd by the server within this interval. + t.ResponseHeaderTimeout = 15 * time.Second + t.MaxIdleConnsPerHost = 2 // don't depend on go's default + }), + } + + DefaultErrorMapper = ErrorMapperFunc(apierrors.FromResponse) +) + +// New returns a new Client with the given Opts applied. +// Callers are expected to configure the URL, Do, and Codec options prior to +// invoking Do. +func New(opts ...Opt) *Client { + c := &Client{ + codec: DefaultCodec, + do: With(DefaultConfigOpt...), + header: cloneHeaders(DefaultHeaders), + errorMapper: DefaultErrorMapper, + } + c.buildRequestFunc = c.buildRequest + c.handleResponse = c.HandleResponse + c.With(opts...) + return c +} + +func cloneHeaders(hs http.Header) http.Header { + result := make(http.Header) + for k, v := range hs { + cloned := make([]string, len(v)) + copy(cloned, v) + result[k] = cloned + } + return result +} + +// Endpoint returns the current Mesos API endpoint URL that the caller is set to invoke +func (c *Client) Endpoint() string { + return c.url +} + +// RequestOpt defines a functional option for an http.Request. +type RequestOpt func(*http.Request) + +// RequestOpts is a convenience type +type RequestOpts []RequestOpt + +// Apply this set of request options to the given HTTP request. +func (opts RequestOpts) Apply(req *http.Request) { + // apply per-request options + for _, o := range opts { + if o != nil { + o(req) + } + } +} + +// With applies the given Opts to a Client and returns itself. +func (c *Client) With(opts ...Opt) Opt { + return Opts(opts).Merged().Apply(c) +} + +// WithTemporary configures the Client with the temporary option and returns the results of +// invoking f(). Changes made to the Client by the temporary option are reverted before this +// func returns. +func (c *Client) WithTemporary(opt Opt, f func() error) error { + if opt != nil { + undo := c.With(opt) + defer c.With(undo) + } + return f() +} + +// Mesos returns a mesos.Client variant backed by this implementation. +// Deprecated. +func (c *Client) Mesos(opts ...RequestOpt) mesos.Client { + return mesos.ClientFunc(func(m encoding.Marshaler) (mesos.Response, error) { + return c.Do(m, opts...) + }) +} + +func prepareForResponse(rc client.ResponseClass, codec encoding.Codec) (RequestOpts, error) { + // We need to tell Mesos both the content-type and message-content-type that we're expecting, otherwise + // the server may give us validation problems, or else send back a vague content-type (w/o a + // message-content-type). In order to communicate these things we need to understand the desired response + // type from the perspective of the caller --> client.ResponseClass. + var accept RequestOpts + switch rc { + case client.ResponseClassSingleton, client.ResponseClassAuto, client.ResponseClassNoData: + accept = append(accept, Header("Accept", codec.Type.ContentType())) + case client.ResponseClassStreaming: + accept = append(accept, Header("Accept", mediaTypeRecordIO.ContentType())) + accept = append(accept, Header("Message-Accept", codec.Type.ContentType())) + default: + return nil, ProtocolError(fmt.Sprintf("illegal response class requested: %v", rc)) + } + return accept, nil +} + +// buildRequest is a factory func that generates and returns an http.Request for the +// given marshaler and request options. +func (c *Client) buildRequest(cr client.Request, rc client.ResponseClass, opt ...RequestOpt) (*http.Request, error) { + if crs, ok := cr.(client.RequestStreaming); ok { + return c.buildRequestStream(crs.Marshaler, rc, opt...) + } + accept, err := prepareForResponse(rc, c.codec) + if err != nil { + return nil, err + } + + //TODO(jdef): use a pool to allocate these (and reduce garbage)? + // .. or else, use a pipe (like streaming does) to avoid the intermediate buffer? + var body bytes.Buffer + if err := c.codec.NewEncoder(encoding.SinkWriter(&body)).Encode(cr.Marshaler()); err != nil { + return nil, err + } + + req, err := http.NewRequest("POST", c.url, &body) + if err != nil { + return nil, err + } + + helper := HTTPRequestHelper{req} + return helper. + withOptions(c.requestOpts, opt). + withHeaders(c.header). + withHeader("Content-Type", c.codec.Type.ContentType()). + withHeader("Accept", c.codec.Type.ContentType()). + withOptions(accept). + Request, nil +} + +func (c *Client) buildRequestStream(f func() encoding.Marshaler, rc client.ResponseClass, opt ...RequestOpt) (*http.Request, error) { + accept, err := prepareForResponse(rc, c.codec) + if err != nil { + return nil, err + } + + var ( + pr, pw = io.Pipe() + enc = c.codec.NewEncoder(func() framing.Writer { return recordio.NewWriter(pw) }) + ) + req, err := http.NewRequest("POST", c.url, pr) + if err != nil { + pw.Close() // ignore error + return nil, err + } + + go func() { + var closeOnce sync.Once + defer closeOnce.Do(func() { + pw.Close() + }) + for { + m := f() + if m == nil { + // no more messages to send; end of the stream + break + } + err := enc.Encode(m) + if err != nil { + closeOnce.Do(func() { + pw.CloseWithError(err) + }) + break + } + } + }() + + helper := HTTPRequestHelper{req} + return helper. + withOptions(c.requestOpts, opt). + withHeaders(c.header). + withHeader("Content-Type", mediaTypeRecordIO.ContentType()). + withHeader("Message-Content-Type", c.codec.Type.ContentType()). + withOptions(accept). + Request, nil +} + +func validateSuccessfulResponse(codec encoding.Codec, res *http.Response, rc client.ResponseClass) error { + switch res.StatusCode { + case http.StatusOK: + ct := res.Header.Get("Content-Type") + switch rc { + case client.ResponseClassNoData: + if ct != "" { + return ProtocolError(fmt.Sprintf("unexpected content type: %q", ct)) + } + case client.ResponseClassSingleton, client.ResponseClassAuto: + if ct != codec.Type.ContentType() { + return ProtocolError(fmt.Sprintf("unexpected content type: %q", ct)) + } + case client.ResponseClassStreaming: + if ct != mediaTypeRecordIO.ContentType() { + return ProtocolError(fmt.Sprintf("unexpected content type: %q", ct)) + } + ct = res.Header.Get("Message-Content-Type") + if ct != codec.Type.ContentType() { + return ProtocolError(fmt.Sprintf("unexpected message content type: %q", ct)) + } + default: + return ProtocolError(fmt.Sprintf("unsupported response-class: %q", rc)) + } + + case http.StatusAccepted: + // nothing to validate, we're not expecting any response entity in this case. + // TODO(jdef) perhaps check Content-Length == 0 here? + } + return nil +} + +func newSourceFactory(rc client.ResponseClass) encoding.SourceFactoryFunc { + switch rc { + case client.ResponseClassNoData: + return nil + case client.ResponseClassSingleton: + return encoding.SourceReader + case client.ResponseClassStreaming, client.ResponseClassAuto: + return recordIOSourceFactory + default: + panic(fmt.Sprintf("unsupported response-class: %q", rc)) + } +} + +func recordIOSourceFactory(r io.Reader) encoding.Source { + return func() framing.Reader { return recordio.NewReader(r) } +} + +// HandleResponse parses an HTTP response from a Mesos service endpoint, transforming the +// raw HTTP response into a mesos.Response. +func (c *Client) HandleResponse(res *http.Response, rc client.ResponseClass, err error) (mesos.Response, error) { + if err != nil { + if res != nil && res.Body != nil { + res.Body.Close() + } + return nil, err + } + + result := &Response{ + Closer: res.Body, + Header: res.Header, + } + if err = c.errorMapper(res); err != nil { + return result, err + } + + err = validateSuccessfulResponse(c.codec, res, rc) + if err != nil { + res.Body.Close() + return nil, err + } + + switch res.StatusCode { + case http.StatusOK: + debug.Log("request OK, decoding response") + + sf := newSourceFactory(rc) + if sf == nil { + if rc != client.ResponseClassNoData { + panic("nil Source for response that expected data") + } + // we don't expect any data. drain the response body and close it (compliant with golang's expectations + // for http/1.1 keepalive support. + defer res.Body.Close() + _, err = io.Copy(ioutil.Discard, res.Body) + return nil, err + } + + result.Decoder = c.codec.NewDecoder(sf.NewSource(res.Body)) + + case http.StatusAccepted: + debug.Log("request Accepted") + + // noop; no decoder for these types of calls + defer res.Body.Close() + _, err = io.Copy(ioutil.Discard, res.Body) + return nil, err + + default: + debug.Log("unexpected HTTP status", res.StatusCode) + + defer res.Body.Close() + io.Copy(ioutil.Discard, res.Body) // intentionally discard any error here + return nil, ProtocolError(fmt.Sprintf("unexpected mesos HTTP response code: %d", res.StatusCode)) + } + + return result, nil +} + +// Do is deprecated in favor of Send. +func (c *Client) Do(m encoding.Marshaler, opt ...RequestOpt) (res mesos.Response, err error) { + return c.Send(client.RequestSingleton(m), client.ResponseClassAuto, opt...) +} + +// Send sends a Call and returns (a) a Response (should be closed when finished) that +// contains a either a streaming or non-streaming Decoder from which callers can read +// objects from, and; (b) an error in case of failure. Callers are expected to *always* +// close a non-nil Response if one is returned. For operations which are successful but +// also for which there are no expected result objects the embedded Decoder will be nil. +// The provided ResponseClass determines whether the client implementation will attempt +// to decode a result as a single obeject or as an object stream. When working with +// versions of Mesos prior to v1.2.x callers MUST use ResponseClassAuto. +func (c *Client) Send(cr client.Request, rc client.ResponseClass, opt ...RequestOpt) (res mesos.Response, err error) { + var ( + hreq *http.Request + hres *http.Response + ) + hreq, err = c.buildRequestFunc(cr, rc, opt...) + if err == nil { + hres, err = c.do(hreq) + res, err = c.handleResponse(hres, rc, err) + } + return +} + +// ErrorMapper returns am Opt that overrides the existing error mapping behavior of the client. +func ErrorMapper(em ErrorMapperFunc) Opt { + return func(c *Client) Opt { + old := c.errorMapper + c.errorMapper = em + return ErrorMapper(old) + } +} + +// Endpoint returns an Opt that sets a Client's URL. +func Endpoint(rawurl string) Opt { + return func(c *Client) Opt { + old := c.url + c.url = rawurl + return Endpoint(old) + } +} + +// WrapDoer returns an Opt that decorates a Client's DoFunc +func WrapDoer(f func(DoFunc) DoFunc) Opt { + return func(c *Client) Opt { + old := c.do + c.do = f(c.do) + return Do(old) + } +} + +// Do returns an Opt that sets a Client's DoFunc +func Do(do DoFunc) Opt { + return func(c *Client) Opt { + old := c.do + c.do = do + return Do(old) + } +} + +// Codec returns an Opt that sets a Client's Codec. +func Codec(codec encoding.Codec) Opt { + return func(c *Client) Opt { + old := c.codec + c.codec = codec + return Codec(old) + } +} + +// DefaultHeader returns an Opt that adds a header to an Client's headers. +func DefaultHeader(k, v string) Opt { + return func(c *Client) Opt { + old, found := c.header[k] + old = append([]string{}, old...) // clone + c.header.Add(k, v) + return func(c *Client) Opt { + if found { + c.header[k] = old + } else { + c.header.Del(k) + } + return DefaultHeader(k, v) + } + } +} + +// HandleResponse returns a functional config option to set the HTTP response handler of the client. +func HandleResponse(f ResponseHandler) Opt { + return func(c *Client) Opt { + old := c.handleResponse + c.handleResponse = f + return HandleResponse(old) + } +} + +// RequestOptions returns an Opt that applies the given set of options to every Client request. +func RequestOptions(opts ...RequestOpt) Opt { + if len(opts) == 0 { + return nil + } + return func(c *Client) Opt { + old := append([]RequestOpt{}, c.requestOpts...) + c.requestOpts = opts + return RequestOptions(old...) + } +} + +// Header returns an RequestOpt that adds a header value to an HTTP requests's header. +func Header(k, v string) RequestOpt { return func(r *http.Request) { r.Header.Add(k, v) } } + +// Close returns a RequestOpt that determines whether to close the underlying connection after sending the request. +func Close(b bool) RequestOpt { return func(r *http.Request) { r.Close = b } } + +// Context returns a RequestOpt that sets the request's Context (ctx must be non-nil) +func Context(ctx context.Context) RequestOpt { + return func(r *http.Request) { + r2 := r.WithContext(ctx) + *r = *r2 + } +} + +type Config struct { + client *http.Client + dialer *net.Dialer + transport *http.Transport +} + +type ConfigOpt func(*Config) + +// With returns a DoFunc that executes HTTP round-trips. +// The default implementation provides reasonable defaults for timeouts: +// keep-alive, connection, request/response read/write, and TLS handshake. +// Callers can customize configuration by specifying one or more ConfigOpt's. +func With(opt ...ConfigOpt) DoFunc { + var ( + dialer = &net.Dialer{ + LocalAddr: &net.TCPAddr{IP: net.IPv4zero}, + KeepAlive: 30 * time.Second, + Timeout: 5 * time.Second, + } + transport = &http.Transport{ + Proxy: http.ProxyFromEnvironment, + Dial: dialer.Dial, + ResponseHeaderTimeout: 5 * time.Second, + TLSClientConfig: &tls.Config{InsecureSkipVerify: false}, + TLSHandshakeTimeout: 5 * time.Second, + } + config = &Config{ + dialer: dialer, + transport: transport, + client: &http.Client{ + Transport: transport, + CheckRedirect: noRedirect, // so we can actually see the 307 redirects + }, + } + ) + for _, o := range opt { + if o != nil { + o(config) + } + } + return config.client.Do +} + +// Timeout returns an ConfigOpt that sets a Config's response header timeout, tls handshake timeout, +// and dialer timeout. +func Timeout(d time.Duration) ConfigOpt { + return func(c *Config) { + c.transport.ResponseHeaderTimeout = d + c.transport.TLSHandshakeTimeout = d + c.dialer.Timeout = d + } +} + +// RoundTripper returns a ConfigOpt that sets a Config's round-tripper. +func RoundTripper(rt http.RoundTripper) ConfigOpt { + return func(c *Config) { + c.client.Transport = rt + } +} + +// TLSConfig returns a ConfigOpt that sets a Config's TLS configuration. +func TLSConfig(tc *tls.Config) ConfigOpt { + return func(c *Config) { + c.transport.TLSClientConfig = tc + } +} + +// Transport returns a ConfigOpt that allows tweaks of the default Config's http.Transport +func Transport(modifyTransport func(*http.Transport)) ConfigOpt { + return func(c *Config) { + if modifyTransport != nil { + modifyTransport(c.transport) + } + } +} + +// WrapRoundTripper allows a caller to customize a configuration's HTTP exchanger. Useful +// for authentication protocols that operate over stock HTTP. +func WrapRoundTripper(f func(http.RoundTripper) http.RoundTripper) ConfigOpt { + return func(c *Config) { + if f != nil { + if rt := f(c.client.Transport); rt != nil { + c.client.Transport = rt + } + } + } +} + +// HTTPRequestHelper wraps an http.Request and provides utility funcs to simplify code elsewhere +type HTTPRequestHelper struct { + *http.Request +} + +func (r *HTTPRequestHelper) withOptions(optsets ...RequestOpts) *HTTPRequestHelper { + for _, opts := range optsets { + opts.Apply(r.Request) + } + return r +} + +func (r *HTTPRequestHelper) withHeaders(hh http.Header) *HTTPRequestHelper { + for k, v := range hh { + r.Header[k] = v + debug.Log("request header " + k + ": " + v[0]) + } + return r +} + +func (r *HTTPRequestHelper) withHeader(key, value string) *HTTPRequestHelper { + r.Header.Set(key, value) + return r +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/httpcli/opts.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/httpcli/opts.go new file mode 100644 index 00000000..c0f3ef2b --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/httpcli/opts.go @@ -0,0 +1,53 @@ +package httpcli + +type ( + // Opt defines a functional option for the HTTP client type. A functional option + // must return an Opt that acts as an "undo" if applied to the same Client. + Opt func(*Client) Opt + // Opts represents a series of functional options + Opts []Opt +) + +// Apply is a nil-safe application of an Opt: if the receiver is nil then this func +// simply returns nil, otherwise it returns the result invoking the receiving Opt +// with the given Client. +func (o Opt) Apply(c *Client) (result Opt) { + if o != nil { + result = o(c) + } + return +} + +// Merged generates a single Opt that applies all the functional options, in-order +func (opts Opts) Merged() Opt { + if len(opts) == 0 { + return nil + } + return func(c *Client) Opt { + var ( + size = len(opts) + undo = make(Opts, size) + ) + size-- // make this a zero-based offset + for i, opt := range opts { + if opt != nil { + undo[size-i] = opt(c) + } + } + return undo.Merged() + } +} + +// And combines two functional options into a single Opt +func (o Opt) And(other Opt) Opt { + if o == nil { + if other == nil { + return nil + } + return other + } + if other == nil { + return o + } + return Opts{o, other}.Merged() +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/labels.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/labels.go new file mode 100644 index 00000000..ecf50553 --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/labels.go @@ -0,0 +1,95 @@ +package mesos + +import ( + "bytes" + "io" +) + +type labelList []Label // convenience type, for working with unwrapped Label slices + +// Equivalent returns true if left and right have the same labels. Order is not important. +func (left *Labels) Equivalent(right *Labels) bool { + return labelList(left.GetLabels()).Equivalent(labelList(right.GetLabels())) +} + +// Equivalent returns true if left and right have the same labels. Order is not important. +func (left labelList) Equivalent(right labelList) bool { + if len(left) != len(right) { + return false + } else { + for i := range left { + found := false + for j := range right { + if left[i].Equivalent(right[j]) { + found = true + break + } + } + if !found { + return false + } + } + return true + } +} + +// Equivalent returns true if left and right represent the same Label. +func (left Label) Equivalent(right Label) bool { + if left.Key != right.Key { + return false + } + if left.Value == nil { + return right.Value == nil + } else { + return right.Value != nil && *left.Value == *right.Value + } +} + +func (left Label) writeTo(w io.Writer) (n int64, err error) { + write := func(s string) { + if err != nil { + return + } + var n2 int + n2, err = io.WriteString(w, s) + n += int64(n2) + } + write(left.Key) + if s := left.GetValue(); s != "" { + write("=") + write(s) + } + return +} + +func (left *Labels) writeTo(w io.Writer) (n int64, err error) { + var ( + lab = left.GetLabels() + n2 int + n3 int64 + ) + for i := range lab { + if i > 0 { + n2, err = io.WriteString(w, ",") + n += int64(n2) + if err != nil { + break + } + } + n3, err = lab[i].writeTo(w) + n += n3 + if err != nil { + break + } + } + return +} + +func (left *Labels) Format() string { + if left == nil { + return "" + } + var b bytes.Buffer + left.writeTo(&b) + return b.String() +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/mesos.pb.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/mesos.pb.go new file mode 100644 index 00000000..0cc0370f --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/mesos.pb.go @@ -0,0 +1,72228 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: mesos.proto + +/* + Package mesos is a generated protocol buffer package. + + It is generated from these files: + mesos.proto + + It has these top-level messages: + FrameworkID + OfferID + AgentID + TaskID + ExecutorID + ContainerID + ResourceProviderID + OperationID + TimeInfo + DurationInfo + Address + URL + Unavailability + MachineID + MachineInfo + FrameworkInfo + CheckInfo + HealthCheck + KillPolicy + CommandInfo + ExecutorInfo + DomainInfo + MasterInfo + AgentInfo + CSIPluginContainerInfo + CSIPluginInfo + ResourceProviderInfo + Value + Attribute + Resource + TrafficControlStatistics + IpStatistics + IcmpStatistics + TcpStatistics + UdpStatistics + SNMPStatistics + DiskStatistics + ResourceStatistics + ResourceUsage + PerfStatistics + Request + Offer + InverseOffer + TaskInfo + TaskGroupInfo + Task + TaskResourceLimitation + UUID + Operation + OperationStatus + CheckStatusInfo + TaskStatus + Filters + Environment + Parameter + Parameters + Credential + Credentials + Secret + RateLimit + RateLimits + Image + MountPropagation + Volume + NetworkInfo + CapabilityInfo + LinuxInfo + RLimitInfo + TTYInfo + ContainerInfo + ContainerStatus + CgroupInfo + Labels + Label + Port + Ports + DiscoveryInfo + WeightInfo + VersionInfo + Flag + Role + Metric + FileInfo + Device + DeviceAccess + DeviceWhitelist +*/ +package mesos + +import proto "github.com/gogo/protobuf/proto" +import fmt "fmt" +import math "math" +import _ "github.com/gogo/protobuf/gogoproto" + +import strconv "strconv" + +import bytes "bytes" + +import strings "strings" +import reflect "reflect" + +import github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" + +import io "io" + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package + +// * +// Status is used to indicate the state of the scheduler and executor +// driver after function calls. +type Status int32 + +const ( + DRIVER_NOT_STARTED Status = 1 + DRIVER_RUNNING Status = 2 + DRIVER_ABORTED Status = 3 + DRIVER_STOPPED Status = 4 +) + +var Status_name = map[int32]string{ + 1: "DRIVER_NOT_STARTED", + 2: "DRIVER_RUNNING", + 3: "DRIVER_ABORTED", + 4: "DRIVER_STOPPED", +} +var Status_value = map[string]int32{ + "DRIVER_NOT_STARTED": 1, + "DRIVER_RUNNING": 2, + "DRIVER_ABORTED": 3, + "DRIVER_STOPPED": 4, +} + +func (x Status) Enum() *Status { + p := new(Status) + *p = x + return p +} +func (x Status) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(Status_name, int32(x)) +} +func (x *Status) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Status_value, data, "Status") + if err != nil { + return err + } + *x = Status(value) + return nil +} +func (Status) EnumDescriptor() ([]byte, []int) { return fileDescriptorMesos, []int{0} } + +// * +// Describes possible task states. IMPORTANT: Mesos assumes tasks that +// enter terminal states (see below) imply the task is no longer +// running and thus clean up any thing associated with the task +// (ultimately offering any resources being consumed by that task to +// another task). +type TaskState int32 + +const ( + TASK_STAGING TaskState = 6 + TASK_STARTING TaskState = 0 + TASK_RUNNING TaskState = 1 + // NOTE: This should only be sent when the framework has + // the TASK_KILLING_STATE capability. + TASK_KILLING TaskState = 8 + // The task finished successfully on its own without external interference. + TASK_FINISHED TaskState = 2 + TASK_FAILED TaskState = 3 + TASK_KILLED TaskState = 4 + TASK_ERROR TaskState = 7 + // In Mesos 1.3, this will only be sent when the framework does NOT + // opt-in to the PARTITION_AWARE capability. + // + // NOTE: This state is not always terminal. For example, tasks might + // transition from TASK_LOST to TASK_RUNNING or other states when a + // partitioned agent re-registers. + TASK_LOST TaskState = 5 + // The task failed to launch because of a transient error. The + // task's executor never started running. Unlike TASK_ERROR, the + // task description is valid -- attempting to launch the task again + // may be successful. + TASK_DROPPED TaskState = 9 + // The task was running on an agent that has lost contact with the + // master, typically due to a network failure or partition. The task + // may or may not still be running. + TASK_UNREACHABLE TaskState = 10 + // The task is no longer running. This can occur if the agent has + // been terminated along with all of its tasks (e.g., the host that + // was running the agent was rebooted). It might also occur if the + // task was terminated due to an agent or containerizer error, or if + // the task was preempted by the QoS controller in an + // oversubscription scenario. + TASK_GONE TaskState = 11 + // The task was running on an agent that the master cannot contact; + // the operator has asserted that the agent has been shutdown, but + // this has not been directly confirmed by the master. If the + // operator is correct, the task is not running and this is a + // terminal state; if the operator is mistaken, the task may still + // be running and might return to RUNNING in the future. + TASK_GONE_BY_OPERATOR TaskState = 12 + // The master has no knowledge of the task. This is typically + // because either (a) the master never had knowledge of the task, or + // (b) the master forgot about the task because it garbage collected + // its metadata about the task. The task may or may not still be + // running. + TASK_UNKNOWN TaskState = 13 +) + +var TaskState_name = map[int32]string{ + 6: "TASK_STAGING", + 0: "TASK_STARTING", + 1: "TASK_RUNNING", + 8: "TASK_KILLING", + 2: "TASK_FINISHED", + 3: "TASK_FAILED", + 4: "TASK_KILLED", + 7: "TASK_ERROR", + 5: "TASK_LOST", + 9: "TASK_DROPPED", + 10: "TASK_UNREACHABLE", + 11: "TASK_GONE", + 12: "TASK_GONE_BY_OPERATOR", + 13: "TASK_UNKNOWN", +} +var TaskState_value = map[string]int32{ + "TASK_STAGING": 6, + "TASK_STARTING": 0, + "TASK_RUNNING": 1, + "TASK_KILLING": 8, + "TASK_FINISHED": 2, + "TASK_FAILED": 3, + "TASK_KILLED": 4, + "TASK_ERROR": 7, + "TASK_LOST": 5, + "TASK_DROPPED": 9, + "TASK_UNREACHABLE": 10, + "TASK_GONE": 11, + "TASK_GONE_BY_OPERATOR": 12, + "TASK_UNKNOWN": 13, +} + +func (x TaskState) Enum() *TaskState { + p := new(TaskState) + *p = x + return p +} +func (x TaskState) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(TaskState_name, int32(x)) +} +func (x *TaskState) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TaskState_value, data, "TaskState") + if err != nil { + return err + } + *x = TaskState(value) + return nil +} +func (TaskState) EnumDescriptor() ([]byte, []int) { return fileDescriptorMesos, []int{1} } + +// * +// Describes possible operation states. +type OperationState int32 + +const ( + // Default value if the enum is not set. See MESOS-4997. + OPERATION_UNSUPPORTED OperationState = 0 + // Initial state. + OPERATION_PENDING OperationState = 1 + // TERMINAL: The operation was successfully applied. + OPERATION_FINISHED OperationState = 2 + // TERMINAL: The operation failed to apply. + OPERATION_FAILED OperationState = 3 + // TERMINAL: The operation description contains an error. + OPERATION_ERROR OperationState = 4 + // TERMINAL: The operation was dropped due to a transient error. + OPERATION_DROPPED OperationState = 5 +) + +var OperationState_name = map[int32]string{ + 0: "OPERATION_UNSUPPORTED", + 1: "OPERATION_PENDING", + 2: "OPERATION_FINISHED", + 3: "OPERATION_FAILED", + 4: "OPERATION_ERROR", + 5: "OPERATION_DROPPED", +} +var OperationState_value = map[string]int32{ + "OPERATION_UNSUPPORTED": 0, + "OPERATION_PENDING": 1, + "OPERATION_FINISHED": 2, + "OPERATION_FAILED": 3, + "OPERATION_ERROR": 4, + "OPERATION_DROPPED": 5, +} + +func (x OperationState) Enum() *OperationState { + p := new(OperationState) + *p = x + return p +} +func (x OperationState) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(OperationState_name, int32(x)) +} +func (x *OperationState) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(OperationState_value, data, "OperationState") + if err != nil { + return err + } + *x = OperationState(value) + return nil +} +func (OperationState) EnumDescriptor() ([]byte, []int) { return fileDescriptorMesos, []int{2} } + +// Describes the several states that a machine can be in. A `Mode` +// applies to a machine and to all associated agents on the machine. +type MachineInfo_Mode int32 + +const ( + // In this mode, a machine is behaving normally; + // offering resources, executing tasks, etc. + UP MachineInfo_Mode = 1 + // In this mode, all agents on the machine are expected to cooperate with + // frameworks to drain resources. In general, draining is done ahead of + // a pending `unavailability`. The resources should be drained so as to + // maximize utilization prior to the maintenance but without knowingly + // violating the frameworks' requirements. + DRAINING MachineInfo_Mode = 2 + // In this mode, a machine is not running any tasks and will not offer + // any of its resources. Agents on the machine will not be allowed to + // register with the master. + DOWN MachineInfo_Mode = 3 +) + +var MachineInfo_Mode_name = map[int32]string{ + 1: "UP", + 2: "DRAINING", + 3: "DOWN", +} +var MachineInfo_Mode_value = map[string]int32{ + "UP": 1, + "DRAINING": 2, + "DOWN": 3, +} + +func (x MachineInfo_Mode) Enum() *MachineInfo_Mode { + p := new(MachineInfo_Mode) + *p = x + return p +} +func (x MachineInfo_Mode) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(MachineInfo_Mode_name, int32(x)) +} +func (x *MachineInfo_Mode) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MachineInfo_Mode_value, data, "MachineInfo_Mode") + if err != nil { + return err + } + *x = MachineInfo_Mode(value) + return nil +} +func (MachineInfo_Mode) EnumDescriptor() ([]byte, []int) { return fileDescriptorMesos, []int{14, 0} } + +type FrameworkInfo_Capability_Type int32 + +const ( + // This must be the first enum value in this list, to + // ensure that if 'type' is not set, the default value + // is UNKNOWN. This enables enum values to be added + // in a backwards-compatible way. See: MESOS-4997. + FrameworkInfo_Capability_UNKNOWN FrameworkInfo_Capability_Type = 0 + // Receive offers with revocable resources. See 'Resource' + // message for details. + FrameworkInfo_Capability_REVOCABLE_RESOURCES FrameworkInfo_Capability_Type = 1 + // Receive the TASK_KILLING TaskState when a task is being + // killed by an executor. The executor will examine this + // capability to determine whether it can send TASK_KILLING. + FrameworkInfo_Capability_TASK_KILLING_STATE FrameworkInfo_Capability_Type = 2 + // Indicates whether the framework is aware of GPU resources. + // Frameworks that are aware of GPU resources are expected to + // avoid placing non-GPU workloads on GPU agents, in order + // to avoid occupying a GPU agent and preventing GPU workloads + // from running! Currently, if a framework is unaware of GPU + // resources, it will not be offered *any* of the resources on + // an agent with GPUs. This restriction is in place because we + // do not have a revocation mechanism that ensures GPU workloads + // can evict GPU agent occupants if necessary. + // + // TODO(bmahler): As we add revocation we can relax the + // restriction here. See MESOS-5634 for more information. + FrameworkInfo_Capability_GPU_RESOURCES FrameworkInfo_Capability_Type = 3 + // Receive offers with resources that are shared. + FrameworkInfo_Capability_SHARED_RESOURCES FrameworkInfo_Capability_Type = 4 + // Indicates that (1) the framework is prepared to handle the + // following TaskStates: TASK_UNREACHABLE, TASK_DROPPED, + // TASK_GONE, TASK_GONE_BY_OPERATOR, and TASK_UNKNOWN, and (2) + // the framework will assume responsibility for managing + // partitioned tasks that reregister with the master. + // + // Frameworks that enable this capability can define how they + // would like to handle partitioned tasks. Frameworks will + // receive TASK_UNREACHABLE for tasks on agents that are + // partitioned from the master. + // + // Without this capability, frameworks will receive TASK_LOST + // for tasks on partitioned agents. + // NOTE: Prior to Mesos 1.5, such tasks will be killed by Mesos + // when the agent reregisters (unless the master has failed over). + // However due to the lack of benefit in maintaining different + // behaviors depending on whether the master has failed over + // (see MESOS-7215), as of 1.5, Mesos will not kill these + // tasks in either case. + FrameworkInfo_Capability_PARTITION_AWARE FrameworkInfo_Capability_Type = 5 + // This expresses the ability for the framework to be + // "multi-tenant" via using the newly introduced `roles` + // field, and examining `Offer.allocation_info` to determine + // which role the offers are being made to. We also + // expect that "single-tenant" schedulers eventually + // provide this and move away from the deprecated + // `role` field. + FrameworkInfo_Capability_MULTI_ROLE FrameworkInfo_Capability_Type = 6 + // This capability has two effects for a framework. + // + // (1) The framework is offered resources in a new format. + // + // The offered resources have the `Resource.reservations` field set + // rather than `Resource.role` and `Resource.reservation`. In short, + // an empty `reservations` field denotes unreserved resources, and + // each `ReservationInfo` in the `reservations` field denotes a + // reservation that refines the previous one. + // + // See the 'Resource Format' section for more details. + // + // (2) The framework can create refined reservations. + // + // A framework can refine an existing reservation via the + // `Resource.reservations` field. For example, a reservation for role + // `eng` can be refined to `eng/front_end`. + // + // See `ReservationInfo.reservations` for more details. + // + // NOTE: Without this capability, a framework is not offered resources + // that have refined reservations. A resource is said to have refined + // reservations if it uses the `Resource.reservations` field, and + // `Resource.reservations_size() > 1`. + FrameworkInfo_Capability_RESERVATION_REFINEMENT FrameworkInfo_Capability_Type = 7 + // Indicates that the framework is prepared to receive offers + // for agents whose region is different from the master's + // region. Network links between hosts in different regions + // typically have higher latency and lower bandwidth than + // network links within a region, so frameworks should be + // careful to only place suitable workloads in remote regions. + // Frameworks that are not region-aware will never receive + // offers for remote agents; region-aware frameworks are assumed + // to implement their own logic to decide which workloads (if + // any) are suitable for placement on remote agents. + FrameworkInfo_Capability_REGION_AWARE FrameworkInfo_Capability_Type = 8 +) + +var FrameworkInfo_Capability_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "REVOCABLE_RESOURCES", + 2: "TASK_KILLING_STATE", + 3: "GPU_RESOURCES", + 4: "SHARED_RESOURCES", + 5: "PARTITION_AWARE", + 6: "MULTI_ROLE", + 7: "RESERVATION_REFINEMENT", + 8: "REGION_AWARE", +} +var FrameworkInfo_Capability_Type_value = map[string]int32{ + "UNKNOWN": 0, + "REVOCABLE_RESOURCES": 1, + "TASK_KILLING_STATE": 2, + "GPU_RESOURCES": 3, + "SHARED_RESOURCES": 4, + "PARTITION_AWARE": 5, + "MULTI_ROLE": 6, + "RESERVATION_REFINEMENT": 7, + "REGION_AWARE": 8, +} + +func (x FrameworkInfo_Capability_Type) Enum() *FrameworkInfo_Capability_Type { + p := new(FrameworkInfo_Capability_Type) + *p = x + return p +} +func (x FrameworkInfo_Capability_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(FrameworkInfo_Capability_Type_name, int32(x)) +} +func (x *FrameworkInfo_Capability_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(FrameworkInfo_Capability_Type_value, data, "FrameworkInfo_Capability_Type") + if err != nil { + return err + } + *x = FrameworkInfo_Capability_Type(value) + return nil +} +func (FrameworkInfo_Capability_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{15, 0, 0} +} + +type CheckInfo_Type int32 + +const ( + CheckInfo_UNKNOWN CheckInfo_Type = 0 + CheckInfo_COMMAND CheckInfo_Type = 1 + CheckInfo_HTTP CheckInfo_Type = 2 + CheckInfo_TCP CheckInfo_Type = 3 +) + +var CheckInfo_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "COMMAND", + 2: "HTTP", + 3: "TCP", +} +var CheckInfo_Type_value = map[string]int32{ + "UNKNOWN": 0, + "COMMAND": 1, + "HTTP": 2, + "TCP": 3, +} + +func (x CheckInfo_Type) Enum() *CheckInfo_Type { + p := new(CheckInfo_Type) + *p = x + return p +} +func (x CheckInfo_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(CheckInfo_Type_name, int32(x)) +} +func (x *CheckInfo_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(CheckInfo_Type_value, data, "CheckInfo_Type") + if err != nil { + return err + } + *x = CheckInfo_Type(value) + return nil +} +func (CheckInfo_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorMesos, []int{16, 0} } + +type HealthCheck_Type int32 + +const ( + HealthCheck_UNKNOWN HealthCheck_Type = 0 + HealthCheck_COMMAND HealthCheck_Type = 1 + HealthCheck_HTTP HealthCheck_Type = 2 + HealthCheck_TCP HealthCheck_Type = 3 +) + +var HealthCheck_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "COMMAND", + 2: "HTTP", + 3: "TCP", +} +var HealthCheck_Type_value = map[string]int32{ + "UNKNOWN": 0, + "COMMAND": 1, + "HTTP": 2, + "TCP": 3, +} + +func (x HealthCheck_Type) Enum() *HealthCheck_Type { + p := new(HealthCheck_Type) + *p = x + return p +} +func (x HealthCheck_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(HealthCheck_Type_name, int32(x)) +} +func (x *HealthCheck_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(HealthCheck_Type_value, data, "HealthCheck_Type") + if err != nil { + return err + } + *x = HealthCheck_Type(value) + return nil +} +func (HealthCheck_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorMesos, []int{17, 0} } + +type ExecutorInfo_Type int32 + +const ( + ExecutorInfo_UNKNOWN ExecutorInfo_Type = 0 + // Mesos provides a simple built-in default executor that frameworks can + // leverage to run shell commands and containers. + // + // NOTES: + // + // 1) `command` must not be set when using a default executor. + // + // 2) Default executor only accepts a *single* `LAUNCH` or `LAUNCH_GROUP` + // operation. + // + // 3) If `container` is set, `container.type` must be `MESOS` + // and `container.mesos.image` must not be set. + ExecutorInfo_DEFAULT ExecutorInfo_Type = 1 + // For frameworks that need custom functionality to run tasks, a `CUSTOM` + // executor can be used. Note that `command` must be set when using a + // `CUSTOM` executor. + ExecutorInfo_CUSTOM ExecutorInfo_Type = 2 +) + +var ExecutorInfo_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "DEFAULT", + 2: "CUSTOM", +} +var ExecutorInfo_Type_value = map[string]int32{ + "UNKNOWN": 0, + "DEFAULT": 1, + "CUSTOM": 2, +} + +func (x ExecutorInfo_Type) Enum() *ExecutorInfo_Type { + p := new(ExecutorInfo_Type) + *p = x + return p +} +func (x ExecutorInfo_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(ExecutorInfo_Type_name, int32(x)) +} +func (x *ExecutorInfo_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(ExecutorInfo_Type_value, data, "ExecutorInfo_Type") + if err != nil { + return err + } + *x = ExecutorInfo_Type(value) + return nil +} +func (ExecutorInfo_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorMesos, []int{20, 0} } + +type MasterInfo_Capability_Type int32 + +const ( + MasterInfo_Capability_UNKNOWN MasterInfo_Capability_Type = 0 + // The master can handle slaves whose state + // changes after re-registering. + MasterInfo_Capability_AGENT_UPDATE MasterInfo_Capability_Type = 1 +) + +var MasterInfo_Capability_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "AGENT_UPDATE", +} +var MasterInfo_Capability_Type_value = map[string]int32{ + "UNKNOWN": 0, + "AGENT_UPDATE": 1, +} + +func (x MasterInfo_Capability_Type) Enum() *MasterInfo_Capability_Type { + p := new(MasterInfo_Capability_Type) + *p = x + return p +} +func (x MasterInfo_Capability_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(MasterInfo_Capability_Type_name, int32(x)) +} +func (x *MasterInfo_Capability_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MasterInfo_Capability_Type_value, data, "MasterInfo_Capability_Type") + if err != nil { + return err + } + *x = MasterInfo_Capability_Type(value) + return nil +} +func (MasterInfo_Capability_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{22, 0, 0} +} + +type AgentInfo_Capability_Type int32 + +const ( + // This must be the first enum value in this list, to + // ensure that if 'type' is not set, the default value + // is UNKNOWN. This enables enum values to be added + // in a backwards-compatible way. See: MESOS-4997. + AgentInfo_Capability_UNKNOWN AgentInfo_Capability_Type = 0 + // This expresses the ability for the agent to be able + // to launch tasks of a 'multi-role' framework. + AgentInfo_Capability_MULTI_ROLE AgentInfo_Capability_Type = 1 + // This expresses the ability for the agent to be able to launch + // tasks, reserve resources, and create volumes using resources + // allocated to a 'hierarchical-role'. + // NOTE: This capability is required specifically for creating + // volumes because a hierchical role includes '/' (slashes) in them. + // Agents with this capability know to transform the '/' (slashes) + // into ' ' (spaces). + AgentInfo_Capability_HIERARCHICAL_ROLE AgentInfo_Capability_Type = 2 + // This capability has three effects for an agent. + // + // (1) The format of the checkpointed resources, and + // the resources reported to master. + // + // These resources are reported in the "pre-reservation-refinement" + // format if none of the resources have refined reservations. If any + // of the resources have refined reservations, they are reported in + // the "post-reservation-refinement" format. The purpose is to allow + // downgrading of an agent as well as communication with a pre-1.4.0 + // master until the reservation refinement feature is actually used. + // + // See the 'Resource Format' section for more details. + // + // (2) The format of the resources reported by the HTTP endpoints. + // + // For resources reported by agent endpoints, the + // "pre-reservation-refinement" format is "injected" if possible. + // That is, resources without refined reservations will have the + // `Resource.role` and `Resource.reservation` set, whereas + // resources with refined reservations will not. + // + // See the 'Resource Format' section for more details. + // + // (3) The ability for the agent to launch tasks, reserve resources, and + // create volumes using resources that have refined reservations. + // + // See `ReservationInfo.reservations` section for more details. + // + // NOTE: Resources are said to have refined reservations if it uses the + // `Resource.reservations` field, and `Resource.reservations_size() > 1`. + AgentInfo_Capability_RESERVATION_REFINEMENT AgentInfo_Capability_Type = 3 + // This expresses the ability for the agent to handle resource + // provider related operations. This includes the following: + // + // (1) The ability to report resources that are provided by some + // local resource providers through the resource provider API. + // + // (2) The ability to provide operation feedback. + AgentInfo_Capability_RESOURCE_PROVIDER AgentInfo_Capability_Type = 4 +) + +var AgentInfo_Capability_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "MULTI_ROLE", + 2: "HIERARCHICAL_ROLE", + 3: "RESERVATION_REFINEMENT", + 4: "RESOURCE_PROVIDER", +} +var AgentInfo_Capability_Type_value = map[string]int32{ + "UNKNOWN": 0, + "MULTI_ROLE": 1, + "HIERARCHICAL_ROLE": 2, + "RESERVATION_REFINEMENT": 3, + "RESOURCE_PROVIDER": 4, +} + +func (x AgentInfo_Capability_Type) Enum() *AgentInfo_Capability_Type { + p := new(AgentInfo_Capability_Type) + *p = x + return p +} +func (x AgentInfo_Capability_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(AgentInfo_Capability_Type_name, int32(x)) +} +func (x *AgentInfo_Capability_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(AgentInfo_Capability_Type_value, data, "AgentInfo_Capability_Type") + if err != nil { + return err + } + *x = AgentInfo_Capability_Type(value) + return nil +} +func (AgentInfo_Capability_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{23, 0, 0} +} + +type CSIPluginContainerInfo_Service int32 + +const ( + CSIPluginContainerInfo_UNKNOWN CSIPluginContainerInfo_Service = 0 + CSIPluginContainerInfo_CONTROLLER_SERVICE CSIPluginContainerInfo_Service = 1 + CSIPluginContainerInfo_NODE_SERVICE CSIPluginContainerInfo_Service = 2 +) + +var CSIPluginContainerInfo_Service_name = map[int32]string{ + 0: "UNKNOWN", + 1: "CONTROLLER_SERVICE", + 2: "NODE_SERVICE", +} +var CSIPluginContainerInfo_Service_value = map[string]int32{ + "UNKNOWN": 0, + "CONTROLLER_SERVICE": 1, + "NODE_SERVICE": 2, +} + +func (x CSIPluginContainerInfo_Service) Enum() *CSIPluginContainerInfo_Service { + p := new(CSIPluginContainerInfo_Service) + *p = x + return p +} +func (x CSIPluginContainerInfo_Service) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(CSIPluginContainerInfo_Service_name, int32(x)) +} +func (x *CSIPluginContainerInfo_Service) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(CSIPluginContainerInfo_Service_value, data, "CSIPluginContainerInfo_Service") + if err != nil { + return err + } + *x = CSIPluginContainerInfo_Service(value) + return nil +} +func (CSIPluginContainerInfo_Service) EnumDescriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{24, 0} +} + +type Value_Type int32 + +const ( + SCALAR Value_Type = 0 + RANGES Value_Type = 1 + SET Value_Type = 2 + TEXT Value_Type = 3 +) + +var Value_Type_name = map[int32]string{ + 0: "SCALAR", + 1: "RANGES", + 2: "SET", + 3: "TEXT", +} +var Value_Type_value = map[string]int32{ + "SCALAR": 0, + "RANGES": 1, + "SET": 2, + "TEXT": 3, +} + +func (x Value_Type) Enum() *Value_Type { + p := new(Value_Type) + *p = x + return p +} +func (x Value_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(Value_Type_name, int32(x)) +} +func (x *Value_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Value_Type_value, data, "Value_Type") + if err != nil { + return err + } + *x = Value_Type(value) + return nil +} +func (Value_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorMesos, []int{27, 0} } + +type Resource_ReservationInfo_Type int32 + +const ( + Resource_ReservationInfo_UNKNOWN Resource_ReservationInfo_Type = 0 + Resource_ReservationInfo_STATIC Resource_ReservationInfo_Type = 1 + Resource_ReservationInfo_DYNAMIC Resource_ReservationInfo_Type = 2 +) + +var Resource_ReservationInfo_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "STATIC", + 2: "DYNAMIC", +} +var Resource_ReservationInfo_Type_value = map[string]int32{ + "UNKNOWN": 0, + "STATIC": 1, + "DYNAMIC": 2, +} + +func (x Resource_ReservationInfo_Type) Enum() *Resource_ReservationInfo_Type { + p := new(Resource_ReservationInfo_Type) + *p = x + return p +} +func (x Resource_ReservationInfo_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(Resource_ReservationInfo_Type_name, int32(x)) +} +func (x *Resource_ReservationInfo_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Resource_ReservationInfo_Type_value, data, "Resource_ReservationInfo_Type") + if err != nil { + return err + } + *x = Resource_ReservationInfo_Type(value) + return nil +} +func (Resource_ReservationInfo_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{29, 1, 0} +} + +type Resource_DiskInfo_Source_Type int32 + +const ( + Resource_DiskInfo_Source_UNKNOWN Resource_DiskInfo_Source_Type = 0 + Resource_DiskInfo_Source_PATH Resource_DiskInfo_Source_Type = 1 + Resource_DiskInfo_Source_MOUNT Resource_DiskInfo_Source_Type = 2 + Resource_DiskInfo_Source_BLOCK Resource_DiskInfo_Source_Type = 3 + Resource_DiskInfo_Source_RAW Resource_DiskInfo_Source_Type = 4 +) + +var Resource_DiskInfo_Source_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "PATH", + 2: "MOUNT", + 3: "BLOCK", + 4: "RAW", +} +var Resource_DiskInfo_Source_Type_value = map[string]int32{ + "UNKNOWN": 0, + "PATH": 1, + "MOUNT": 2, + "BLOCK": 3, + "RAW": 4, +} + +func (x Resource_DiskInfo_Source_Type) Enum() *Resource_DiskInfo_Source_Type { + p := new(Resource_DiskInfo_Source_Type) + *p = x + return p +} +func (x Resource_DiskInfo_Source_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(Resource_DiskInfo_Source_Type_name, int32(x)) +} +func (x *Resource_DiskInfo_Source_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Resource_DiskInfo_Source_Type_value, data, "Resource_DiskInfo_Source_Type") + if err != nil { + return err + } + *x = Resource_DiskInfo_Source_Type(value) + return nil +} +func (Resource_DiskInfo_Source_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{29, 2, 1, 0} +} + +type Offer_Operation_Type int32 + +const ( + Offer_Operation_UNKNOWN Offer_Operation_Type = 0 + Offer_Operation_LAUNCH Offer_Operation_Type = 1 + Offer_Operation_LAUNCH_GROUP Offer_Operation_Type = 6 + Offer_Operation_RESERVE Offer_Operation_Type = 2 + Offer_Operation_UNRESERVE Offer_Operation_Type = 3 + Offer_Operation_CREATE Offer_Operation_Type = 4 + Offer_Operation_DESTROY Offer_Operation_Type = 5 + Offer_Operation_CREATE_VOLUME Offer_Operation_Type = 7 + Offer_Operation_DESTROY_VOLUME Offer_Operation_Type = 8 + Offer_Operation_CREATE_BLOCK Offer_Operation_Type = 9 + Offer_Operation_DESTROY_BLOCK Offer_Operation_Type = 10 +) + +var Offer_Operation_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "LAUNCH", + 6: "LAUNCH_GROUP", + 2: "RESERVE", + 3: "UNRESERVE", + 4: "CREATE", + 5: "DESTROY", + 7: "CREATE_VOLUME", + 8: "DESTROY_VOLUME", + 9: "CREATE_BLOCK", + 10: "DESTROY_BLOCK", +} +var Offer_Operation_Type_value = map[string]int32{ + "UNKNOWN": 0, + "LAUNCH": 1, + "LAUNCH_GROUP": 6, + "RESERVE": 2, + "UNRESERVE": 3, + "CREATE": 4, + "DESTROY": 5, + "CREATE_VOLUME": 7, + "DESTROY_VOLUME": 8, + "CREATE_BLOCK": 9, + "DESTROY_BLOCK": 10, +} + +func (x Offer_Operation_Type) Enum() *Offer_Operation_Type { + p := new(Offer_Operation_Type) + *p = x + return p +} +func (x Offer_Operation_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(Offer_Operation_Type_name, int32(x)) +} +func (x *Offer_Operation_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Offer_Operation_Type_value, data, "Offer_Operation_Type") + if err != nil { + return err + } + *x = Offer_Operation_Type(value) + return nil +} +func (Offer_Operation_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{41, 0, 0} +} + +// Describes the source of the task status update. +type TaskStatus_Source int32 + +const ( + SOURCE_MASTER TaskStatus_Source = 0 + SOURCE_AGENT TaskStatus_Source = 1 + SOURCE_EXECUTOR TaskStatus_Source = 2 +) + +var TaskStatus_Source_name = map[int32]string{ + 0: "SOURCE_MASTER", + 1: "SOURCE_AGENT", + 2: "SOURCE_EXECUTOR", +} +var TaskStatus_Source_value = map[string]int32{ + "SOURCE_MASTER": 0, + "SOURCE_AGENT": 1, + "SOURCE_EXECUTOR": 2, +} + +func (x TaskStatus_Source) Enum() *TaskStatus_Source { + p := new(TaskStatus_Source) + *p = x + return p +} +func (x TaskStatus_Source) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(TaskStatus_Source_name, int32(x)) +} +func (x *TaskStatus_Source) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TaskStatus_Source_value, data, "TaskStatus_Source") + if err != nil { + return err + } + *x = TaskStatus_Source(value) + return nil +} +func (TaskStatus_Source) EnumDescriptor() ([]byte, []int) { return fileDescriptorMesos, []int{51, 0} } + +// Detailed reason for the task status update. +// Refer to docs/task-state-reasons.md for additional explanation. +type TaskStatus_Reason int32 + +const ( + // TODO(jieyu): The default value when a caller doesn't check for + // presence is 0 and so ideally the 0 reason is not a valid one. + // Since this is not used anywhere, consider removing this reason. + REASON_COMMAND_EXECUTOR_FAILED TaskStatus_Reason = 0 + REASON_CONTAINER_LAUNCH_FAILED TaskStatus_Reason = 21 + REASON_CONTAINER_LIMITATION TaskStatus_Reason = 19 + REASON_CONTAINER_LIMITATION_DISK TaskStatus_Reason = 20 + REASON_CONTAINER_LIMITATION_MEMORY TaskStatus_Reason = 8 + REASON_CONTAINER_PREEMPTED TaskStatus_Reason = 17 + REASON_CONTAINER_UPDATE_FAILED TaskStatus_Reason = 22 + REASON_EXECUTOR_REGISTRATION_TIMEOUT TaskStatus_Reason = 23 + REASON_EXECUTOR_REREGISTRATION_TIMEOUT TaskStatus_Reason = 24 + REASON_EXECUTOR_TERMINATED TaskStatus_Reason = 1 + REASON_EXECUTOR_UNREGISTERED TaskStatus_Reason = 2 + REASON_FRAMEWORK_REMOVED TaskStatus_Reason = 3 + REASON_GC_ERROR TaskStatus_Reason = 4 + REASON_INVALID_FRAMEWORKID TaskStatus_Reason = 5 + REASON_INVALID_OFFERS TaskStatus_Reason = 6 + REASON_IO_SWITCHBOARD_EXITED TaskStatus_Reason = 27 + REASON_MASTER_DISCONNECTED TaskStatus_Reason = 7 + REASON_RECONCILIATION TaskStatus_Reason = 9 + REASON_RESOURCES_UNKNOWN TaskStatus_Reason = 18 + REASON_AGENT_DISCONNECTED TaskStatus_Reason = 10 + REASON_AGENT_REMOVED TaskStatus_Reason = 11 + REASON_AGENT_REMOVED_BY_OPERATOR TaskStatus_Reason = 31 + REASON_AGENT_REREGISTERED TaskStatus_Reason = 32 + REASON_AGENT_RESTARTED TaskStatus_Reason = 12 + REASON_AGENT_UNKNOWN TaskStatus_Reason = 13 + REASON_TASK_KILLED_DURING_LAUNCH TaskStatus_Reason = 30 + REASON_TASK_CHECK_STATUS_UPDATED TaskStatus_Reason = 28 + REASON_TASK_HEALTH_CHECK_STATUS_UPDATED TaskStatus_Reason = 29 + REASON_TASK_GROUP_INVALID TaskStatus_Reason = 25 + REASON_TASK_GROUP_UNAUTHORIZED TaskStatus_Reason = 26 + REASON_TASK_INVALID TaskStatus_Reason = 14 + REASON_TASK_UNAUTHORIZED TaskStatus_Reason = 15 + REASON_TASK_UNKNOWN TaskStatus_Reason = 16 +) + +var TaskStatus_Reason_name = map[int32]string{ + 0: "REASON_COMMAND_EXECUTOR_FAILED", + 21: "REASON_CONTAINER_LAUNCH_FAILED", + 19: "REASON_CONTAINER_LIMITATION", + 20: "REASON_CONTAINER_LIMITATION_DISK", + 8: "REASON_CONTAINER_LIMITATION_MEMORY", + 17: "REASON_CONTAINER_PREEMPTED", + 22: "REASON_CONTAINER_UPDATE_FAILED", + 23: "REASON_EXECUTOR_REGISTRATION_TIMEOUT", + 24: "REASON_EXECUTOR_REREGISTRATION_TIMEOUT", + 1: "REASON_EXECUTOR_TERMINATED", + 2: "REASON_EXECUTOR_UNREGISTERED", + 3: "REASON_FRAMEWORK_REMOVED", + 4: "REASON_GC_ERROR", + 5: "REASON_INVALID_FRAMEWORKID", + 6: "REASON_INVALID_OFFERS", + 27: "REASON_IO_SWITCHBOARD_EXITED", + 7: "REASON_MASTER_DISCONNECTED", + 9: "REASON_RECONCILIATION", + 18: "REASON_RESOURCES_UNKNOWN", + 10: "REASON_AGENT_DISCONNECTED", + 11: "REASON_AGENT_REMOVED", + 31: "REASON_AGENT_REMOVED_BY_OPERATOR", + 32: "REASON_AGENT_REREGISTERED", + 12: "REASON_AGENT_RESTARTED", + 13: "REASON_AGENT_UNKNOWN", + 30: "REASON_TASK_KILLED_DURING_LAUNCH", + 28: "REASON_TASK_CHECK_STATUS_UPDATED", + 29: "REASON_TASK_HEALTH_CHECK_STATUS_UPDATED", + 25: "REASON_TASK_GROUP_INVALID", + 26: "REASON_TASK_GROUP_UNAUTHORIZED", + 14: "REASON_TASK_INVALID", + 15: "REASON_TASK_UNAUTHORIZED", + 16: "REASON_TASK_UNKNOWN", +} +var TaskStatus_Reason_value = map[string]int32{ + "REASON_COMMAND_EXECUTOR_FAILED": 0, + "REASON_CONTAINER_LAUNCH_FAILED": 21, + "REASON_CONTAINER_LIMITATION": 19, + "REASON_CONTAINER_LIMITATION_DISK": 20, + "REASON_CONTAINER_LIMITATION_MEMORY": 8, + "REASON_CONTAINER_PREEMPTED": 17, + "REASON_CONTAINER_UPDATE_FAILED": 22, + "REASON_EXECUTOR_REGISTRATION_TIMEOUT": 23, + "REASON_EXECUTOR_REREGISTRATION_TIMEOUT": 24, + "REASON_EXECUTOR_TERMINATED": 1, + "REASON_EXECUTOR_UNREGISTERED": 2, + "REASON_FRAMEWORK_REMOVED": 3, + "REASON_GC_ERROR": 4, + "REASON_INVALID_FRAMEWORKID": 5, + "REASON_INVALID_OFFERS": 6, + "REASON_IO_SWITCHBOARD_EXITED": 27, + "REASON_MASTER_DISCONNECTED": 7, + "REASON_RECONCILIATION": 9, + "REASON_RESOURCES_UNKNOWN": 18, + "REASON_AGENT_DISCONNECTED": 10, + "REASON_AGENT_REMOVED": 11, + "REASON_AGENT_REMOVED_BY_OPERATOR": 31, + "REASON_AGENT_REREGISTERED": 32, + "REASON_AGENT_RESTARTED": 12, + "REASON_AGENT_UNKNOWN": 13, + "REASON_TASK_KILLED_DURING_LAUNCH": 30, + "REASON_TASK_CHECK_STATUS_UPDATED": 28, + "REASON_TASK_HEALTH_CHECK_STATUS_UPDATED": 29, + "REASON_TASK_GROUP_INVALID": 25, + "REASON_TASK_GROUP_UNAUTHORIZED": 26, + "REASON_TASK_INVALID": 14, + "REASON_TASK_UNAUTHORIZED": 15, + "REASON_TASK_UNKNOWN": 16, +} + +func (x TaskStatus_Reason) Enum() *TaskStatus_Reason { + p := new(TaskStatus_Reason) + *p = x + return p +} +func (x TaskStatus_Reason) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(TaskStatus_Reason_name, int32(x)) +} +func (x *TaskStatus_Reason) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(TaskStatus_Reason_value, data, "TaskStatus_Reason") + if err != nil { + return err + } + *x = TaskStatus_Reason(value) + return nil +} +func (TaskStatus_Reason) EnumDescriptor() ([]byte, []int) { return fileDescriptorMesos, []int{51, 1} } + +type Environment_Variable_Type int32 + +const ( + Environment_Variable_UNKNOWN Environment_Variable_Type = 0 + Environment_Variable_VALUE Environment_Variable_Type = 1 + Environment_Variable_SECRET Environment_Variable_Type = 2 +) + +var Environment_Variable_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "VALUE", + 2: "SECRET", +} +var Environment_Variable_Type_value = map[string]int32{ + "UNKNOWN": 0, + "VALUE": 1, + "SECRET": 2, +} + +func (x Environment_Variable_Type) Enum() *Environment_Variable_Type { + p := new(Environment_Variable_Type) + *p = x + return p +} +func (x Environment_Variable_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(Environment_Variable_Type_name, int32(x)) +} +func (x *Environment_Variable_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Environment_Variable_Type_value, data, "Environment_Variable_Type") + if err != nil { + return err + } + *x = Environment_Variable_Type(value) + return nil +} +func (Environment_Variable_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{53, 0, 0} +} + +type Secret_Type int32 + +const ( + Secret_UNKNOWN Secret_Type = 0 + Secret_REFERENCE Secret_Type = 1 + Secret_VALUE Secret_Type = 2 +) + +var Secret_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "REFERENCE", + 2: "VALUE", +} +var Secret_Type_value = map[string]int32{ + "UNKNOWN": 0, + "REFERENCE": 1, + "VALUE": 2, +} + +func (x Secret_Type) Enum() *Secret_Type { + p := new(Secret_Type) + *p = x + return p +} +func (x Secret_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(Secret_Type_name, int32(x)) +} +func (x *Secret_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Secret_Type_value, data, "Secret_Type") + if err != nil { + return err + } + *x = Secret_Type(value) + return nil +} +func (Secret_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorMesos, []int{58, 0} } + +type Image_Type int32 + +const ( + Image_APPC Image_Type = 1 + Image_DOCKER Image_Type = 2 +) + +var Image_Type_name = map[int32]string{ + 1: "APPC", + 2: "DOCKER", +} +var Image_Type_value = map[string]int32{ + "APPC": 1, + "DOCKER": 2, +} + +func (x Image_Type) Enum() *Image_Type { + p := new(Image_Type) + *p = x + return p +} +func (x Image_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(Image_Type_name, int32(x)) +} +func (x *Image_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Image_Type_value, data, "Image_Type") + if err != nil { + return err + } + *x = Image_Type(value) + return nil +} +func (Image_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorMesos, []int{61, 0} } + +type MountPropagation_Mode int32 + +const ( + MountPropagation_UNKNOWN MountPropagation_Mode = 0 + // The volume in a container will receive new mounts from the host + // or other containers, but filesystems mounted inside the + // container won't be propagated to the host or other containers. + // This is currently the default behavior for all volumes. + MountPropagation_HOST_TO_CONTAINER MountPropagation_Mode = 1 + // The volume in a container will receive new mounts from the host + // or other containers, and its own mounts will be propagated from + // the container to the host or other containers. + MountPropagation_BIDIRECTIONAL MountPropagation_Mode = 2 +) + +var MountPropagation_Mode_name = map[int32]string{ + 0: "UNKNOWN", + 1: "HOST_TO_CONTAINER", + 2: "BIDIRECTIONAL", +} +var MountPropagation_Mode_value = map[string]int32{ + "UNKNOWN": 0, + "HOST_TO_CONTAINER": 1, + "BIDIRECTIONAL": 2, +} + +func (x MountPropagation_Mode) Enum() *MountPropagation_Mode { + p := new(MountPropagation_Mode) + *p = x + return p +} +func (x MountPropagation_Mode) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(MountPropagation_Mode_name, int32(x)) +} +func (x *MountPropagation_Mode) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(MountPropagation_Mode_value, data, "MountPropagation_Mode") + if err != nil { + return err + } + *x = MountPropagation_Mode(value) + return nil +} +func (MountPropagation_Mode) EnumDescriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{62, 0} +} + +type Volume_Mode int32 + +const ( + RW Volume_Mode = 1 + RO Volume_Mode = 2 +) + +var Volume_Mode_name = map[int32]string{ + 1: "RW", + 2: "RO", +} +var Volume_Mode_value = map[string]int32{ + "RW": 1, + "RO": 2, +} + +func (x Volume_Mode) Enum() *Volume_Mode { + p := new(Volume_Mode) + *p = x + return p +} +func (x Volume_Mode) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(Volume_Mode_name, int32(x)) +} +func (x *Volume_Mode) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Volume_Mode_value, data, "Volume_Mode") + if err != nil { + return err + } + *x = Volume_Mode(value) + return nil +} +func (Volume_Mode) EnumDescriptor() ([]byte, []int) { return fileDescriptorMesos, []int{63, 0} } + +type Volume_Source_Type int32 + +const ( + // This must be the first enum value in this list, to + // ensure that if 'type' is not set, the default value + // is UNKNOWN. This enables enum values to be added + // in a backwards-compatible way. See: MESOS-4997. + Volume_Source_UNKNOWN Volume_Source_Type = 0 + // TODO(gyliu513): Add IMAGE as volume source type. + Volume_Source_DOCKER_VOLUME Volume_Source_Type = 1 + Volume_Source_HOST_PATH Volume_Source_Type = 4 + Volume_Source_SANDBOX_PATH Volume_Source_Type = 2 + Volume_Source_SECRET Volume_Source_Type = 3 +) + +var Volume_Source_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "DOCKER_VOLUME", + 4: "HOST_PATH", + 2: "SANDBOX_PATH", + 3: "SECRET", +} +var Volume_Source_Type_value = map[string]int32{ + "UNKNOWN": 0, + "DOCKER_VOLUME": 1, + "HOST_PATH": 4, + "SANDBOX_PATH": 2, + "SECRET": 3, +} + +func (x Volume_Source_Type) Enum() *Volume_Source_Type { + p := new(Volume_Source_Type) + *p = x + return p +} +func (x Volume_Source_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(Volume_Source_Type_name, int32(x)) +} +func (x *Volume_Source_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Volume_Source_Type_value, data, "Volume_Source_Type") + if err != nil { + return err + } + *x = Volume_Source_Type(value) + return nil +} +func (Volume_Source_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{63, 0, 0} +} + +type Volume_Source_SandboxPath_Type int32 + +const ( + Volume_Source_SandboxPath_UNKNOWN Volume_Source_SandboxPath_Type = 0 + Volume_Source_SandboxPath_SELF Volume_Source_SandboxPath_Type = 1 + Volume_Source_SandboxPath_PARENT Volume_Source_SandboxPath_Type = 2 +) + +var Volume_Source_SandboxPath_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "SELF", + 2: "PARENT", +} +var Volume_Source_SandboxPath_Type_value = map[string]int32{ + "UNKNOWN": 0, + "SELF": 1, + "PARENT": 2, +} + +func (x Volume_Source_SandboxPath_Type) Enum() *Volume_Source_SandboxPath_Type { + p := new(Volume_Source_SandboxPath_Type) + *p = x + return p +} +func (x Volume_Source_SandboxPath_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(Volume_Source_SandboxPath_Type_name, int32(x)) +} +func (x *Volume_Source_SandboxPath_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(Volume_Source_SandboxPath_Type_value, data, "Volume_Source_SandboxPath_Type") + if err != nil { + return err + } + *x = Volume_Source_SandboxPath_Type(value) + return nil +} +func (Volume_Source_SandboxPath_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{63, 0, 2, 0} +} + +type NetworkInfo_Protocol int32 + +const ( + IPv4 NetworkInfo_Protocol = 1 + IPv6 NetworkInfo_Protocol = 2 +) + +var NetworkInfo_Protocol_name = map[int32]string{ + 1: "IPv4", + 2: "IPv6", +} +var NetworkInfo_Protocol_value = map[string]int32{ + "IPv4": 1, + "IPv6": 2, +} + +func (x NetworkInfo_Protocol) Enum() *NetworkInfo_Protocol { + p := new(NetworkInfo_Protocol) + *p = x + return p +} +func (x NetworkInfo_Protocol) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(NetworkInfo_Protocol_name, int32(x)) +} +func (x *NetworkInfo_Protocol) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(NetworkInfo_Protocol_value, data, "NetworkInfo_Protocol") + if err != nil { + return err + } + *x = NetworkInfo_Protocol(value) + return nil +} +func (NetworkInfo_Protocol) EnumDescriptor() ([]byte, []int) { return fileDescriptorMesos, []int{64, 0} } + +// We start the actual values at an offset(1000) because Protobuf 2 +// uses the first value as the default one. Separating the default +// value from the real first value helps to disambiguate them. This +// is especially valuable for backward compatibility. +// See: MESOS-4997. +type CapabilityInfo_Capability int32 + +const ( + CapabilityInfo_UNKNOWN CapabilityInfo_Capability = 0 + CapabilityInfo_CHOWN CapabilityInfo_Capability = 1000 + CapabilityInfo_DAC_OVERRIDE CapabilityInfo_Capability = 1001 + CapabilityInfo_DAC_READ_SEARCH CapabilityInfo_Capability = 1002 + CapabilityInfo_FOWNER CapabilityInfo_Capability = 1003 + CapabilityInfo_FSETID CapabilityInfo_Capability = 1004 + CapabilityInfo_KILL CapabilityInfo_Capability = 1005 + CapabilityInfo_SETGID CapabilityInfo_Capability = 1006 + CapabilityInfo_SETUID CapabilityInfo_Capability = 1007 + CapabilityInfo_SETPCAP CapabilityInfo_Capability = 1008 + CapabilityInfo_LINUX_IMMUTABLE CapabilityInfo_Capability = 1009 + CapabilityInfo_NET_BIND_SERVICE CapabilityInfo_Capability = 1010 + CapabilityInfo_NET_BROADCAST CapabilityInfo_Capability = 1011 + CapabilityInfo_NET_ADMIN CapabilityInfo_Capability = 1012 + CapabilityInfo_NET_RAW CapabilityInfo_Capability = 1013 + CapabilityInfo_IPC_LOCK CapabilityInfo_Capability = 1014 + CapabilityInfo_IPC_OWNER CapabilityInfo_Capability = 1015 + CapabilityInfo_SYS_MODULE CapabilityInfo_Capability = 1016 + CapabilityInfo_SYS_RAWIO CapabilityInfo_Capability = 1017 + CapabilityInfo_SYS_CHROOT CapabilityInfo_Capability = 1018 + CapabilityInfo_SYS_PTRACE CapabilityInfo_Capability = 1019 + CapabilityInfo_SYS_PACCT CapabilityInfo_Capability = 1020 + CapabilityInfo_SYS_ADMIN CapabilityInfo_Capability = 1021 + CapabilityInfo_SYS_BOOT CapabilityInfo_Capability = 1022 + CapabilityInfo_SYS_NICE CapabilityInfo_Capability = 1023 + CapabilityInfo_SYS_RESOURCE CapabilityInfo_Capability = 1024 + CapabilityInfo_SYS_TIME CapabilityInfo_Capability = 1025 + CapabilityInfo_SYS_TTY_CONFIG CapabilityInfo_Capability = 1026 + CapabilityInfo_MKNOD CapabilityInfo_Capability = 1027 + CapabilityInfo_LEASE CapabilityInfo_Capability = 1028 + CapabilityInfo_AUDIT_WRITE CapabilityInfo_Capability = 1029 + CapabilityInfo_AUDIT_CONTROL CapabilityInfo_Capability = 1030 + CapabilityInfo_SETFCAP CapabilityInfo_Capability = 1031 + CapabilityInfo_MAC_OVERRIDE CapabilityInfo_Capability = 1032 + CapabilityInfo_MAC_ADMIN CapabilityInfo_Capability = 1033 + CapabilityInfo_SYSLOG CapabilityInfo_Capability = 1034 + CapabilityInfo_WAKE_ALARM CapabilityInfo_Capability = 1035 + CapabilityInfo_BLOCK_SUSPEND CapabilityInfo_Capability = 1036 + CapabilityInfo_AUDIT_READ CapabilityInfo_Capability = 1037 +) + +var CapabilityInfo_Capability_name = map[int32]string{ + 0: "UNKNOWN", + 1000: "CHOWN", + 1001: "DAC_OVERRIDE", + 1002: "DAC_READ_SEARCH", + 1003: "FOWNER", + 1004: "FSETID", + 1005: "KILL", + 1006: "SETGID", + 1007: "SETUID", + 1008: "SETPCAP", + 1009: "LINUX_IMMUTABLE", + 1010: "NET_BIND_SERVICE", + 1011: "NET_BROADCAST", + 1012: "NET_ADMIN", + 1013: "NET_RAW", + 1014: "IPC_LOCK", + 1015: "IPC_OWNER", + 1016: "SYS_MODULE", + 1017: "SYS_RAWIO", + 1018: "SYS_CHROOT", + 1019: "SYS_PTRACE", + 1020: "SYS_PACCT", + 1021: "SYS_ADMIN", + 1022: "SYS_BOOT", + 1023: "SYS_NICE", + 1024: "SYS_RESOURCE", + 1025: "SYS_TIME", + 1026: "SYS_TTY_CONFIG", + 1027: "MKNOD", + 1028: "LEASE", + 1029: "AUDIT_WRITE", + 1030: "AUDIT_CONTROL", + 1031: "SETFCAP", + 1032: "MAC_OVERRIDE", + 1033: "MAC_ADMIN", + 1034: "SYSLOG", + 1035: "WAKE_ALARM", + 1036: "BLOCK_SUSPEND", + 1037: "AUDIT_READ", +} +var CapabilityInfo_Capability_value = map[string]int32{ + "UNKNOWN": 0, + "CHOWN": 1000, + "DAC_OVERRIDE": 1001, + "DAC_READ_SEARCH": 1002, + "FOWNER": 1003, + "FSETID": 1004, + "KILL": 1005, + "SETGID": 1006, + "SETUID": 1007, + "SETPCAP": 1008, + "LINUX_IMMUTABLE": 1009, + "NET_BIND_SERVICE": 1010, + "NET_BROADCAST": 1011, + "NET_ADMIN": 1012, + "NET_RAW": 1013, + "IPC_LOCK": 1014, + "IPC_OWNER": 1015, + "SYS_MODULE": 1016, + "SYS_RAWIO": 1017, + "SYS_CHROOT": 1018, + "SYS_PTRACE": 1019, + "SYS_PACCT": 1020, + "SYS_ADMIN": 1021, + "SYS_BOOT": 1022, + "SYS_NICE": 1023, + "SYS_RESOURCE": 1024, + "SYS_TIME": 1025, + "SYS_TTY_CONFIG": 1026, + "MKNOD": 1027, + "LEASE": 1028, + "AUDIT_WRITE": 1029, + "AUDIT_CONTROL": 1030, + "SETFCAP": 1031, + "MAC_OVERRIDE": 1032, + "MAC_ADMIN": 1033, + "SYSLOG": 1034, + "WAKE_ALARM": 1035, + "BLOCK_SUSPEND": 1036, + "AUDIT_READ": 1037, +} + +func (x CapabilityInfo_Capability) Enum() *CapabilityInfo_Capability { + p := new(CapabilityInfo_Capability) + *p = x + return p +} +func (x CapabilityInfo_Capability) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(CapabilityInfo_Capability_name, int32(x)) +} +func (x *CapabilityInfo_Capability) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(CapabilityInfo_Capability_value, data, "CapabilityInfo_Capability") + if err != nil { + return err + } + *x = CapabilityInfo_Capability(value) + return nil +} +func (CapabilityInfo_Capability) EnumDescriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{65, 0} +} + +type RLimitInfo_RLimit_Type int32 + +const ( + RLimitInfo_RLimit_UNKNOWN RLimitInfo_RLimit_Type = 0 + RLimitInfo_RLimit_RLMT_AS RLimitInfo_RLimit_Type = 1 + RLimitInfo_RLimit_RLMT_CORE RLimitInfo_RLimit_Type = 2 + RLimitInfo_RLimit_RLMT_CPU RLimitInfo_RLimit_Type = 3 + RLimitInfo_RLimit_RLMT_DATA RLimitInfo_RLimit_Type = 4 + RLimitInfo_RLimit_RLMT_FSIZE RLimitInfo_RLimit_Type = 5 + RLimitInfo_RLimit_RLMT_LOCKS RLimitInfo_RLimit_Type = 6 + RLimitInfo_RLimit_RLMT_MEMLOCK RLimitInfo_RLimit_Type = 7 + RLimitInfo_RLimit_RLMT_MSGQUEUE RLimitInfo_RLimit_Type = 8 + RLimitInfo_RLimit_RLMT_NICE RLimitInfo_RLimit_Type = 9 + RLimitInfo_RLimit_RLMT_NOFILE RLimitInfo_RLimit_Type = 10 + RLimitInfo_RLimit_RLMT_NPROC RLimitInfo_RLimit_Type = 11 + RLimitInfo_RLimit_RLMT_RSS RLimitInfo_RLimit_Type = 12 + RLimitInfo_RLimit_RLMT_RTPRIO RLimitInfo_RLimit_Type = 13 + RLimitInfo_RLimit_RLMT_RTTIME RLimitInfo_RLimit_Type = 14 + RLimitInfo_RLimit_RLMT_SIGPENDING RLimitInfo_RLimit_Type = 15 + RLimitInfo_RLimit_RLMT_STACK RLimitInfo_RLimit_Type = 16 +) + +var RLimitInfo_RLimit_Type_name = map[int32]string{ + 0: "UNKNOWN", + 1: "RLMT_AS", + 2: "RLMT_CORE", + 3: "RLMT_CPU", + 4: "RLMT_DATA", + 5: "RLMT_FSIZE", + 6: "RLMT_LOCKS", + 7: "RLMT_MEMLOCK", + 8: "RLMT_MSGQUEUE", + 9: "RLMT_NICE", + 10: "RLMT_NOFILE", + 11: "RLMT_NPROC", + 12: "RLMT_RSS", + 13: "RLMT_RTPRIO", + 14: "RLMT_RTTIME", + 15: "RLMT_SIGPENDING", + 16: "RLMT_STACK", +} +var RLimitInfo_RLimit_Type_value = map[string]int32{ + "UNKNOWN": 0, + "RLMT_AS": 1, + "RLMT_CORE": 2, + "RLMT_CPU": 3, + "RLMT_DATA": 4, + "RLMT_FSIZE": 5, + "RLMT_LOCKS": 6, + "RLMT_MEMLOCK": 7, + "RLMT_MSGQUEUE": 8, + "RLMT_NICE": 9, + "RLMT_NOFILE": 10, + "RLMT_NPROC": 11, + "RLMT_RSS": 12, + "RLMT_RTPRIO": 13, + "RLMT_RTTIME": 14, + "RLMT_SIGPENDING": 15, + "RLMT_STACK": 16, +} + +func (x RLimitInfo_RLimit_Type) Enum() *RLimitInfo_RLimit_Type { + p := new(RLimitInfo_RLimit_Type) + *p = x + return p +} +func (x RLimitInfo_RLimit_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(RLimitInfo_RLimit_Type_name, int32(x)) +} +func (x *RLimitInfo_RLimit_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(RLimitInfo_RLimit_Type_value, data, "RLimitInfo_RLimit_Type") + if err != nil { + return err + } + *x = RLimitInfo_RLimit_Type(value) + return nil +} +func (RLimitInfo_RLimit_Type) EnumDescriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{67, 0, 0} +} + +// All container implementation types. +type ContainerInfo_Type int32 + +const ( + ContainerInfo_DOCKER ContainerInfo_Type = 1 + ContainerInfo_MESOS ContainerInfo_Type = 2 +) + +var ContainerInfo_Type_name = map[int32]string{ + 1: "DOCKER", + 2: "MESOS", +} +var ContainerInfo_Type_value = map[string]int32{ + "DOCKER": 1, + "MESOS": 2, +} + +func (x ContainerInfo_Type) Enum() *ContainerInfo_Type { + p := new(ContainerInfo_Type) + *p = x + return p +} +func (x ContainerInfo_Type) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(ContainerInfo_Type_name, int32(x)) +} +func (x *ContainerInfo_Type) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(ContainerInfo_Type_value, data, "ContainerInfo_Type") + if err != nil { + return err + } + *x = ContainerInfo_Type(value) + return nil +} +func (ContainerInfo_Type) EnumDescriptor() ([]byte, []int) { return fileDescriptorMesos, []int{69, 0} } + +// Network options. +type ContainerInfo_DockerInfo_Network int32 + +const ( + ContainerInfo_DockerInfo_HOST ContainerInfo_DockerInfo_Network = 1 + ContainerInfo_DockerInfo_BRIDGE ContainerInfo_DockerInfo_Network = 2 + ContainerInfo_DockerInfo_NONE ContainerInfo_DockerInfo_Network = 3 + ContainerInfo_DockerInfo_USER ContainerInfo_DockerInfo_Network = 4 +) + +var ContainerInfo_DockerInfo_Network_name = map[int32]string{ + 1: "HOST", + 2: "BRIDGE", + 3: "NONE", + 4: "USER", +} +var ContainerInfo_DockerInfo_Network_value = map[string]int32{ + "HOST": 1, + "BRIDGE": 2, + "NONE": 3, + "USER": 4, +} + +func (x ContainerInfo_DockerInfo_Network) Enum() *ContainerInfo_DockerInfo_Network { + p := new(ContainerInfo_DockerInfo_Network) + *p = x + return p +} +func (x ContainerInfo_DockerInfo_Network) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(ContainerInfo_DockerInfo_Network_name, int32(x)) +} +func (x *ContainerInfo_DockerInfo_Network) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(ContainerInfo_DockerInfo_Network_value, data, "ContainerInfo_DockerInfo_Network") + if err != nil { + return err + } + *x = ContainerInfo_DockerInfo_Network(value) + return nil +} +func (ContainerInfo_DockerInfo_Network) EnumDescriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{69, 0, 0} +} + +type CgroupInfo_Blkio_Operation int32 + +const ( + CgroupInfo_Blkio_UNKNOWN CgroupInfo_Blkio_Operation = 0 + CgroupInfo_Blkio_TOTAL CgroupInfo_Blkio_Operation = 1 + CgroupInfo_Blkio_READ CgroupInfo_Blkio_Operation = 2 + CgroupInfo_Blkio_WRITE CgroupInfo_Blkio_Operation = 3 + CgroupInfo_Blkio_SYNC CgroupInfo_Blkio_Operation = 4 + CgroupInfo_Blkio_ASYNC CgroupInfo_Blkio_Operation = 5 +) + +var CgroupInfo_Blkio_Operation_name = map[int32]string{ + 0: "UNKNOWN", + 1: "TOTAL", + 2: "READ", + 3: "WRITE", + 4: "SYNC", + 5: "ASYNC", +} +var CgroupInfo_Blkio_Operation_value = map[string]int32{ + "UNKNOWN": 0, + "TOTAL": 1, + "READ": 2, + "WRITE": 3, + "SYNC": 4, + "ASYNC": 5, +} + +func (x CgroupInfo_Blkio_Operation) Enum() *CgroupInfo_Blkio_Operation { + p := new(CgroupInfo_Blkio_Operation) + *p = x + return p +} +func (x CgroupInfo_Blkio_Operation) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(CgroupInfo_Blkio_Operation_name, int32(x)) +} +func (x *CgroupInfo_Blkio_Operation) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(CgroupInfo_Blkio_Operation_value, data, "CgroupInfo_Blkio_Operation") + if err != nil { + return err + } + *x = CgroupInfo_Blkio_Operation(value) + return nil +} +func (CgroupInfo_Blkio_Operation) EnumDescriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{71, 0, 0} +} + +type DiscoveryInfo_Visibility int32 + +const ( + FRAMEWORK DiscoveryInfo_Visibility = 0 + CLUSTER DiscoveryInfo_Visibility = 1 + EXTERNAL DiscoveryInfo_Visibility = 2 +) + +var DiscoveryInfo_Visibility_name = map[int32]string{ + 0: "FRAMEWORK", + 1: "CLUSTER", + 2: "EXTERNAL", +} +var DiscoveryInfo_Visibility_value = map[string]int32{ + "FRAMEWORK": 0, + "CLUSTER": 1, + "EXTERNAL": 2, +} + +func (x DiscoveryInfo_Visibility) Enum() *DiscoveryInfo_Visibility { + p := new(DiscoveryInfo_Visibility) + *p = x + return p +} +func (x DiscoveryInfo_Visibility) MarshalJSON() ([]byte, error) { + return proto.MarshalJSONEnum(DiscoveryInfo_Visibility_name, int32(x)) +} +func (x *DiscoveryInfo_Visibility) UnmarshalJSON(data []byte) error { + value, err := proto.UnmarshalJSONEnum(DiscoveryInfo_Visibility_value, data, "DiscoveryInfo_Visibility") + if err != nil { + return err + } + *x = DiscoveryInfo_Visibility(value) + return nil +} +func (DiscoveryInfo_Visibility) EnumDescriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{76, 0} +} + +// * +// A unique ID assigned to a framework. A framework can reuse this ID +// in order to do failover (see MesosSchedulerDriver). +type FrameworkID struct { + Value string `protobuf:"bytes,1,req,name=value" json:"value"` +} + +func (m *FrameworkID) Reset() { *m = FrameworkID{} } +func (*FrameworkID) ProtoMessage() {} +func (*FrameworkID) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{0} } + +func (m *FrameworkID) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// * +// A unique ID assigned to an offer. +type OfferID struct { + Value string `protobuf:"bytes,1,req,name=value" json:"value"` +} + +func (m *OfferID) Reset() { *m = OfferID{} } +func (*OfferID) ProtoMessage() {} +func (*OfferID) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{1} } + +func (m *OfferID) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// * +// A unique ID assigned to an agent. Currently, an agent gets a new ID +// whenever it (re)registers with Mesos. Framework writers shouldn't +// assume any binding between an agent ID and and a hostname. +type AgentID struct { + Value string `protobuf:"bytes,1,req,name=value" json:"value"` +} + +func (m *AgentID) Reset() { *m = AgentID{} } +func (*AgentID) ProtoMessage() {} +func (*AgentID) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{2} } + +func (m *AgentID) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// * +// A framework-generated ID to distinguish a task. The ID must remain +// unique while the task is active. A framework can reuse an ID _only_ +// if the previous task with the same ID has reached a terminal state +// (e.g., TASK_FINISHED, TASK_KILLED, etc.). However, reusing task IDs +// is strongly discouraged (MESOS-2198). +type TaskID struct { + Value string `protobuf:"bytes,1,req,name=value" json:"value"` +} + +func (m *TaskID) Reset() { *m = TaskID{} } +func (*TaskID) ProtoMessage() {} +func (*TaskID) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{3} } + +func (m *TaskID) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// * +// A framework-generated ID to distinguish an executor. Only one +// executor with the same ID can be active on the same agent at a +// time. However, reusing executor IDs is discouraged. +type ExecutorID struct { + Value string `protobuf:"bytes,1,req,name=value" json:"value"` +} + +func (m *ExecutorID) Reset() { *m = ExecutorID{} } +func (*ExecutorID) ProtoMessage() {} +func (*ExecutorID) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{4} } + +func (m *ExecutorID) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// * +// ID used to uniquely identify a container. If the `parent` is not +// specified, the ID is a UUID generated by the agent to uniquely +// identify the container of an executor run. If the `parent` field is +// specified, it represents a nested container. +type ContainerID struct { + Value string `protobuf:"bytes,1,req,name=value" json:"value"` + Parent *ContainerID `protobuf:"bytes,2,opt,name=parent" json:"parent,omitempty"` +} + +func (m *ContainerID) Reset() { *m = ContainerID{} } +func (*ContainerID) ProtoMessage() {} +func (*ContainerID) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{5} } + +func (m *ContainerID) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +func (m *ContainerID) GetParent() *ContainerID { + if m != nil { + return m.Parent + } + return nil +} + +// * +// A unique ID assigned to a resource provider. Currently, a resource +// provider gets a new ID whenever it (re)registers with Mesos. +type ResourceProviderID struct { + Value string `protobuf:"bytes,1,req,name=value" json:"value"` +} + +func (m *ResourceProviderID) Reset() { *m = ResourceProviderID{} } +func (*ResourceProviderID) ProtoMessage() {} +func (*ResourceProviderID) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{6} } + +func (m *ResourceProviderID) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// * +// A framework-generated ID to distinguish an operation. The ID +// must be unique within the framework. +type OperationID struct { + Value string `protobuf:"bytes,1,req,name=value" json:"value"` +} + +func (m *OperationID) Reset() { *m = OperationID{} } +func (*OperationID) ProtoMessage() {} +func (*OperationID) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{7} } + +func (m *OperationID) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// * +// Represents time since the epoch, in nanoseconds. +type TimeInfo struct { + Nanoseconds int64 `protobuf:"varint,1,req,name=nanoseconds" json:"nanoseconds"` +} + +func (m *TimeInfo) Reset() { *m = TimeInfo{} } +func (*TimeInfo) ProtoMessage() {} +func (*TimeInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{8} } + +func (m *TimeInfo) GetNanoseconds() int64 { + if m != nil { + return m.Nanoseconds + } + return 0 +} + +// * +// Represents duration in nanoseconds. +type DurationInfo struct { + Nanoseconds int64 `protobuf:"varint,1,req,name=nanoseconds" json:"nanoseconds"` +} + +func (m *DurationInfo) Reset() { *m = DurationInfo{} } +func (*DurationInfo) ProtoMessage() {} +func (*DurationInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{9} } + +func (m *DurationInfo) GetNanoseconds() int64 { + if m != nil { + return m.Nanoseconds + } + return 0 +} + +// * +// A network address. +// +// TODO(bmahler): Use this more widely. +type Address struct { + // May contain a hostname, IP address, or both. + Hostname *string `protobuf:"bytes,1,opt,name=hostname" json:"hostname,omitempty"` + IP *string `protobuf:"bytes,2,opt,name=ip" json:"ip,omitempty"` + Port int32 `protobuf:"varint,3,req,name=port" json:"port"` +} + +func (m *Address) Reset() { *m = Address{} } +func (*Address) ProtoMessage() {} +func (*Address) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{10} } + +func (m *Address) GetHostname() string { + if m != nil && m.Hostname != nil { + return *m.Hostname + } + return "" +} + +func (m *Address) GetIP() string { + if m != nil && m.IP != nil { + return *m.IP + } + return "" +} + +func (m *Address) GetPort() int32 { + if m != nil { + return m.Port + } + return 0 +} + +// * +// Represents a URL. +type URL struct { + Scheme string `protobuf:"bytes,1,req,name=scheme" json:"scheme"` + Address Address `protobuf:"bytes,2,req,name=address" json:"address"` + Path *string `protobuf:"bytes,3,opt,name=path" json:"path,omitempty"` + Query []Parameter `protobuf:"bytes,4,rep,name=query" json:"query"` + Fragment *string `protobuf:"bytes,5,opt,name=fragment" json:"fragment,omitempty"` +} + +func (m *URL) Reset() { *m = URL{} } +func (*URL) ProtoMessage() {} +func (*URL) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{11} } + +func (m *URL) GetScheme() string { + if m != nil { + return m.Scheme + } + return "" +} + +func (m *URL) GetAddress() Address { + if m != nil { + return m.Address + } + return Address{} +} + +func (m *URL) GetPath() string { + if m != nil && m.Path != nil { + return *m.Path + } + return "" +} + +func (m *URL) GetQuery() []Parameter { + if m != nil { + return m.Query + } + return nil +} + +func (m *URL) GetFragment() string { + if m != nil && m.Fragment != nil { + return *m.Fragment + } + return "" +} + +// * +// Represents an interval, from a given start time over a given duration. +// This interval pertains to an unavailability event, such as maintenance, +// and is not a generic interval. +type Unavailability struct { + Start TimeInfo `protobuf:"bytes,1,req,name=start" json:"start"` + // When added to `start`, this represents the end of the interval. + // If unspecified, the duration is assumed to be infinite. + Duration *DurationInfo `protobuf:"bytes,2,opt,name=duration" json:"duration,omitempty"` +} + +func (m *Unavailability) Reset() { *m = Unavailability{} } +func (*Unavailability) ProtoMessage() {} +func (*Unavailability) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{12} } + +func (m *Unavailability) GetStart() TimeInfo { + if m != nil { + return m.Start + } + return TimeInfo{} +} + +func (m *Unavailability) GetDuration() *DurationInfo { + if m != nil { + return m.Duration + } + return nil +} + +// * +// Represents a single machine, which may hold one or more agents. +// +// NOTE: In order to match an agent to a machine, both the `hostname` and +// `ip` must match the values advertised by the agent to the master. +// Hostname is not case-sensitive. +type MachineID struct { + Hostname *string `protobuf:"bytes,1,opt,name=hostname" json:"hostname,omitempty"` + IP *string `protobuf:"bytes,2,opt,name=ip" json:"ip,omitempty"` +} + +func (m *MachineID) Reset() { *m = MachineID{} } +func (*MachineID) ProtoMessage() {} +func (*MachineID) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{13} } + +func (m *MachineID) GetHostname() string { + if m != nil && m.Hostname != nil { + return *m.Hostname + } + return "" +} + +func (m *MachineID) GetIP() string { + if m != nil && m.IP != nil { + return *m.IP + } + return "" +} + +// * +// Holds information about a single machine, its `mode`, and any other +// relevant information which may affect the behavior of the machine. +type MachineInfo struct { + ID MachineID `protobuf:"bytes,1,req,name=id" json:"id"` + Mode *MachineInfo_Mode `protobuf:"varint,2,opt,name=mode,enum=mesos.MachineInfo_Mode" json:"mode,omitempty"` + // Signifies that the machine may be unavailable during the given interval. + // See comments in `Unavailability` and for the `unavailability` fields + // in `Offer` and `InverseOffer` for more information. + Unavailability *Unavailability `protobuf:"bytes,3,opt,name=unavailability" json:"unavailability,omitempty"` +} + +func (m *MachineInfo) Reset() { *m = MachineInfo{} } +func (*MachineInfo) ProtoMessage() {} +func (*MachineInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{14} } + +func (m *MachineInfo) GetID() MachineID { + if m != nil { + return m.ID + } + return MachineID{} +} + +func (m *MachineInfo) GetMode() MachineInfo_Mode { + if m != nil && m.Mode != nil { + return *m.Mode + } + return UP +} + +func (m *MachineInfo) GetUnavailability() *Unavailability { + if m != nil { + return m.Unavailability + } + return nil +} + +// * +// Describes a framework. +type FrameworkInfo struct { + // Used to determine the Unix user that an executor or task should be + // launched as. + // + // When using the MesosSchedulerDriver, if the field is set to an + // empty string, it will automagically set it to the current user. + // + // When using the HTTP Scheduler API, the user has to be set + // explicitly. + User string `protobuf:"bytes,1,req,name=user" json:"user"` + // Name of the framework that shows up in the Mesos Web UI. + Name string `protobuf:"bytes,2,req,name=name" json:"name"` + // Note that 'id' is only available after a framework has + // registered, however, it is included here in order to facilitate + // scheduler failover (i.e., if it is set then the + // MesosSchedulerDriver expects the scheduler is performing + // failover). + ID *FrameworkID `protobuf:"bytes,3,opt,name=id" json:"id,omitempty"` + // The amount of time (in seconds) that the master will wait for the + // scheduler to failover before it tears down the framework by + // killing all its tasks/executors. This should be non-zero if a + // framework expects to reconnect after a failure and not lose its + // tasks/executors. + // + // NOTE: To avoid accidental destruction of tasks, production + // frameworks typically set this to a large value (e.g., 1 week). + FailoverTimeout *float64 `protobuf:"fixed64,4,opt,name=failover_timeout,json=failoverTimeout,def=0" json:"failover_timeout,omitempty"` + // If set, agents running tasks started by this framework will write + // the framework pid, executor pids and status updates to disk. If + // the agent exits (e.g., due to a crash or as part of upgrading + // Mesos), this checkpointed data allows the restarted agent to + // reconnect to executors that were started by the old instance of + // the agent. Enabling checkpointing improves fault tolerance, at + // the cost of a (usually small) increase in disk I/O. + Checkpoint *bool `protobuf:"varint,5,opt,name=checkpoint,def=0" json:"checkpoint,omitempty"` + // Roles are the entities to which allocations are made. + // The framework must have at least one role in order to + // be offered resources. Note that `role` is deprecated + // in favor of `roles` and only one of these fields must + // be used. Since we cannot distinguish between empty + // `roles` and the default unset `role`, we require that + // frameworks set the `MULTI_ROLE` capability if + // setting the `roles` field. + Role *string `protobuf:"bytes,6,opt,name=role,def=*" json:"role,omitempty"` + Roles []string `protobuf:"bytes,12,rep,name=roles" json:"roles,omitempty"` + // Used to indicate the current host from which the scheduler is + // registered in the Mesos Web UI. If set to an empty string Mesos + // will automagically set it to the current hostname if one is + // available. + Hostname *string `protobuf:"bytes,7,opt,name=hostname" json:"hostname,omitempty"` + // This field should match the credential's principal the framework + // uses for authentication. This field is used for framework API + // rate limiting and dynamic reservations. It should be set even + // if authentication is not enabled if these features are desired. + Principal *string `protobuf:"bytes,8,opt,name=principal" json:"principal,omitempty"` + // This field allows a framework to advertise its web UI, so that + // the Mesos web UI can link to it. It is expected to be a full URL, + // for example http://my-scheduler.example.com:8080/. + WebUiURL *string `protobuf:"bytes,9,opt,name=webui_url,json=webuiUrl" json:"webui_url,omitempty"` + // This field allows a framework to advertise its set of + // capabilities (e.g., ability to receive offers for revocable + // resources). + Capabilities []FrameworkInfo_Capability `protobuf:"bytes,10,rep,name=capabilities" json:"capabilities"` + // Labels are free-form key value pairs supplied by the framework + // scheduler (e.g., to describe additional functionality offered by + // the framework). These labels are not interpreted by Mesos itself. + // Labels should not contain duplicate key-value pairs. + Labels *Labels `protobuf:"bytes,11,opt,name=labels" json:"labels,omitempty"` +} + +func (m *FrameworkInfo) Reset() { *m = FrameworkInfo{} } +func (*FrameworkInfo) ProtoMessage() {} +func (*FrameworkInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{15} } + +const Default_FrameworkInfo_FailoverTimeout float64 = 0 +const Default_FrameworkInfo_Checkpoint bool = false +const Default_FrameworkInfo_Role string = "*" + +func (m *FrameworkInfo) GetUser() string { + if m != nil { + return m.User + } + return "" +} + +func (m *FrameworkInfo) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *FrameworkInfo) GetID() *FrameworkID { + if m != nil { + return m.ID + } + return nil +} + +func (m *FrameworkInfo) GetFailoverTimeout() float64 { + if m != nil && m.FailoverTimeout != nil { + return *m.FailoverTimeout + } + return Default_FrameworkInfo_FailoverTimeout +} + +func (m *FrameworkInfo) GetCheckpoint() bool { + if m != nil && m.Checkpoint != nil { + return *m.Checkpoint + } + return Default_FrameworkInfo_Checkpoint +} + +func (m *FrameworkInfo) GetRole() string { + if m != nil && m.Role != nil { + return *m.Role + } + return Default_FrameworkInfo_Role +} + +func (m *FrameworkInfo) GetRoles() []string { + if m != nil { + return m.Roles + } + return nil +} + +func (m *FrameworkInfo) GetHostname() string { + if m != nil && m.Hostname != nil { + return *m.Hostname + } + return "" +} + +func (m *FrameworkInfo) GetPrincipal() string { + if m != nil && m.Principal != nil { + return *m.Principal + } + return "" +} + +func (m *FrameworkInfo) GetWebUiURL() string { + if m != nil && m.WebUiURL != nil { + return *m.WebUiURL + } + return "" +} + +func (m *FrameworkInfo) GetCapabilities() []FrameworkInfo_Capability { + if m != nil { + return m.Capabilities + } + return nil +} + +func (m *FrameworkInfo) GetLabels() *Labels { + if m != nil { + return m.Labels + } + return nil +} + +type FrameworkInfo_Capability struct { + // Enum fields should be optional, see: MESOS-4997. + Type FrameworkInfo_Capability_Type `protobuf:"varint,1,opt,name=type,enum=mesos.FrameworkInfo_Capability_Type" json:"type"` +} + +func (m *FrameworkInfo_Capability) Reset() { *m = FrameworkInfo_Capability{} } +func (*FrameworkInfo_Capability) ProtoMessage() {} +func (*FrameworkInfo_Capability) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{15, 0} +} + +func (m *FrameworkInfo_Capability) GetType() FrameworkInfo_Capability_Type { + if m != nil { + return m.Type + } + return FrameworkInfo_Capability_UNKNOWN +} + +// * +// Describes a general non-interpreting non-killing check for a task or +// executor (or any arbitrary process/command). A type is picked by +// specifying one of the optional fields. Specifying more than one type +// is an error. +// +// NOTE: This API is unstable and the related feature is experimental. +type CheckInfo struct { + // The type of the check. + Type CheckInfo_Type `protobuf:"varint,1,opt,name=type,enum=mesos.CheckInfo_Type" json:"type"` + // Command check. + Command *CheckInfo_Command `protobuf:"bytes,2,opt,name=command" json:"command,omitempty"` + // HTTP check. + HTTP *CheckInfo_Http `protobuf:"bytes,3,opt,name=http" json:"http,omitempty"` + // TCP check. + TCP *CheckInfo_Tcp `protobuf:"bytes,7,opt,name=tcp" json:"tcp,omitempty"` + // Amount of time to wait to start checking the task after it + // transitions to `TASK_RUNNING` or `TASK_STARTING` if the latter + // is used by the executor. + DelaySeconds *float64 `protobuf:"fixed64,4,opt,name=delay_seconds,json=delaySeconds,def=15" json:"delay_seconds,omitempty"` + // Interval between check attempts, i.e., amount of time to wait after + // the previous check finished or timed out to start the next check. + IntervalSeconds *float64 `protobuf:"fixed64,5,opt,name=interval_seconds,json=intervalSeconds,def=10" json:"interval_seconds,omitempty"` + // Amount of time to wait for the check to complete. Zero means infinite + // timeout. + // + // After this timeout, the check attempt is aborted and no result is + // reported. Note that this may be considered a state change and hence + // may trigger a check status change delivery to the corresponding + // scheduler. See `CheckStatusInfo` for more details. + TimeoutSeconds *float64 `protobuf:"fixed64,6,opt,name=timeout_seconds,json=timeoutSeconds,def=20" json:"timeout_seconds,omitempty"` +} + +func (m *CheckInfo) Reset() { *m = CheckInfo{} } +func (*CheckInfo) ProtoMessage() {} +func (*CheckInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{16} } + +const Default_CheckInfo_DelaySeconds float64 = 15 +const Default_CheckInfo_IntervalSeconds float64 = 10 +const Default_CheckInfo_TimeoutSeconds float64 = 20 + +func (m *CheckInfo) GetType() CheckInfo_Type { + if m != nil { + return m.Type + } + return CheckInfo_UNKNOWN +} + +func (m *CheckInfo) GetCommand() *CheckInfo_Command { + if m != nil { + return m.Command + } + return nil +} + +func (m *CheckInfo) GetHTTP() *CheckInfo_Http { + if m != nil { + return m.HTTP + } + return nil +} + +func (m *CheckInfo) GetTCP() *CheckInfo_Tcp { + if m != nil { + return m.TCP + } + return nil +} + +func (m *CheckInfo) GetDelaySeconds() float64 { + if m != nil && m.DelaySeconds != nil { + return *m.DelaySeconds + } + return Default_CheckInfo_DelaySeconds +} + +func (m *CheckInfo) GetIntervalSeconds() float64 { + if m != nil && m.IntervalSeconds != nil { + return *m.IntervalSeconds + } + return Default_CheckInfo_IntervalSeconds +} + +func (m *CheckInfo) GetTimeoutSeconds() float64 { + if m != nil && m.TimeoutSeconds != nil { + return *m.TimeoutSeconds + } + return Default_CheckInfo_TimeoutSeconds +} + +// Describes a command check. If applicable, enters mount and/or network +// namespaces of the task. +type CheckInfo_Command struct { + Command CommandInfo `protobuf:"bytes,1,req,name=command" json:"command"` +} + +func (m *CheckInfo_Command) Reset() { *m = CheckInfo_Command{} } +func (*CheckInfo_Command) ProtoMessage() {} +func (*CheckInfo_Command) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{16, 0} } + +func (m *CheckInfo_Command) GetCommand() CommandInfo { + if m != nil { + return m.Command + } + return CommandInfo{} +} + +// Describes an HTTP check. Sends a GET request to +// http://:port/path. Note that is not configurable and is +// resolved automatically to 127.0.0.1. +type CheckInfo_Http struct { + // Port to send the HTTP request. + Port uint32 `protobuf:"varint,1,req,name=port" json:"port"` + // HTTP request path. + Path *string `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"` +} + +func (m *CheckInfo_Http) Reset() { *m = CheckInfo_Http{} } +func (*CheckInfo_Http) ProtoMessage() {} +func (*CheckInfo_Http) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{16, 1} } + +func (m *CheckInfo_Http) GetPort() uint32 { + if m != nil { + return m.Port + } + return 0 +} + +func (m *CheckInfo_Http) GetPath() string { + if m != nil && m.Path != nil { + return *m.Path + } + return "" +} + +// Describes a TCP check, i.e. based on establishing a TCP connection to +// the specified port. Note that is not configurable and is resolved +// automatically to 127.0.0.1. +type CheckInfo_Tcp struct { + Port uint32 `protobuf:"varint,1,req,name=port" json:"port"` +} + +func (m *CheckInfo_Tcp) Reset() { *m = CheckInfo_Tcp{} } +func (*CheckInfo_Tcp) ProtoMessage() {} +func (*CheckInfo_Tcp) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{16, 2} } + +func (m *CheckInfo_Tcp) GetPort() uint32 { + if m != nil { + return m.Port + } + return 0 +} + +// * +// Describes a health check for a task or executor (or any arbitrary +// process/command). A type is picked by specifying one of the +// optional fields. Specifying more than one type is an error. +type HealthCheck struct { + // Amount of time to wait to start health checking the task after it + // transitions to `TASK_RUNNING` or `TASK_STATING` if the latter is + // used by the executor. + DelaySeconds *float64 `protobuf:"fixed64,2,opt,name=delay_seconds,json=delaySeconds,def=15" json:"delay_seconds,omitempty"` + // Interval between health checks, i.e., amount of time to wait after + // the previous health check finished or timed out to start the next + // health check. + IntervalSeconds *float64 `protobuf:"fixed64,3,opt,name=interval_seconds,json=intervalSeconds,def=10" json:"interval_seconds,omitempty"` + // Amount of time to wait for the health check to complete. After this + // timeout, the health check is aborted and treated as a failure. Zero + // means infinite timeout. + TimeoutSeconds *float64 `protobuf:"fixed64,4,opt,name=timeout_seconds,json=timeoutSeconds,def=20" json:"timeout_seconds,omitempty"` + // Number of consecutive failures until the task is killed by the executor. + ConsecutiveFailures *uint32 `protobuf:"varint,5,opt,name=consecutive_failures,json=consecutiveFailures,def=3" json:"consecutive_failures,omitempty"` + // Amount of time after the task is launched during which health check + // failures are ignored. Once a check succeeds for the first time, + // the grace period does not apply anymore. Note that it includes + // `delay_seconds`, i.e., setting `grace_period_seconds` < `delay_seconds` + // has no effect. + GracePeriodSeconds *float64 `protobuf:"fixed64,6,opt,name=grace_period_seconds,json=gracePeriodSeconds,def=10" json:"grace_period_seconds,omitempty"` + // The type of health check. + Type HealthCheck_Type `protobuf:"varint,8,opt,name=type,enum=mesos.HealthCheck_Type" json:"type"` + // Command health check. + Command *CommandInfo `protobuf:"bytes,7,opt,name=command" json:"command,omitempty"` + // HTTP health check. + HTTP *HealthCheck_HTTPCheckInfo `protobuf:"bytes,1,opt,name=http" json:"http,omitempty"` + // TCP health check. + TCP *HealthCheck_TCPCheckInfo `protobuf:"bytes,9,opt,name=tcp" json:"tcp,omitempty"` +} + +func (m *HealthCheck) Reset() { *m = HealthCheck{} } +func (*HealthCheck) ProtoMessage() {} +func (*HealthCheck) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{17} } + +const Default_HealthCheck_DelaySeconds float64 = 15 +const Default_HealthCheck_IntervalSeconds float64 = 10 +const Default_HealthCheck_TimeoutSeconds float64 = 20 +const Default_HealthCheck_ConsecutiveFailures uint32 = 3 +const Default_HealthCheck_GracePeriodSeconds float64 = 10 + +func (m *HealthCheck) GetDelaySeconds() float64 { + if m != nil && m.DelaySeconds != nil { + return *m.DelaySeconds + } + return Default_HealthCheck_DelaySeconds +} + +func (m *HealthCheck) GetIntervalSeconds() float64 { + if m != nil && m.IntervalSeconds != nil { + return *m.IntervalSeconds + } + return Default_HealthCheck_IntervalSeconds +} + +func (m *HealthCheck) GetTimeoutSeconds() float64 { + if m != nil && m.TimeoutSeconds != nil { + return *m.TimeoutSeconds + } + return Default_HealthCheck_TimeoutSeconds +} + +func (m *HealthCheck) GetConsecutiveFailures() uint32 { + if m != nil && m.ConsecutiveFailures != nil { + return *m.ConsecutiveFailures + } + return Default_HealthCheck_ConsecutiveFailures +} + +func (m *HealthCheck) GetGracePeriodSeconds() float64 { + if m != nil && m.GracePeriodSeconds != nil { + return *m.GracePeriodSeconds + } + return Default_HealthCheck_GracePeriodSeconds +} + +func (m *HealthCheck) GetType() HealthCheck_Type { + if m != nil { + return m.Type + } + return HealthCheck_UNKNOWN +} + +func (m *HealthCheck) GetCommand() *CommandInfo { + if m != nil { + return m.Command + } + return nil +} + +func (m *HealthCheck) GetHTTP() *HealthCheck_HTTPCheckInfo { + if m != nil { + return m.HTTP + } + return nil +} + +func (m *HealthCheck) GetTCP() *HealthCheck_TCPCheckInfo { + if m != nil { + return m.TCP + } + return nil +} + +// Describes an HTTP health check. Sends a GET request to +// scheme://:port/path. Note that is not configurable and is +// resolved automatically, in most cases to 127.0.0.1. Default executors +// treat return codes between 200 and 399 as success; custom executors +// may employ a different strategy, e.g. leveraging the `statuses` field. +type HealthCheck_HTTPCheckInfo struct { + Protocol *NetworkInfo_Protocol `protobuf:"varint,5,opt,name=protocol,enum=mesos.NetworkInfo_Protocol,def=1" json:"protocol,omitempty"` + // Currently "http" and "https" are supported. + Scheme *string `protobuf:"bytes,3,opt,name=scheme" json:"scheme,omitempty"` + // Port to send the HTTP request. + Port uint32 `protobuf:"varint,1,req,name=port" json:"port"` + // HTTP request path. + Path *string `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"` + // NOTE: It is up to the custom executor to interpret and act on this + // field. Setting this field has no effect on the default executors. + // + // TODO(haosdent): Deprecate this field when we add better support for + // success and possibly failure statuses, e.g. ranges of success and + // failure statuses. + Statuses []uint32 `protobuf:"varint,4,rep,name=statuses" json:"statuses,omitempty"` +} + +func (m *HealthCheck_HTTPCheckInfo) Reset() { *m = HealthCheck_HTTPCheckInfo{} } +func (*HealthCheck_HTTPCheckInfo) ProtoMessage() {} +func (*HealthCheck_HTTPCheckInfo) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{17, 0} +} + +const Default_HealthCheck_HTTPCheckInfo_Protocol NetworkInfo_Protocol = IPv4 + +func (m *HealthCheck_HTTPCheckInfo) GetProtocol() NetworkInfo_Protocol { + if m != nil && m.Protocol != nil { + return *m.Protocol + } + return Default_HealthCheck_HTTPCheckInfo_Protocol +} + +func (m *HealthCheck_HTTPCheckInfo) GetScheme() string { + if m != nil && m.Scheme != nil { + return *m.Scheme + } + return "" +} + +func (m *HealthCheck_HTTPCheckInfo) GetPort() uint32 { + if m != nil { + return m.Port + } + return 0 +} + +func (m *HealthCheck_HTTPCheckInfo) GetPath() string { + if m != nil && m.Path != nil { + return *m.Path + } + return "" +} + +func (m *HealthCheck_HTTPCheckInfo) GetStatuses() []uint32 { + if m != nil { + return m.Statuses + } + return nil +} + +// Describes a TCP health check, i.e. based on establishing +// a TCP connection to the specified port. +type HealthCheck_TCPCheckInfo struct { + Protocol *NetworkInfo_Protocol `protobuf:"varint,2,opt,name=protocol,enum=mesos.NetworkInfo_Protocol,def=1" json:"protocol,omitempty"` + // Port expected to be open. + Port uint32 `protobuf:"varint,1,req,name=port" json:"port"` +} + +func (m *HealthCheck_TCPCheckInfo) Reset() { *m = HealthCheck_TCPCheckInfo{} } +func (*HealthCheck_TCPCheckInfo) ProtoMessage() {} +func (*HealthCheck_TCPCheckInfo) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{17, 1} +} + +const Default_HealthCheck_TCPCheckInfo_Protocol NetworkInfo_Protocol = IPv4 + +func (m *HealthCheck_TCPCheckInfo) GetProtocol() NetworkInfo_Protocol { + if m != nil && m.Protocol != nil { + return *m.Protocol + } + return Default_HealthCheck_TCPCheckInfo_Protocol +} + +func (m *HealthCheck_TCPCheckInfo) GetPort() uint32 { + if m != nil { + return m.Port + } + return 0 +} + +// * +// Describes a kill policy for a task. Currently does not express +// different policies (e.g. hitting HTTP endpoints), only controls +// how long to wait between graceful and forcible task kill: +// +// graceful kill --------------> forcible kill +// grace_period +// +// Kill policies are best-effort, because machine failures / forcible +// terminations may occur. +// +// NOTE: For executor-less command-based tasks, the kill is performed +// via sending a signal to the task process: SIGTERM for the graceful +// kill and SIGKILL for the forcible kill. For the docker executor-less +// tasks the grace period is passed to 'docker stop --time'. +type KillPolicy struct { + // The grace period specifies how long to wait before forcibly + // killing the task. It is recommended to attempt to gracefully + // kill the task (and send TASK_KILLING) to indicate that the + // graceful kill is in progress. Once the grace period elapses, + // if the task has not terminated, a forcible kill should occur. + // The task should not assume that it will always be allotted + // the full grace period. For example, the executor may be + // shutdown more quickly by the agent, or failures / forcible + // terminations may occur. + GracePeriod *DurationInfo `protobuf:"bytes,1,opt,name=grace_period,json=gracePeriod" json:"grace_period,omitempty"` +} + +func (m *KillPolicy) Reset() { *m = KillPolicy{} } +func (*KillPolicy) ProtoMessage() {} +func (*KillPolicy) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{18} } + +func (m *KillPolicy) GetGracePeriod() *DurationInfo { + if m != nil { + return m.GracePeriod + } + return nil +} + +// * +// Describes a command, executed via: '/bin/sh -c value'. Any URIs specified +// are fetched before executing the command. If the executable field for an +// uri is set, executable file permission is set on the downloaded file. +// Otherwise, if the downloaded file has a recognized archive extension +// (currently [compressed] tar and zip) it is extracted into the executor's +// working directory. This extraction can be disabled by setting `extract` to +// false. In addition, any environment variables are set before executing +// the command (so they can be used to "parameterize" your command). +type CommandInfo struct { + URIs []CommandInfo_URI `protobuf:"bytes,1,rep,name=uris" json:"uris"` + Environment *Environment `protobuf:"bytes,2,opt,name=environment" json:"environment,omitempty"` + // There are two ways to specify the command: + // 1) If 'shell == true', the command will be launched via shell + // (i.e., /bin/sh -c 'value'). The 'value' specified will be + // treated as the shell command. The 'arguments' will be ignored. + // 2) If 'shell == false', the command will be launched by passing + // arguments to an executable. The 'value' specified will be + // treated as the filename of the executable. The 'arguments' + // will be treated as the arguments to the executable. This is + // similar to how POSIX exec families launch processes (i.e., + // execlp(value, arguments(0), arguments(1), ...)). + // NOTE: The field 'value' is changed from 'required' to 'optional' + // in 0.20.0. It will only cause issues if a new framework is + // connecting to an old master. + Shell *bool `protobuf:"varint,6,opt,name=shell,def=1" json:"shell,omitempty"` + Value *string `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"` + Arguments []string `protobuf:"bytes,7,rep,name=arguments" json:"arguments,omitempty"` + // Enables executor and tasks to run as a specific user. If the user + // field is present both in FrameworkInfo and here, the CommandInfo + // user value takes precedence. + User *string `protobuf:"bytes,5,opt,name=user" json:"user,omitempty"` +} + +func (m *CommandInfo) Reset() { *m = CommandInfo{} } +func (*CommandInfo) ProtoMessage() {} +func (*CommandInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{19} } + +const Default_CommandInfo_Shell bool = true + +func (m *CommandInfo) GetURIs() []CommandInfo_URI { + if m != nil { + return m.URIs + } + return nil +} + +func (m *CommandInfo) GetEnvironment() *Environment { + if m != nil { + return m.Environment + } + return nil +} + +func (m *CommandInfo) GetShell() bool { + if m != nil && m.Shell != nil { + return *m.Shell + } + return Default_CommandInfo_Shell +} + +func (m *CommandInfo) GetValue() string { + if m != nil && m.Value != nil { + return *m.Value + } + return "" +} + +func (m *CommandInfo) GetArguments() []string { + if m != nil { + return m.Arguments + } + return nil +} + +func (m *CommandInfo) GetUser() string { + if m != nil && m.User != nil { + return *m.User + } + return "" +} + +type CommandInfo_URI struct { + Value string `protobuf:"bytes,1,req,name=value" json:"value"` + Executable *bool `protobuf:"varint,2,opt,name=executable" json:"executable,omitempty"` + // In case the fetched file is recognized as an archive, extract + // its contents into the sandbox. Note that a cached archive is + // not copied from the cache to the sandbox in case extraction + // originates from an archive in the cache. + Extract *bool `protobuf:"varint,3,opt,name=extract,def=1" json:"extract,omitempty"` + // If this field is "true", the fetcher cache will be used. If not, + // fetching bypasses the cache and downloads directly into the + // sandbox directory, no matter whether a suitable cache file is + // available or not. The former directs the fetcher to download to + // the file cache, then copy from there to the sandbox. Subsequent + // fetch attempts with the same URI will omit downloading and copy + // from the cache as long as the file is resident there. Cache files + // may get evicted at any time, which then leads to renewed + // downloading. See also "docs/fetcher.md" and + // "docs/fetcher-cache-internals.md". + Cache *bool `protobuf:"varint,4,opt,name=cache" json:"cache,omitempty"` + // The fetcher's default behavior is to use the URI string's basename to + // name the local copy. If this field is provided, the local copy will be + // named with its value instead. If there is a directory component (which + // must be a relative path), the local copy will be stored in that + // subdirectory inside the sandbox. + OutputFile *string `protobuf:"bytes,5,opt,name=output_file,json=outputFile" json:"output_file,omitempty"` +} + +func (m *CommandInfo_URI) Reset() { *m = CommandInfo_URI{} } +func (*CommandInfo_URI) ProtoMessage() {} +func (*CommandInfo_URI) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{19, 0} } + +const Default_CommandInfo_URI_Extract bool = true + +func (m *CommandInfo_URI) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +func (m *CommandInfo_URI) GetExecutable() bool { + if m != nil && m.Executable != nil { + return *m.Executable + } + return false +} + +func (m *CommandInfo_URI) GetExtract() bool { + if m != nil && m.Extract != nil { + return *m.Extract + } + return Default_CommandInfo_URI_Extract +} + +func (m *CommandInfo_URI) GetCache() bool { + if m != nil && m.Cache != nil { + return *m.Cache + } + return false +} + +func (m *CommandInfo_URI) GetOutputFile() string { + if m != nil && m.OutputFile != nil { + return *m.OutputFile + } + return "" +} + +// * +// Describes information about an executor. +type ExecutorInfo struct { + // For backwards compatibility, if this field is not set when using `LAUNCH` + // operation, Mesos will infer the type by checking if `command` is set + // (`CUSTOM`) or unset (`DEFAULT`). `type` must be set when using + // `LAUNCH_GROUP` operation. + // + // TODO(vinod): Add support for explicitly setting `type` to `DEFAULT` in + // `LAUNCH` operation. + Type ExecutorInfo_Type `protobuf:"varint,15,opt,name=type,enum=mesos.ExecutorInfo_Type" json:"type"` + ExecutorID ExecutorID `protobuf:"bytes,1,req,name=executor_id,json=executorId" json:"executor_id"` + FrameworkID *FrameworkID `protobuf:"bytes,8,opt,name=framework_id,json=frameworkId" json:"framework_id,omitempty"` + Command *CommandInfo `protobuf:"bytes,7,opt,name=command" json:"command,omitempty"` + // Executor provided with a container will launch the container + // with the executor's CommandInfo and we expect the container to + // act as a Mesos executor. + Container *ContainerInfo `protobuf:"bytes,11,opt,name=container" json:"container,omitempty"` + Resources []Resource `protobuf:"bytes,5,rep,name=resources" json:"resources"` + Name *string `protobuf:"bytes,9,opt,name=name" json:"name,omitempty"` + // 'source' is an identifier style string used by frameworks to + // track the source of an executor. This is useful when it's + // possible for different executor ids to be related semantically. + // + // NOTE: 'source' is exposed alongside the resource usage of the + // executor via JSON on the agent. This allows users to import usage + // information into a time series database for monitoring. + // + // This field is deprecated since 1.0. Please use labels for + // free-form metadata instead. + Source *string `protobuf:"bytes,10,opt,name=source" json:"source,omitempty"` + // This field can be used to pass arbitrary bytes to an executor. + Data []byte `protobuf:"bytes,4,opt,name=data" json:"data,omitempty"` + // Service discovery information for the executor. It is not + // interpreted or acted upon by Mesos. It is up to a service + // discovery system to use this information as needed and to handle + // executors without service discovery information. + Discovery *DiscoveryInfo `protobuf:"bytes,12,opt,name=discovery" json:"discovery,omitempty"` + // When shutting down an executor the agent will wait in a + // best-effort manner for the grace period specified here + // before forcibly destroying the container. The executor + // must not assume that it will always be allotted the full + // grace period, as the agent may decide to allot a shorter + // period and failures / forcible terminations may occur. + ShutdownGracePeriod *DurationInfo `protobuf:"bytes,13,opt,name=shutdown_grace_period,json=shutdownGracePeriod" json:"shutdown_grace_period,omitempty"` + // Labels are free-form key value pairs which are exposed through + // master and agent endpoints. Labels will not be interpreted or + // acted upon by Mesos itself. As opposed to the data field, labels + // will be kept in memory on master and agent processes. Therefore, + // labels should be used to tag executors with lightweight metadata. + // Labels should not contain duplicate key-value pairs. + Labels *Labels `protobuf:"bytes,14,opt,name=labels" json:"labels,omitempty"` +} + +func (m *ExecutorInfo) Reset() { *m = ExecutorInfo{} } +func (*ExecutorInfo) ProtoMessage() {} +func (*ExecutorInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{20} } + +func (m *ExecutorInfo) GetType() ExecutorInfo_Type { + if m != nil { + return m.Type + } + return ExecutorInfo_UNKNOWN +} + +func (m *ExecutorInfo) GetExecutorID() ExecutorID { + if m != nil { + return m.ExecutorID + } + return ExecutorID{} +} + +func (m *ExecutorInfo) GetFrameworkID() *FrameworkID { + if m != nil { + return m.FrameworkID + } + return nil +} + +func (m *ExecutorInfo) GetCommand() *CommandInfo { + if m != nil { + return m.Command + } + return nil +} + +func (m *ExecutorInfo) GetContainer() *ContainerInfo { + if m != nil { + return m.Container + } + return nil +} + +func (m *ExecutorInfo) GetResources() []Resource { + if m != nil { + return m.Resources + } + return nil +} + +func (m *ExecutorInfo) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *ExecutorInfo) GetSource() string { + if m != nil && m.Source != nil { + return *m.Source + } + return "" +} + +func (m *ExecutorInfo) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func (m *ExecutorInfo) GetDiscovery() *DiscoveryInfo { + if m != nil { + return m.Discovery + } + return nil +} + +func (m *ExecutorInfo) GetShutdownGracePeriod() *DurationInfo { + if m != nil { + return m.ShutdownGracePeriod + } + return nil +} + +func (m *ExecutorInfo) GetLabels() *Labels { + if m != nil { + return m.Labels + } + return nil +} + +// * +// Describes a domain. A domain is a collection of hosts that have +// similar characteristics. Mesos currently only supports "fault +// domains", which identify groups of hosts with similar failure +// characteristics. +// +// Frameworks can generally assume that network links between hosts in +// the same fault domain have lower latency, higher bandwidth, and better +// availability than network links between hosts in different domains. +// Schedulers may prefer to place network-intensive workloads in the +// same domain, as this may improve performance. Conversely, a single +// failure that affects a host in a domain may be more likely to +// affect other hosts in the same domain; hence, schedulers may prefer +// to place workloads that require high availability in multiple +// domains. (For example, all the hosts in a single rack might lose +// power or network connectivity simultaneously.) +// +// There are two kinds of fault domains: regions and zones. Regions +// offer the highest degree of fault isolation, but network latency +// between regions is typically high (typically >50 ms). Zones offer a +// modest degree of fault isolation along with reasonably low network +// latency (typically <10 ms). +// +// The mapping from fault domains to physical infrastructure is up to +// the operator to configure. In cloud environments, regions and zones +// can be mapped to the "region" and "availability zone" concepts +// exposed by most cloud providers, respectively. In on-premise +// deployments, regions and zones can be mapped to data centers and +// racks, respectively. +// +// Both masters and agents can be configured with domains. Frameworks +// can compare the domains of two hosts to determine if the hosts are +// in the same zone, in different zones in the same region, or in +// different regions. Note that all masters in a given Mesos cluster +// must be in the same region. +type DomainInfo struct { + FaultDomain *DomainInfo_FaultDomain `protobuf:"bytes,1,opt,name=fault_domain,json=faultDomain" json:"fault_domain,omitempty"` +} + +func (m *DomainInfo) Reset() { *m = DomainInfo{} } +func (*DomainInfo) ProtoMessage() {} +func (*DomainInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{21} } + +func (m *DomainInfo) GetFaultDomain() *DomainInfo_FaultDomain { + if m != nil { + return m.FaultDomain + } + return nil +} + +type DomainInfo_FaultDomain struct { + Region DomainInfo_FaultDomain_RegionInfo `protobuf:"bytes,1,req,name=region" json:"region"` + Zone DomainInfo_FaultDomain_ZoneInfo `protobuf:"bytes,2,req,name=zone" json:"zone"` +} + +func (m *DomainInfo_FaultDomain) Reset() { *m = DomainInfo_FaultDomain{} } +func (*DomainInfo_FaultDomain) ProtoMessage() {} +func (*DomainInfo_FaultDomain) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{21, 0} } + +func (m *DomainInfo_FaultDomain) GetRegion() DomainInfo_FaultDomain_RegionInfo { + if m != nil { + return m.Region + } + return DomainInfo_FaultDomain_RegionInfo{} +} + +func (m *DomainInfo_FaultDomain) GetZone() DomainInfo_FaultDomain_ZoneInfo { + if m != nil { + return m.Zone + } + return DomainInfo_FaultDomain_ZoneInfo{} +} + +type DomainInfo_FaultDomain_RegionInfo struct { + Name string `protobuf:"bytes,1,req,name=name" json:"name"` +} + +func (m *DomainInfo_FaultDomain_RegionInfo) Reset() { *m = DomainInfo_FaultDomain_RegionInfo{} } +func (*DomainInfo_FaultDomain_RegionInfo) ProtoMessage() {} +func (*DomainInfo_FaultDomain_RegionInfo) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{21, 0, 0} +} + +func (m *DomainInfo_FaultDomain_RegionInfo) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +type DomainInfo_FaultDomain_ZoneInfo struct { + Name string `protobuf:"bytes,1,req,name=name" json:"name"` +} + +func (m *DomainInfo_FaultDomain_ZoneInfo) Reset() { *m = DomainInfo_FaultDomain_ZoneInfo{} } +func (*DomainInfo_FaultDomain_ZoneInfo) ProtoMessage() {} +func (*DomainInfo_FaultDomain_ZoneInfo) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{21, 0, 1} +} + +func (m *DomainInfo_FaultDomain_ZoneInfo) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +// * +// Describes a master. This will probably have more fields in the +// future which might be used, for example, to link a framework webui +// to a master webui. +type MasterInfo struct { + ID string `protobuf:"bytes,1,req,name=id" json:"id"` + // The IP address (only IPv4) as a packed 4-bytes integer, + // stored in network order. Deprecated, use `address.ip` instead. + IP uint32 `protobuf:"varint,2,req,name=ip" json:"ip"` + // The TCP port the Master is listening on for incoming + // HTTP requests; deprecated, use `address.port` instead. + Port *uint32 `protobuf:"varint,3,req,name=port,def=5050" json:"port,omitempty"` + // In the default implementation, this will contain information + // about both the IP address, port and Master name; it should really + // not be relied upon by external tooling/frameworks and be + // considered an "internal" implementation field. + PID *string `protobuf:"bytes,4,opt,name=pid" json:"pid,omitempty"` + // The server's hostname, if available; it may be unreliable + // in environments where the DNS configuration does not resolve + // internal hostnames (eg, some public cloud providers). + // Deprecated, use `address.hostname` instead. + Hostname *string `protobuf:"bytes,5,opt,name=hostname" json:"hostname,omitempty"` + // The running Master version, as a string; taken from the + // generated "master/version.hpp". + Version *string `protobuf:"bytes,6,opt,name=version" json:"version,omitempty"` + // The full IP address (supports both IPv4 and IPv6 formats) + // and supersedes the use of `ip`, `port` and `hostname`. + // Since Mesos 0.24. + Address *Address `protobuf:"bytes,7,opt,name=address" json:"address,omitempty"` + // The domain that this master belongs to. All masters in a Mesos + // cluster should belong to the same region. + Domain *DomainInfo `protobuf:"bytes,8,opt,name=domain" json:"domain,omitempty"` + Capabilities []MasterInfo_Capability `protobuf:"bytes,9,rep,name=capabilities" json:"capabilities"` +} + +func (m *MasterInfo) Reset() { *m = MasterInfo{} } +func (*MasterInfo) ProtoMessage() {} +func (*MasterInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{22} } + +const Default_MasterInfo_Port uint32 = 5050 + +func (m *MasterInfo) GetID() string { + if m != nil { + return m.ID + } + return "" +} + +func (m *MasterInfo) GetIP() uint32 { + if m != nil { + return m.IP + } + return 0 +} + +func (m *MasterInfo) GetPort() uint32 { + if m != nil && m.Port != nil { + return *m.Port + } + return Default_MasterInfo_Port +} + +func (m *MasterInfo) GetPID() string { + if m != nil && m.PID != nil { + return *m.PID + } + return "" +} + +func (m *MasterInfo) GetHostname() string { + if m != nil && m.Hostname != nil { + return *m.Hostname + } + return "" +} + +func (m *MasterInfo) GetVersion() string { + if m != nil && m.Version != nil { + return *m.Version + } + return "" +} + +func (m *MasterInfo) GetAddress() *Address { + if m != nil { + return m.Address + } + return nil +} + +func (m *MasterInfo) GetDomain() *DomainInfo { + if m != nil { + return m.Domain + } + return nil +} + +func (m *MasterInfo) GetCapabilities() []MasterInfo_Capability { + if m != nil { + return m.Capabilities + } + return nil +} + +type MasterInfo_Capability struct { + Type MasterInfo_Capability_Type `protobuf:"varint,1,opt,name=type,enum=mesos.MasterInfo_Capability_Type" json:"type"` +} + +func (m *MasterInfo_Capability) Reset() { *m = MasterInfo_Capability{} } +func (*MasterInfo_Capability) ProtoMessage() {} +func (*MasterInfo_Capability) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{22, 0} } + +func (m *MasterInfo_Capability) GetType() MasterInfo_Capability_Type { + if m != nil { + return m.Type + } + return MasterInfo_Capability_UNKNOWN +} + +// * +// Describes an agent. Note that the 'id' field is only available +// after an agent is registered with the master, and is made available +// here to facilitate re-registration. +type AgentInfo struct { + Hostname string `protobuf:"bytes,1,req,name=hostname" json:"hostname"` + Port *int32 `protobuf:"varint,8,opt,name=port,def=5051" json:"port,omitempty"` + // The configured resources at the agent. This does not include any + // dynamic reservations or persistent volumes that may currently + // exist at the agent. + Resources []Resource `protobuf:"bytes,3,rep,name=resources" json:"resources"` + Attributes []Attribute `protobuf:"bytes,5,rep,name=attributes" json:"attributes"` + ID *AgentID `protobuf:"bytes,6,opt,name=id" json:"id,omitempty"` + // The domain that this agent belongs to. If the agent's region + // differs from the master's region, it will not appear in resource + // offers to frameworks that have not enabled the REGION_AWARE + // capability. + Domain *DomainInfo `protobuf:"bytes,10,opt,name=domain" json:"domain,omitempty"` +} + +func (m *AgentInfo) Reset() { *m = AgentInfo{} } +func (*AgentInfo) ProtoMessage() {} +func (*AgentInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{23} } + +const Default_AgentInfo_Port int32 = 5051 + +func (m *AgentInfo) GetHostname() string { + if m != nil { + return m.Hostname + } + return "" +} + +func (m *AgentInfo) GetPort() int32 { + if m != nil && m.Port != nil { + return *m.Port + } + return Default_AgentInfo_Port +} + +func (m *AgentInfo) GetResources() []Resource { + if m != nil { + return m.Resources + } + return nil +} + +func (m *AgentInfo) GetAttributes() []Attribute { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *AgentInfo) GetID() *AgentID { + if m != nil { + return m.ID + } + return nil +} + +func (m *AgentInfo) GetDomain() *DomainInfo { + if m != nil { + return m.Domain + } + return nil +} + +type AgentInfo_Capability struct { + // Enum fields should be optional, see: MESOS-4997. + Type AgentInfo_Capability_Type `protobuf:"varint,1,opt,name=type,enum=mesos.AgentInfo_Capability_Type" json:"type"` +} + +func (m *AgentInfo_Capability) Reset() { *m = AgentInfo_Capability{} } +func (*AgentInfo_Capability) ProtoMessage() {} +func (*AgentInfo_Capability) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{23, 0} } + +func (m *AgentInfo_Capability) GetType() AgentInfo_Capability_Type { + if m != nil { + return m.Type + } + return AgentInfo_Capability_UNKNOWN +} + +// * +// Describes the container configuration to run a CSI plugin component. +type CSIPluginContainerInfo struct { + Services []CSIPluginContainerInfo_Service `protobuf:"varint,1,rep,name=services,enum=mesos.CSIPluginContainerInfo_Service" json:"services,omitempty"` + Command *CommandInfo `protobuf:"bytes,2,opt,name=command" json:"command,omitempty"` + Resources []Resource `protobuf:"bytes,3,rep,name=resources" json:"resources"` + Container *ContainerInfo `protobuf:"bytes,4,opt,name=container" json:"container,omitempty"` +} + +func (m *CSIPluginContainerInfo) Reset() { *m = CSIPluginContainerInfo{} } +func (*CSIPluginContainerInfo) ProtoMessage() {} +func (*CSIPluginContainerInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{24} } + +func (m *CSIPluginContainerInfo) GetServices() []CSIPluginContainerInfo_Service { + if m != nil { + return m.Services + } + return nil +} + +func (m *CSIPluginContainerInfo) GetCommand() *CommandInfo { + if m != nil { + return m.Command + } + return nil +} + +func (m *CSIPluginContainerInfo) GetResources() []Resource { + if m != nil { + return m.Resources + } + return nil +} + +func (m *CSIPluginContainerInfo) GetContainer() *ContainerInfo { + if m != nil { + return m.Container + } + return nil +} + +// * +// Describes a CSI plugin. +type CSIPluginInfo struct { + // The type of the CSI service. This uniquely identifies a CSI + // implementation. For instance: + // org.apache.mesos.csi.test + // + // Please follow to Java package naming convention + // (https://en.wikipedia.org/wiki/Java_package#Package_naming_conventions) + // to avoid conflicts on type names. + Type string `protobuf:"bytes,1,req,name=type" json:"type"` + // The name of the CSI service. There could be mutliple instances of a + // type of CSI service. The name field is used to distinguish these + // instances. It should be a legal Java identifier + // (https://docs.oracle.com/javase/tutorial/java/nutsandbolts/variables.html) + // to avoid conflicts on concatenation of type and name. + Name string `protobuf:"bytes,2,req,name=name" json:"name"` + // A list of container configurations to run CSI plugin components. + // The controller service will be served by the first configuration + // that contains `CONTROLLER_SERVICE`, and the node service will be + // served by the first configuration that contains `NODE_SERVICE`. + Containers []CSIPluginContainerInfo `protobuf:"bytes,3,rep,name=containers" json:"containers"` +} + +func (m *CSIPluginInfo) Reset() { *m = CSIPluginInfo{} } +func (*CSIPluginInfo) ProtoMessage() {} +func (*CSIPluginInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{25} } + +func (m *CSIPluginInfo) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *CSIPluginInfo) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *CSIPluginInfo) GetContainers() []CSIPluginContainerInfo { + if m != nil { + return m.Containers + } + return nil +} + +// * +// Describes a resource provider. Note that the 'id' field is only available +// after a resource provider is registered with the master, and is made +// available here to facilitate re-registration. +type ResourceProviderInfo struct { + ID *ResourceProviderID `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` + Attributes []Attribute `protobuf:"bytes,2,rep,name=attributes" json:"attributes"` + // The type of the resource provider. This uniquely identifies a + // resource provider implementation. For instance: + // org.apache.mesos.rp.local.storage + // + // Please follow to Java package naming convention + // (https://en.wikipedia.org/wiki/Java_package#Package_naming_conventions) + // to avoid conflicts on type names. + Type string `protobuf:"bytes,3,req,name=type" json:"type"` + // The name of the resource provider. There could be multiple + // instances of a type of resource provider. The name field is used + // to distinguish these instances. It should be a legal Java identifier + // (https://docs.oracle.com/javase/tutorial/java/nutsandbolts/variables.html) + // to avoid conflicts on concatenation of type and name. + Name string `protobuf:"bytes,4,req,name=name" json:"name"` + // The stack of default reservations. If this field is not empty, it + // indicates that resources from this resource provider are reserved + // by default, except for the resources that have been reserved or + // unreserved through operations. The first `ReservationInfo` + // may have type `STATIC` or `DYNAMIC`, but the rest must have + // `DYNAMIC`. One can create a new reservation on top of an existing + // one by pushing a new `ReservationInfo` to the back. The last + // `ReservationInfo` in this stack is the "current" reservation. The + // new reservation's role must be a child of the current one. + DefaultReservations []Resource_ReservationInfo `protobuf:"bytes,5,rep,name=default_reservations,json=defaultReservations" json:"default_reservations"` + Storage *ResourceProviderInfo_Storage `protobuf:"bytes,6,opt,name=storage" json:"storage,omitempty"` +} + +func (m *ResourceProviderInfo) Reset() { *m = ResourceProviderInfo{} } +func (*ResourceProviderInfo) ProtoMessage() {} +func (*ResourceProviderInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{26} } + +func (m *ResourceProviderInfo) GetID() *ResourceProviderID { + if m != nil { + return m.ID + } + return nil +} + +func (m *ResourceProviderInfo) GetAttributes() []Attribute { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *ResourceProviderInfo) GetType() string { + if m != nil { + return m.Type + } + return "" +} + +func (m *ResourceProviderInfo) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ResourceProviderInfo) GetDefaultReservations() []Resource_ReservationInfo { + if m != nil { + return m.DefaultReservations + } + return nil +} + +func (m *ResourceProviderInfo) GetStorage() *ResourceProviderInfo_Storage { + if m != nil { + return m.Storage + } + return nil +} + +// Storage resource provider related information. +type ResourceProviderInfo_Storage struct { + Plugin CSIPluginInfo `protobuf:"bytes,1,req,name=plugin" json:"plugin"` +} + +func (m *ResourceProviderInfo_Storage) Reset() { *m = ResourceProviderInfo_Storage{} } +func (*ResourceProviderInfo_Storage) ProtoMessage() {} +func (*ResourceProviderInfo_Storage) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{26, 0} +} + +func (m *ResourceProviderInfo_Storage) GetPlugin() CSIPluginInfo { + if m != nil { + return m.Plugin + } + return CSIPluginInfo{} +} + +// * +// Describes an Attribute or Resource "value". A value is described +// using the standard protocol buffer "union" trick. +type Value struct { + Type Value_Type `protobuf:"varint,1,req,name=type,enum=mesos.Value_Type" json:"type"` + Scalar *Value_Scalar `protobuf:"bytes,2,opt,name=scalar" json:"scalar,omitempty"` + Ranges *Value_Ranges `protobuf:"bytes,3,opt,name=ranges" json:"ranges,omitempty"` + Set *Value_Set `protobuf:"bytes,4,opt,name=set" json:"set,omitempty"` + Text *Value_Text `protobuf:"bytes,5,opt,name=text" json:"text,omitempty"` +} + +func (m *Value) Reset() { *m = Value{} } +func (*Value) ProtoMessage() {} +func (*Value) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{27} } + +func (m *Value) GetType() Value_Type { + if m != nil { + return m.Type + } + return SCALAR +} + +func (m *Value) GetScalar() *Value_Scalar { + if m != nil { + return m.Scalar + } + return nil +} + +func (m *Value) GetRanges() *Value_Ranges { + if m != nil { + return m.Ranges + } + return nil +} + +func (m *Value) GetSet() *Value_Set { + if m != nil { + return m.Set + } + return nil +} + +func (m *Value) GetText() *Value_Text { + if m != nil { + return m.Text + } + return nil +} + +type Value_Scalar struct { + // Scalar values are represented using floating point. To reduce + // the chance of unpredictable floating point behavior due to + // roundoff error, Mesos only supports three decimal digits of + // precision for scalar resource values. That is, floating point + // values are converted to a fixed point format that supports + // three decimal digits of precision, and then converted back to + // floating point on output. Any additional precision in scalar + // resource values is discarded (via rounding). + Value float64 `protobuf:"fixed64,1,req,name=value" json:"value"` +} + +func (m *Value_Scalar) Reset() { *m = Value_Scalar{} } +func (*Value_Scalar) ProtoMessage() {} +func (*Value_Scalar) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{27, 0} } + +func (m *Value_Scalar) GetValue() float64 { + if m != nil { + return m.Value + } + return 0 +} + +type Value_Range struct { + Begin uint64 `protobuf:"varint,1,req,name=begin" json:"begin"` + End uint64 `protobuf:"varint,2,req,name=end" json:"end"` +} + +func (m *Value_Range) Reset() { *m = Value_Range{} } +func (*Value_Range) ProtoMessage() {} +func (*Value_Range) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{27, 1} } + +func (m *Value_Range) GetBegin() uint64 { + if m != nil { + return m.Begin + } + return 0 +} + +func (m *Value_Range) GetEnd() uint64 { + if m != nil { + return m.End + } + return 0 +} + +type Value_Ranges struct { + Range []Value_Range `protobuf:"bytes,1,rep,name=range" json:"range"` +} + +func (m *Value_Ranges) Reset() { *m = Value_Ranges{} } +func (*Value_Ranges) ProtoMessage() {} +func (*Value_Ranges) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{27, 2} } + +func (m *Value_Ranges) GetRange() []Value_Range { + if m != nil { + return m.Range + } + return nil +} + +type Value_Set struct { + Item []string `protobuf:"bytes,1,rep,name=item" json:"item,omitempty"` +} + +func (m *Value_Set) Reset() { *m = Value_Set{} } +func (*Value_Set) ProtoMessage() {} +func (*Value_Set) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{27, 3} } + +func (m *Value_Set) GetItem() []string { + if m != nil { + return m.Item + } + return nil +} + +type Value_Text struct { + Value string `protobuf:"bytes,1,req,name=value" json:"value"` +} + +func (m *Value_Text) Reset() { *m = Value_Text{} } +func (*Value_Text) ProtoMessage() {} +func (*Value_Text) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{27, 4} } + +func (m *Value_Text) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// * +// Describes an attribute that can be set on a machine. For now, +// attributes and resources share the same "value" type, but this may +// change in the future and attributes may only be string based. +type Attribute struct { + Name string `protobuf:"bytes,1,req,name=name" json:"name"` + Type Value_Type `protobuf:"varint,2,req,name=type,enum=mesos.Value_Type" json:"type"` + Scalar *Value_Scalar `protobuf:"bytes,3,opt,name=scalar" json:"scalar,omitempty"` + Ranges *Value_Ranges `protobuf:"bytes,4,opt,name=ranges" json:"ranges,omitempty"` + Set *Value_Set `protobuf:"bytes,6,opt,name=set" json:"set,omitempty"` + Text *Value_Text `protobuf:"bytes,5,opt,name=text" json:"text,omitempty"` +} + +func (m *Attribute) Reset() { *m = Attribute{} } +func (*Attribute) ProtoMessage() {} +func (*Attribute) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{28} } + +func (m *Attribute) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Attribute) GetType() Value_Type { + if m != nil { + return m.Type + } + return SCALAR +} + +func (m *Attribute) GetScalar() *Value_Scalar { + if m != nil { + return m.Scalar + } + return nil +} + +func (m *Attribute) GetRanges() *Value_Ranges { + if m != nil { + return m.Ranges + } + return nil +} + +func (m *Attribute) GetSet() *Value_Set { + if m != nil { + return m.Set + } + return nil +} + +func (m *Attribute) GetText() *Value_Text { + if m != nil { + return m.Text + } + return nil +} + +// * +// Describes a resource from a resource provider. The `name` field is +// a string like "cpus" or "mem" that indicates which kind of resource +// this is; the rest of the fields describe the properties of the +// resource. A resource can take on one of three types: scalar +// (double), a list of finite and discrete ranges (e.g., [1-10, +// 20-30]), or a set of items. A resource is described using the +// standard protocol buffer "union" trick. +// +// Note that "disk" and "mem" resources are scalar values expressed in +// megabytes. Fractional "cpus" values are allowed (e.g., "0.5"), +// which correspond to partial shares of a CPU. +type Resource struct { + ProviderID *ResourceProviderID `protobuf:"bytes,12,opt,name=provider_id,json=providerId" json:"provider_id,omitempty"` + Name string `protobuf:"bytes,1,req,name=name" json:"name"` + Type *Value_Type `protobuf:"varint,2,req,name=type,enum=mesos.Value_Type" json:"type,omitempty"` + Scalar *Value_Scalar `protobuf:"bytes,3,opt,name=scalar" json:"scalar,omitempty"` + Ranges *Value_Ranges `protobuf:"bytes,4,opt,name=ranges" json:"ranges,omitempty"` + Set *Value_Set `protobuf:"bytes,5,opt,name=set" json:"set,omitempty"` + // The role that this resource is reserved for. If "*", this indicates + // that the resource is unreserved. Otherwise, the resource will only + // be offered to frameworks that belong to this role. + // + // NOTE: Frameworks must not set this field if `reservations` is set. + // See the 'Resource Format' section for more details. + // + // TODO(mpark): Deprecate once `reservations` is no longer experimental. + Role *string `protobuf:"bytes,6,opt,name=role,def=*" json:"role,omitempty"` + AllocationInfo *Resource_AllocationInfo `protobuf:"bytes,11,opt,name=allocation_info,json=allocationInfo" json:"allocation_info,omitempty"` + // If this is set, this resource was dynamically reserved by an + // operator or a framework. Otherwise, this resource is either unreserved + // or statically reserved by an operator via the --resources flag. + // + // NOTE: Frameworks must not set this field if `reservations` is set. + // See the 'Resource Format' section for more details. + // + // TODO(mpark): Deprecate once `reservations` is no longer experimental. + Reservation *Resource_ReservationInfo `protobuf:"bytes,8,opt,name=reservation" json:"reservation,omitempty"` + // The stack of reservations. If this field is empty, it indicates that this + // resource is unreserved. Otherwise, the resource is reserved. The first + // `ReservationInfo` may have type `STATIC` or `DYNAMIC`, but the rest must + // have `DYNAMIC`. One can create a new reservation on top of an existing + // one by pushing a new `ReservationInfo` to the back. The last + // `ReservationInfo` in this stack is the "current" reservation. The new + // reservation's role must be a child of the current reservation's role. + // + // NOTE: Frameworks must not set this field if `reservation` is set. + // See the 'Resource Format' section for more details. + // + // TODO(mpark): Deprecate `role` and `reservation` once this is stable. + Reservations []Resource_ReservationInfo `protobuf:"bytes,13,rep,name=reservations" json:"reservations"` + Disk *Resource_DiskInfo `protobuf:"bytes,7,opt,name=disk" json:"disk,omitempty"` + // If this is set, the resources are revocable, i.e., any tasks or + // executors launched using these resources could get preempted or + // throttled at any time. This could be used by frameworks to run + // best effort tasks that do not need strict uptime or performance + // guarantees. Note that if this is set, 'disk' or 'reservation' + // cannot be set. + Revocable *Resource_RevocableInfo `protobuf:"bytes,9,opt,name=revocable" json:"revocable,omitempty"` + // If this is set, the resources are shared, i.e. multiple tasks + // can be launched using this resource and all of them shall refer + // to the same physical resource on the cluster. Note that only + // persistent volumes can be shared currently. + Shared *Resource_SharedInfo `protobuf:"bytes,10,opt,name=shared" json:"shared,omitempty"` +} + +func (m *Resource) Reset() { *m = Resource{} } +func (*Resource) ProtoMessage() {} +func (*Resource) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{29} } + +const Default_Resource_Role string = "*" + +func (m *Resource) GetProviderID() *ResourceProviderID { + if m != nil { + return m.ProviderID + } + return nil +} + +func (m *Resource) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Resource) GetType() Value_Type { + if m != nil && m.Type != nil { + return *m.Type + } + return SCALAR +} + +func (m *Resource) GetScalar() *Value_Scalar { + if m != nil { + return m.Scalar + } + return nil +} + +func (m *Resource) GetRanges() *Value_Ranges { + if m != nil { + return m.Ranges + } + return nil +} + +func (m *Resource) GetSet() *Value_Set { + if m != nil { + return m.Set + } + return nil +} + +func (m *Resource) GetRole() string { + if m != nil && m.Role != nil { + return *m.Role + } + return Default_Resource_Role +} + +func (m *Resource) GetAllocationInfo() *Resource_AllocationInfo { + if m != nil { + return m.AllocationInfo + } + return nil +} + +func (m *Resource) GetReservation() *Resource_ReservationInfo { + if m != nil { + return m.Reservation + } + return nil +} + +func (m *Resource) GetReservations() []Resource_ReservationInfo { + if m != nil { + return m.Reservations + } + return nil +} + +func (m *Resource) GetDisk() *Resource_DiskInfo { + if m != nil { + return m.Disk + } + return nil +} + +func (m *Resource) GetRevocable() *Resource_RevocableInfo { + if m != nil { + return m.Revocable + } + return nil +} + +func (m *Resource) GetShared() *Resource_SharedInfo { + if m != nil { + return m.Shared + } + return nil +} + +// This was initially introduced to support MULTI_ROLE capable +// frameworks. Frameworks that are not MULTI_ROLE capable can +// continue to assume that the offered resources are allocated +// to their role. +type Resource_AllocationInfo struct { + // If set, this resource is allocated to a role. Note that in the + // future, this may be unset and the scheduler may be responsible + // for allocating to one of its roles. + Role *string `protobuf:"bytes,1,opt,name=role" json:"role,omitempty"` +} + +func (m *Resource_AllocationInfo) Reset() { *m = Resource_AllocationInfo{} } +func (*Resource_AllocationInfo) ProtoMessage() {} +func (*Resource_AllocationInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{29, 0} } + +func (m *Resource_AllocationInfo) GetRole() string { + if m != nil && m.Role != nil { + return *m.Role + } + return "" +} + +type Resource_ReservationInfo struct { + // The type of this reservation. + // + // NOTE: This field must not be set for `Resource.reservation`. + // See the 'Resource Format' section for more details. + Type *Resource_ReservationInfo_Type `protobuf:"varint,4,opt,name=type,enum=mesos.Resource_ReservationInfo_Type" json:"type,omitempty"` + // The role to which this reservation is made for. + // + // NOTE: This field must not be set for `Resource.reservation`. + // See the 'Resource Format' section for more details. + Role *string `protobuf:"bytes,3,opt,name=role" json:"role,omitempty"` + // Indicates the principal, if any, of the framework or operator + // that reserved this resource. If reserved by a framework, the + // field should match the `FrameworkInfo.principal`. It is used in + // conjunction with the `UnreserveResources` ACL to determine + // whether the entity attempting to unreserve this resource is + // permitted to do so. + Principal *string `protobuf:"bytes,1,opt,name=principal" json:"principal,omitempty"` + // Labels are free-form key value pairs that can be used to + // associate arbitrary metadata with a reserved resource. For + // example, frameworks can use labels to identify the intended + // purpose for a portion of the resources the framework has + // reserved at a given agent. Labels should not contain duplicate + // key-value pairs. + Labels *Labels `protobuf:"bytes,2,opt,name=labels" json:"labels,omitempty"` +} + +func (m *Resource_ReservationInfo) Reset() { *m = Resource_ReservationInfo{} } +func (*Resource_ReservationInfo) ProtoMessage() {} +func (*Resource_ReservationInfo) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{29, 1} +} + +func (m *Resource_ReservationInfo) GetType() Resource_ReservationInfo_Type { + if m != nil && m.Type != nil { + return *m.Type + } + return Resource_ReservationInfo_UNKNOWN +} + +func (m *Resource_ReservationInfo) GetRole() string { + if m != nil && m.Role != nil { + return *m.Role + } + return "" +} + +func (m *Resource_ReservationInfo) GetPrincipal() string { + if m != nil && m.Principal != nil { + return *m.Principal + } + return "" +} + +func (m *Resource_ReservationInfo) GetLabels() *Labels { + if m != nil { + return m.Labels + } + return nil +} + +type Resource_DiskInfo struct { + Persistence *Resource_DiskInfo_Persistence `protobuf:"bytes,1,opt,name=persistence" json:"persistence,omitempty"` + // Describes how this disk resource will be mounted in the + // container. If not set, the disk resource will be used as the + // sandbox. Otherwise, it will be mounted according to the + // 'container_path' inside 'volume'. The 'host_path' inside + // 'volume' is ignored. + // NOTE: If 'volume' is set but 'persistence' is not set, the + // volume will be automatically garbage collected after + // task/executor terminates. Currently, if 'persistence' is set, + // 'volume' must be set. + Volume *Volume `protobuf:"bytes,2,opt,name=volume" json:"volume,omitempty"` + Source *Resource_DiskInfo_Source `protobuf:"bytes,3,opt,name=source" json:"source,omitempty"` +} + +func (m *Resource_DiskInfo) Reset() { *m = Resource_DiskInfo{} } +func (*Resource_DiskInfo) ProtoMessage() {} +func (*Resource_DiskInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{29, 2} } + +func (m *Resource_DiskInfo) GetPersistence() *Resource_DiskInfo_Persistence { + if m != nil { + return m.Persistence + } + return nil +} + +func (m *Resource_DiskInfo) GetVolume() *Volume { + if m != nil { + return m.Volume + } + return nil +} + +func (m *Resource_DiskInfo) GetSource() *Resource_DiskInfo_Source { + if m != nil { + return m.Source + } + return nil +} + +// Describes a persistent disk volume. +// +// A persistent disk volume will not be automatically garbage +// collected if the task/executor/agent terminates, but will be +// re-offered to the framework(s) belonging to the 'role'. +// +// NOTE: Currently, we do not allow persistent disk volumes +// without a reservation (i.e., 'role' cannot be '*'). +type Resource_DiskInfo_Persistence struct { + // A unique ID for the persistent disk volume. This ID must be + // unique per role on each agent. Although it is possible to use + // the same ID on different agents in the cluster and to reuse + // IDs after a volume with that ID has been destroyed, both + // practices are discouraged. + ID string `protobuf:"bytes,1,req,name=id" json:"id"` + // This field indicates the principal of the operator or + // framework that created this volume. It is used in conjunction + // with the "destroy" ACL to determine whether an entity + // attempting to destroy the volume is permitted to do so. + // + // NOTE: This field should match the FrameworkInfo.principal of + // the framework that created the volume. + Principal *string `protobuf:"bytes,2,opt,name=principal" json:"principal,omitempty"` +} + +func (m *Resource_DiskInfo_Persistence) Reset() { *m = Resource_DiskInfo_Persistence{} } +func (*Resource_DiskInfo_Persistence) ProtoMessage() {} +func (*Resource_DiskInfo_Persistence) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{29, 2, 0} +} + +func (m *Resource_DiskInfo_Persistence) GetID() string { + if m != nil { + return m.ID + } + return "" +} + +func (m *Resource_DiskInfo_Persistence) GetPrincipal() string { + if m != nil && m.Principal != nil { + return *m.Principal + } + return "" +} + +// Describes where a disk originates from. +// TODO(jmlvanre): Add support for BLOCK devices. +type Resource_DiskInfo_Source struct { + Type Resource_DiskInfo_Source_Type `protobuf:"varint,1,req,name=type,enum=mesos.Resource_DiskInfo_Source_Type" json:"type"` + Path *Resource_DiskInfo_Source_Path `protobuf:"bytes,2,opt,name=path" json:"path,omitempty"` + Mount *Resource_DiskInfo_Source_Mount `protobuf:"bytes,3,opt,name=mount" json:"mount,omitempty"` + // An identifier for this source. This field maps onto CSI + // volume IDs and is not expected to be set by frameworks. + ID *string `protobuf:"bytes,4,opt,name=id" json:"id,omitempty"` + // Additional metadata for this source. This field maps onto CSI + // volume metadata and is not expected to be set by frameworks. + Metadata *Labels `protobuf:"bytes,5,opt,name=metadata" json:"metadata,omitempty"` + // This field serves as an indirection to a set of storage + // vendor specific disk parameters which describe the properties + // of the disk. The operator will setup mappings between a + // profile name to a set of vendor specific disk parameters. And + // the framework will do disk selection based on profile names, + // instead of vendor specific disk parameters. + // + // Also see the DiskProfile module. + Profile *string `protobuf:"bytes,6,opt,name=profile" json:"profile,omitempty"` +} + +func (m *Resource_DiskInfo_Source) Reset() { *m = Resource_DiskInfo_Source{} } +func (*Resource_DiskInfo_Source) ProtoMessage() {} +func (*Resource_DiskInfo_Source) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{29, 2, 1} +} + +func (m *Resource_DiskInfo_Source) GetType() Resource_DiskInfo_Source_Type { + if m != nil { + return m.Type + } + return Resource_DiskInfo_Source_UNKNOWN +} + +func (m *Resource_DiskInfo_Source) GetPath() *Resource_DiskInfo_Source_Path { + if m != nil { + return m.Path + } + return nil +} + +func (m *Resource_DiskInfo_Source) GetMount() *Resource_DiskInfo_Source_Mount { + if m != nil { + return m.Mount + } + return nil +} + +func (m *Resource_DiskInfo_Source) GetID() string { + if m != nil && m.ID != nil { + return *m.ID + } + return "" +} + +func (m *Resource_DiskInfo_Source) GetMetadata() *Labels { + if m != nil { + return m.Metadata + } + return nil +} + +func (m *Resource_DiskInfo_Source) GetProfile() string { + if m != nil && m.Profile != nil { + return *m.Profile + } + return "" +} + +// A folder that can be located on a separate disk device. This +// can be shared and carved up as necessary between frameworks. +type Resource_DiskInfo_Source_Path struct { + // Path to the folder (e.g., /mnt/raid/disk0). If the path is a + // relative path, it is relative to the agent work directory. + Root *string `protobuf:"bytes,1,opt,name=root" json:"root,omitempty"` +} + +func (m *Resource_DiskInfo_Source_Path) Reset() { *m = Resource_DiskInfo_Source_Path{} } +func (*Resource_DiskInfo_Source_Path) ProtoMessage() {} +func (*Resource_DiskInfo_Source_Path) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{29, 2, 1, 0} +} + +func (m *Resource_DiskInfo_Source_Path) GetRoot() string { + if m != nil && m.Root != nil { + return *m.Root + } + return "" +} + +// A mounted file-system set up by the Agent administrator. This +// can only be used exclusively: a framework cannot accept a +// partial amount of this disk. +type Resource_DiskInfo_Source_Mount struct { + // Path to mount point (e.g., /mnt/raid/disk0). If the path is a + // relative path, it is relative to the agent work directory. + Root *string `protobuf:"bytes,1,opt,name=root" json:"root,omitempty"` +} + +func (m *Resource_DiskInfo_Source_Mount) Reset() { *m = Resource_DiskInfo_Source_Mount{} } +func (*Resource_DiskInfo_Source_Mount) ProtoMessage() {} +func (*Resource_DiskInfo_Source_Mount) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{29, 2, 1, 1} +} + +func (m *Resource_DiskInfo_Source_Mount) GetRoot() string { + if m != nil && m.Root != nil { + return *m.Root + } + return "" +} + +type Resource_RevocableInfo struct { +} + +func (m *Resource_RevocableInfo) Reset() { *m = Resource_RevocableInfo{} } +func (*Resource_RevocableInfo) ProtoMessage() {} +func (*Resource_RevocableInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{29, 3} } + +// Allow the resource to be shared across tasks. +type Resource_SharedInfo struct { +} + +func (m *Resource_SharedInfo) Reset() { *m = Resource_SharedInfo{} } +func (*Resource_SharedInfo) ProtoMessage() {} +func (*Resource_SharedInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{29, 4} } + +// * +// When the network bandwidth caps are enabled and the container +// is over its limit, outbound packets may be either delayed or +// dropped completely either because it exceeds the maximum bandwidth +// allocation for a single container (the cap) or because the combined +// network traffic of multiple containers on the host exceeds the +// transmit capacity of the host (the share). We can report the +// following statistics for each of these conditions exported directly +// from the Linux Traffic Control Queueing Discipline. +// +// id : name of the limiter, e.g. 'tx_bw_cap' +// backlog : number of packets currently delayed +// bytes : total bytes seen +// drops : number of packets dropped in total +// overlimits : number of packets which exceeded allocation +// packets : total packets seen +// qlen : number of packets currently queued +// rate_bps : throughput in bytes/sec +// rate_pps : throughput in packets/sec +// requeues : number of times a packet has been delayed due to +// locking or device contention issues +// +// More information on the operation of Linux Traffic Control can be +// found at http://www.lartc.org/lartc.html. +type TrafficControlStatistics struct { + ID string `protobuf:"bytes,1,req,name=id" json:"id"` + Backlog *uint64 `protobuf:"varint,2,opt,name=backlog" json:"backlog,omitempty"` + Bytes *uint64 `protobuf:"varint,3,opt,name=bytes" json:"bytes,omitempty"` + Drops *uint64 `protobuf:"varint,4,opt,name=drops" json:"drops,omitempty"` + Overlimits *uint64 `protobuf:"varint,5,opt,name=overlimits" json:"overlimits,omitempty"` + Packets *uint64 `protobuf:"varint,6,opt,name=packets" json:"packets,omitempty"` + Qlen *uint64 `protobuf:"varint,7,opt,name=qlen" json:"qlen,omitempty"` + RateBPS *uint64 `protobuf:"varint,8,opt,name=ratebps" json:"ratebps,omitempty"` + RatePPS *uint64 `protobuf:"varint,9,opt,name=ratepps" json:"ratepps,omitempty"` + Requeues *uint64 `protobuf:"varint,10,opt,name=requeues" json:"requeues,omitempty"` +} + +func (m *TrafficControlStatistics) Reset() { *m = TrafficControlStatistics{} } +func (*TrafficControlStatistics) ProtoMessage() {} +func (*TrafficControlStatistics) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{30} } + +func (m *TrafficControlStatistics) GetID() string { + if m != nil { + return m.ID + } + return "" +} + +func (m *TrafficControlStatistics) GetBacklog() uint64 { + if m != nil && m.Backlog != nil { + return *m.Backlog + } + return 0 +} + +func (m *TrafficControlStatistics) GetBytes() uint64 { + if m != nil && m.Bytes != nil { + return *m.Bytes + } + return 0 +} + +func (m *TrafficControlStatistics) GetDrops() uint64 { + if m != nil && m.Drops != nil { + return *m.Drops + } + return 0 +} + +func (m *TrafficControlStatistics) GetOverlimits() uint64 { + if m != nil && m.Overlimits != nil { + return *m.Overlimits + } + return 0 +} + +func (m *TrafficControlStatistics) GetPackets() uint64 { + if m != nil && m.Packets != nil { + return *m.Packets + } + return 0 +} + +func (m *TrafficControlStatistics) GetQlen() uint64 { + if m != nil && m.Qlen != nil { + return *m.Qlen + } + return 0 +} + +func (m *TrafficControlStatistics) GetRateBPS() uint64 { + if m != nil && m.RateBPS != nil { + return *m.RateBPS + } + return 0 +} + +func (m *TrafficControlStatistics) GetRatePPS() uint64 { + if m != nil && m.RatePPS != nil { + return *m.RatePPS + } + return 0 +} + +func (m *TrafficControlStatistics) GetRequeues() uint64 { + if m != nil && m.Requeues != nil { + return *m.Requeues + } + return 0 +} + +type IpStatistics struct { + Forwarding *int64 `protobuf:"varint,1,opt,name=Forwarding" json:"Forwarding,omitempty"` + DefaultTTL *int64 `protobuf:"varint,2,opt,name=DefaultTTL" json:"DefaultTTL,omitempty"` + InReceives *int64 `protobuf:"varint,3,opt,name=InReceives" json:"InReceives,omitempty"` + InHdrErrors *int64 `protobuf:"varint,4,opt,name=InHdrErrors" json:"InHdrErrors,omitempty"` + InAddrErrors *int64 `protobuf:"varint,5,opt,name=InAddrErrors" json:"InAddrErrors,omitempty"` + ForwDatagrams *int64 `protobuf:"varint,6,opt,name=ForwDatagrams" json:"ForwDatagrams,omitempty"` + InUnknownProtos *int64 `protobuf:"varint,7,opt,name=InUnknownProtos" json:"InUnknownProtos,omitempty"` + InDiscards *int64 `protobuf:"varint,8,opt,name=InDiscards" json:"InDiscards,omitempty"` + InDelivers *int64 `protobuf:"varint,9,opt,name=InDelivers" json:"InDelivers,omitempty"` + OutRequests *int64 `protobuf:"varint,10,opt,name=OutRequests" json:"OutRequests,omitempty"` + OutDiscards *int64 `protobuf:"varint,11,opt,name=OutDiscards" json:"OutDiscards,omitempty"` + OutNoRoutes *int64 `protobuf:"varint,12,opt,name=OutNoRoutes" json:"OutNoRoutes,omitempty"` + ReasmTimeout *int64 `protobuf:"varint,13,opt,name=ReasmTimeout" json:"ReasmTimeout,omitempty"` + ReasmReqds *int64 `protobuf:"varint,14,opt,name=ReasmReqds" json:"ReasmReqds,omitempty"` + ReasmOKs *int64 `protobuf:"varint,15,opt,name=ReasmOKs" json:"ReasmOKs,omitempty"` + ReasmFails *int64 `protobuf:"varint,16,opt,name=ReasmFails" json:"ReasmFails,omitempty"` + FragOKs *int64 `protobuf:"varint,17,opt,name=FragOKs" json:"FragOKs,omitempty"` + FragFails *int64 `protobuf:"varint,18,opt,name=FragFails" json:"FragFails,omitempty"` + FragCreates *int64 `protobuf:"varint,19,opt,name=FragCreates" json:"FragCreates,omitempty"` +} + +func (m *IpStatistics) Reset() { *m = IpStatistics{} } +func (*IpStatistics) ProtoMessage() {} +func (*IpStatistics) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{31} } + +func (m *IpStatistics) GetForwarding() int64 { + if m != nil && m.Forwarding != nil { + return *m.Forwarding + } + return 0 +} + +func (m *IpStatistics) GetDefaultTTL() int64 { + if m != nil && m.DefaultTTL != nil { + return *m.DefaultTTL + } + return 0 +} + +func (m *IpStatistics) GetInReceives() int64 { + if m != nil && m.InReceives != nil { + return *m.InReceives + } + return 0 +} + +func (m *IpStatistics) GetInHdrErrors() int64 { + if m != nil && m.InHdrErrors != nil { + return *m.InHdrErrors + } + return 0 +} + +func (m *IpStatistics) GetInAddrErrors() int64 { + if m != nil && m.InAddrErrors != nil { + return *m.InAddrErrors + } + return 0 +} + +func (m *IpStatistics) GetForwDatagrams() int64 { + if m != nil && m.ForwDatagrams != nil { + return *m.ForwDatagrams + } + return 0 +} + +func (m *IpStatistics) GetInUnknownProtos() int64 { + if m != nil && m.InUnknownProtos != nil { + return *m.InUnknownProtos + } + return 0 +} + +func (m *IpStatistics) GetInDiscards() int64 { + if m != nil && m.InDiscards != nil { + return *m.InDiscards + } + return 0 +} + +func (m *IpStatistics) GetInDelivers() int64 { + if m != nil && m.InDelivers != nil { + return *m.InDelivers + } + return 0 +} + +func (m *IpStatistics) GetOutRequests() int64 { + if m != nil && m.OutRequests != nil { + return *m.OutRequests + } + return 0 +} + +func (m *IpStatistics) GetOutDiscards() int64 { + if m != nil && m.OutDiscards != nil { + return *m.OutDiscards + } + return 0 +} + +func (m *IpStatistics) GetOutNoRoutes() int64 { + if m != nil && m.OutNoRoutes != nil { + return *m.OutNoRoutes + } + return 0 +} + +func (m *IpStatistics) GetReasmTimeout() int64 { + if m != nil && m.ReasmTimeout != nil { + return *m.ReasmTimeout + } + return 0 +} + +func (m *IpStatistics) GetReasmReqds() int64 { + if m != nil && m.ReasmReqds != nil { + return *m.ReasmReqds + } + return 0 +} + +func (m *IpStatistics) GetReasmOKs() int64 { + if m != nil && m.ReasmOKs != nil { + return *m.ReasmOKs + } + return 0 +} + +func (m *IpStatistics) GetReasmFails() int64 { + if m != nil && m.ReasmFails != nil { + return *m.ReasmFails + } + return 0 +} + +func (m *IpStatistics) GetFragOKs() int64 { + if m != nil && m.FragOKs != nil { + return *m.FragOKs + } + return 0 +} + +func (m *IpStatistics) GetFragFails() int64 { + if m != nil && m.FragFails != nil { + return *m.FragFails + } + return 0 +} + +func (m *IpStatistics) GetFragCreates() int64 { + if m != nil && m.FragCreates != nil { + return *m.FragCreates + } + return 0 +} + +type IcmpStatistics struct { + InMsgs *int64 `protobuf:"varint,1,opt,name=InMsgs" json:"InMsgs,omitempty"` + InErrors *int64 `protobuf:"varint,2,opt,name=InErrors" json:"InErrors,omitempty"` + InCsumErrors *int64 `protobuf:"varint,3,opt,name=InCsumErrors" json:"InCsumErrors,omitempty"` + InDestUnreachs *int64 `protobuf:"varint,4,opt,name=InDestUnreachs" json:"InDestUnreachs,omitempty"` + InTimeExcds *int64 `protobuf:"varint,5,opt,name=InTimeExcds" json:"InTimeExcds,omitempty"` + InParmProbs *int64 `protobuf:"varint,6,opt,name=InParmProbs" json:"InParmProbs,omitempty"` + InSrcQuenchs *int64 `protobuf:"varint,7,opt,name=InSrcQuenchs" json:"InSrcQuenchs,omitempty"` + InRedirects *int64 `protobuf:"varint,8,opt,name=InRedirects" json:"InRedirects,omitempty"` + InEchos *int64 `protobuf:"varint,9,opt,name=InEchos" json:"InEchos,omitempty"` + InEchoReps *int64 `protobuf:"varint,10,opt,name=InEchoReps" json:"InEchoReps,omitempty"` + InTimestamps *int64 `protobuf:"varint,11,opt,name=InTimestamps" json:"InTimestamps,omitempty"` + InTimestampReps *int64 `protobuf:"varint,12,opt,name=InTimestampReps" json:"InTimestampReps,omitempty"` + InAddrMasks *int64 `protobuf:"varint,13,opt,name=InAddrMasks" json:"InAddrMasks,omitempty"` + InAddrMaskReps *int64 `protobuf:"varint,14,opt,name=InAddrMaskReps" json:"InAddrMaskReps,omitempty"` + OutMsgs *int64 `protobuf:"varint,15,opt,name=OutMsgs" json:"OutMsgs,omitempty"` + OutErrors *int64 `protobuf:"varint,16,opt,name=OutErrors" json:"OutErrors,omitempty"` + OutDestUnreachs *int64 `protobuf:"varint,17,opt,name=OutDestUnreachs" json:"OutDestUnreachs,omitempty"` + OutTimeExcds *int64 `protobuf:"varint,18,opt,name=OutTimeExcds" json:"OutTimeExcds,omitempty"` + OutParmProbs *int64 `protobuf:"varint,19,opt,name=OutParmProbs" json:"OutParmProbs,omitempty"` + OutSrcQuenchs *int64 `protobuf:"varint,20,opt,name=OutSrcQuenchs" json:"OutSrcQuenchs,omitempty"` + OutRedirects *int64 `protobuf:"varint,21,opt,name=OutRedirects" json:"OutRedirects,omitempty"` + OutEchos *int64 `protobuf:"varint,22,opt,name=OutEchos" json:"OutEchos,omitempty"` + OutEchoReps *int64 `protobuf:"varint,23,opt,name=OutEchoReps" json:"OutEchoReps,omitempty"` + OutTimestamps *int64 `protobuf:"varint,24,opt,name=OutTimestamps" json:"OutTimestamps,omitempty"` + OutTimestampReps *int64 `protobuf:"varint,25,opt,name=OutTimestampReps" json:"OutTimestampReps,omitempty"` + OutAddrMasks *int64 `protobuf:"varint,26,opt,name=OutAddrMasks" json:"OutAddrMasks,omitempty"` + OutAddrMaskReps *int64 `protobuf:"varint,27,opt,name=OutAddrMaskReps" json:"OutAddrMaskReps,omitempty"` +} + +func (m *IcmpStatistics) Reset() { *m = IcmpStatistics{} } +func (*IcmpStatistics) ProtoMessage() {} +func (*IcmpStatistics) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{32} } + +func (m *IcmpStatistics) GetInMsgs() int64 { + if m != nil && m.InMsgs != nil { + return *m.InMsgs + } + return 0 +} + +func (m *IcmpStatistics) GetInErrors() int64 { + if m != nil && m.InErrors != nil { + return *m.InErrors + } + return 0 +} + +func (m *IcmpStatistics) GetInCsumErrors() int64 { + if m != nil && m.InCsumErrors != nil { + return *m.InCsumErrors + } + return 0 +} + +func (m *IcmpStatistics) GetInDestUnreachs() int64 { + if m != nil && m.InDestUnreachs != nil { + return *m.InDestUnreachs + } + return 0 +} + +func (m *IcmpStatistics) GetInTimeExcds() int64 { + if m != nil && m.InTimeExcds != nil { + return *m.InTimeExcds + } + return 0 +} + +func (m *IcmpStatistics) GetInParmProbs() int64 { + if m != nil && m.InParmProbs != nil { + return *m.InParmProbs + } + return 0 +} + +func (m *IcmpStatistics) GetInSrcQuenchs() int64 { + if m != nil && m.InSrcQuenchs != nil { + return *m.InSrcQuenchs + } + return 0 +} + +func (m *IcmpStatistics) GetInRedirects() int64 { + if m != nil && m.InRedirects != nil { + return *m.InRedirects + } + return 0 +} + +func (m *IcmpStatistics) GetInEchos() int64 { + if m != nil && m.InEchos != nil { + return *m.InEchos + } + return 0 +} + +func (m *IcmpStatistics) GetInEchoReps() int64 { + if m != nil && m.InEchoReps != nil { + return *m.InEchoReps + } + return 0 +} + +func (m *IcmpStatistics) GetInTimestamps() int64 { + if m != nil && m.InTimestamps != nil { + return *m.InTimestamps + } + return 0 +} + +func (m *IcmpStatistics) GetInTimestampReps() int64 { + if m != nil && m.InTimestampReps != nil { + return *m.InTimestampReps + } + return 0 +} + +func (m *IcmpStatistics) GetInAddrMasks() int64 { + if m != nil && m.InAddrMasks != nil { + return *m.InAddrMasks + } + return 0 +} + +func (m *IcmpStatistics) GetInAddrMaskReps() int64 { + if m != nil && m.InAddrMaskReps != nil { + return *m.InAddrMaskReps + } + return 0 +} + +func (m *IcmpStatistics) GetOutMsgs() int64 { + if m != nil && m.OutMsgs != nil { + return *m.OutMsgs + } + return 0 +} + +func (m *IcmpStatistics) GetOutErrors() int64 { + if m != nil && m.OutErrors != nil { + return *m.OutErrors + } + return 0 +} + +func (m *IcmpStatistics) GetOutDestUnreachs() int64 { + if m != nil && m.OutDestUnreachs != nil { + return *m.OutDestUnreachs + } + return 0 +} + +func (m *IcmpStatistics) GetOutTimeExcds() int64 { + if m != nil && m.OutTimeExcds != nil { + return *m.OutTimeExcds + } + return 0 +} + +func (m *IcmpStatistics) GetOutParmProbs() int64 { + if m != nil && m.OutParmProbs != nil { + return *m.OutParmProbs + } + return 0 +} + +func (m *IcmpStatistics) GetOutSrcQuenchs() int64 { + if m != nil && m.OutSrcQuenchs != nil { + return *m.OutSrcQuenchs + } + return 0 +} + +func (m *IcmpStatistics) GetOutRedirects() int64 { + if m != nil && m.OutRedirects != nil { + return *m.OutRedirects + } + return 0 +} + +func (m *IcmpStatistics) GetOutEchos() int64 { + if m != nil && m.OutEchos != nil { + return *m.OutEchos + } + return 0 +} + +func (m *IcmpStatistics) GetOutEchoReps() int64 { + if m != nil && m.OutEchoReps != nil { + return *m.OutEchoReps + } + return 0 +} + +func (m *IcmpStatistics) GetOutTimestamps() int64 { + if m != nil && m.OutTimestamps != nil { + return *m.OutTimestamps + } + return 0 +} + +func (m *IcmpStatistics) GetOutTimestampReps() int64 { + if m != nil && m.OutTimestampReps != nil { + return *m.OutTimestampReps + } + return 0 +} + +func (m *IcmpStatistics) GetOutAddrMasks() int64 { + if m != nil && m.OutAddrMasks != nil { + return *m.OutAddrMasks + } + return 0 +} + +func (m *IcmpStatistics) GetOutAddrMaskReps() int64 { + if m != nil && m.OutAddrMaskReps != nil { + return *m.OutAddrMaskReps + } + return 0 +} + +type TcpStatistics struct { + RtoAlgorithm *int64 `protobuf:"varint,1,opt,name=RtoAlgorithm" json:"RtoAlgorithm,omitempty"` + RtoMin *int64 `protobuf:"varint,2,opt,name=RtoMin" json:"RtoMin,omitempty"` + RtoMax *int64 `protobuf:"varint,3,opt,name=RtoMax" json:"RtoMax,omitempty"` + MaxConn *int64 `protobuf:"varint,4,opt,name=MaxConn" json:"MaxConn,omitempty"` + ActiveOpens *int64 `protobuf:"varint,5,opt,name=ActiveOpens" json:"ActiveOpens,omitempty"` + PassiveOpens *int64 `protobuf:"varint,6,opt,name=PassiveOpens" json:"PassiveOpens,omitempty"` + AttemptFails *int64 `protobuf:"varint,7,opt,name=AttemptFails" json:"AttemptFails,omitempty"` + EstabResets *int64 `protobuf:"varint,8,opt,name=EstabResets" json:"EstabResets,omitempty"` + CurrEstab *int64 `protobuf:"varint,9,opt,name=CurrEstab" json:"CurrEstab,omitempty"` + InSegs *int64 `protobuf:"varint,10,opt,name=InSegs" json:"InSegs,omitempty"` + OutSegs *int64 `protobuf:"varint,11,opt,name=OutSegs" json:"OutSegs,omitempty"` + RetransSegs *int64 `protobuf:"varint,12,opt,name=RetransSegs" json:"RetransSegs,omitempty"` + InErrs *int64 `protobuf:"varint,13,opt,name=InErrs" json:"InErrs,omitempty"` + OutRsts *int64 `protobuf:"varint,14,opt,name=OutRsts" json:"OutRsts,omitempty"` + InCsumErrors *int64 `protobuf:"varint,15,opt,name=InCsumErrors" json:"InCsumErrors,omitempty"` +} + +func (m *TcpStatistics) Reset() { *m = TcpStatistics{} } +func (*TcpStatistics) ProtoMessage() {} +func (*TcpStatistics) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{33} } + +func (m *TcpStatistics) GetRtoAlgorithm() int64 { + if m != nil && m.RtoAlgorithm != nil { + return *m.RtoAlgorithm + } + return 0 +} + +func (m *TcpStatistics) GetRtoMin() int64 { + if m != nil && m.RtoMin != nil { + return *m.RtoMin + } + return 0 +} + +func (m *TcpStatistics) GetRtoMax() int64 { + if m != nil && m.RtoMax != nil { + return *m.RtoMax + } + return 0 +} + +func (m *TcpStatistics) GetMaxConn() int64 { + if m != nil && m.MaxConn != nil { + return *m.MaxConn + } + return 0 +} + +func (m *TcpStatistics) GetActiveOpens() int64 { + if m != nil && m.ActiveOpens != nil { + return *m.ActiveOpens + } + return 0 +} + +func (m *TcpStatistics) GetPassiveOpens() int64 { + if m != nil && m.PassiveOpens != nil { + return *m.PassiveOpens + } + return 0 +} + +func (m *TcpStatistics) GetAttemptFails() int64 { + if m != nil && m.AttemptFails != nil { + return *m.AttemptFails + } + return 0 +} + +func (m *TcpStatistics) GetEstabResets() int64 { + if m != nil && m.EstabResets != nil { + return *m.EstabResets + } + return 0 +} + +func (m *TcpStatistics) GetCurrEstab() int64 { + if m != nil && m.CurrEstab != nil { + return *m.CurrEstab + } + return 0 +} + +func (m *TcpStatistics) GetInSegs() int64 { + if m != nil && m.InSegs != nil { + return *m.InSegs + } + return 0 +} + +func (m *TcpStatistics) GetOutSegs() int64 { + if m != nil && m.OutSegs != nil { + return *m.OutSegs + } + return 0 +} + +func (m *TcpStatistics) GetRetransSegs() int64 { + if m != nil && m.RetransSegs != nil { + return *m.RetransSegs + } + return 0 +} + +func (m *TcpStatistics) GetInErrs() int64 { + if m != nil && m.InErrs != nil { + return *m.InErrs + } + return 0 +} + +func (m *TcpStatistics) GetOutRsts() int64 { + if m != nil && m.OutRsts != nil { + return *m.OutRsts + } + return 0 +} + +func (m *TcpStatistics) GetInCsumErrors() int64 { + if m != nil && m.InCsumErrors != nil { + return *m.InCsumErrors + } + return 0 +} + +type UdpStatistics struct { + InDatagrams *int64 `protobuf:"varint,1,opt,name=InDatagrams" json:"InDatagrams,omitempty"` + NoPorts *int64 `protobuf:"varint,2,opt,name=NoPorts" json:"NoPorts,omitempty"` + InErrors *int64 `protobuf:"varint,3,opt,name=InErrors" json:"InErrors,omitempty"` + OutDatagrams *int64 `protobuf:"varint,4,opt,name=OutDatagrams" json:"OutDatagrams,omitempty"` + RcvbufErrors *int64 `protobuf:"varint,5,opt,name=RcvbufErrors" json:"RcvbufErrors,omitempty"` + SndbufErrors *int64 `protobuf:"varint,6,opt,name=SndbufErrors" json:"SndbufErrors,omitempty"` + InCsumErrors *int64 `protobuf:"varint,7,opt,name=InCsumErrors" json:"InCsumErrors,omitempty"` + IgnoredMulti *int64 `protobuf:"varint,8,opt,name=IgnoredMulti" json:"IgnoredMulti,omitempty"` +} + +func (m *UdpStatistics) Reset() { *m = UdpStatistics{} } +func (*UdpStatistics) ProtoMessage() {} +func (*UdpStatistics) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{34} } + +func (m *UdpStatistics) GetInDatagrams() int64 { + if m != nil && m.InDatagrams != nil { + return *m.InDatagrams + } + return 0 +} + +func (m *UdpStatistics) GetNoPorts() int64 { + if m != nil && m.NoPorts != nil { + return *m.NoPorts + } + return 0 +} + +func (m *UdpStatistics) GetInErrors() int64 { + if m != nil && m.InErrors != nil { + return *m.InErrors + } + return 0 +} + +func (m *UdpStatistics) GetOutDatagrams() int64 { + if m != nil && m.OutDatagrams != nil { + return *m.OutDatagrams + } + return 0 +} + +func (m *UdpStatistics) GetRcvbufErrors() int64 { + if m != nil && m.RcvbufErrors != nil { + return *m.RcvbufErrors + } + return 0 +} + +func (m *UdpStatistics) GetSndbufErrors() int64 { + if m != nil && m.SndbufErrors != nil { + return *m.SndbufErrors + } + return 0 +} + +func (m *UdpStatistics) GetInCsumErrors() int64 { + if m != nil && m.InCsumErrors != nil { + return *m.InCsumErrors + } + return 0 +} + +func (m *UdpStatistics) GetIgnoredMulti() int64 { + if m != nil && m.IgnoredMulti != nil { + return *m.IgnoredMulti + } + return 0 +} + +type SNMPStatistics struct { + IPStats *IpStatistics `protobuf:"bytes,1,opt,name=ip_stats,json=ipStats" json:"ip_stats,omitempty"` + ICMPStats *IcmpStatistics `protobuf:"bytes,2,opt,name=icmp_stats,json=icmpStats" json:"icmp_stats,omitempty"` + TCPStats *TcpStatistics `protobuf:"bytes,3,opt,name=tcp_stats,json=tcpStats" json:"tcp_stats,omitempty"` + UDPStats *UdpStatistics `protobuf:"bytes,4,opt,name=udp_stats,json=udpStats" json:"udp_stats,omitempty"` +} + +func (m *SNMPStatistics) Reset() { *m = SNMPStatistics{} } +func (*SNMPStatistics) ProtoMessage() {} +func (*SNMPStatistics) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{35} } + +func (m *SNMPStatistics) GetIPStats() *IpStatistics { + if m != nil { + return m.IPStats + } + return nil +} + +func (m *SNMPStatistics) GetICMPStats() *IcmpStatistics { + if m != nil { + return m.ICMPStats + } + return nil +} + +func (m *SNMPStatistics) GetTCPStats() *TcpStatistics { + if m != nil { + return m.TCPStats + } + return nil +} + +func (m *SNMPStatistics) GetUDPStats() *UdpStatistics { + if m != nil { + return m.UDPStats + } + return nil +} + +type DiskStatistics struct { + Source *Resource_DiskInfo_Source `protobuf:"bytes,1,opt,name=source" json:"source,omitempty"` + Persistence *Resource_DiskInfo_Persistence `protobuf:"bytes,2,opt,name=persistence" json:"persistence,omitempty"` + LimitBytes *uint64 `protobuf:"varint,3,opt,name=limit_bytes,json=limitBytes" json:"limit_bytes,omitempty"` + UsedBytes *uint64 `protobuf:"varint,4,opt,name=used_bytes,json=usedBytes" json:"used_bytes,omitempty"` +} + +func (m *DiskStatistics) Reset() { *m = DiskStatistics{} } +func (*DiskStatistics) ProtoMessage() {} +func (*DiskStatistics) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{36} } + +func (m *DiskStatistics) GetSource() *Resource_DiskInfo_Source { + if m != nil { + return m.Source + } + return nil +} + +func (m *DiskStatistics) GetPersistence() *Resource_DiskInfo_Persistence { + if m != nil { + return m.Persistence + } + return nil +} + +func (m *DiskStatistics) GetLimitBytes() uint64 { + if m != nil && m.LimitBytes != nil { + return *m.LimitBytes + } + return 0 +} + +func (m *DiskStatistics) GetUsedBytes() uint64 { + if m != nil && m.UsedBytes != nil { + return *m.UsedBytes + } + return 0 +} + +// * +// A snapshot of resource usage statistics. +type ResourceStatistics struct { + Timestamp float64 `protobuf:"fixed64,1,req,name=timestamp" json:"timestamp"` + Processes *uint32 `protobuf:"varint,30,opt,name=processes" json:"processes,omitempty"` + Threads *uint32 `protobuf:"varint,31,opt,name=threads" json:"threads,omitempty"` + // CPU Usage Information: + // Total CPU time spent in user mode, and kernel mode. + CPUsUserTimeSecs *float64 `protobuf:"fixed64,2,opt,name=cpus_user_time_secs,json=cpusUserTimeSecs" json:"cpus_user_time_secs,omitempty"` + CPUsSystemTimeSecs *float64 `protobuf:"fixed64,3,opt,name=cpus_system_time_secs,json=cpusSystemTimeSecs" json:"cpus_system_time_secs,omitempty"` + // Number of CPUs allocated. + CPUsLimit *float64 `protobuf:"fixed64,4,opt,name=cpus_limit,json=cpusLimit" json:"cpus_limit,omitempty"` + // cpu.stat on process throttling (for contention issues). + CPUsNrPeriods *uint32 `protobuf:"varint,7,opt,name=cpus_nr_periods,json=cpusNrPeriods" json:"cpus_nr_periods,omitempty"` + CPUsNrThrottled *uint32 `protobuf:"varint,8,opt,name=cpus_nr_throttled,json=cpusNrThrottled" json:"cpus_nr_throttled,omitempty"` + CPUsThrottledTimeSecs *float64 `protobuf:"fixed64,9,opt,name=cpus_throttled_time_secs,json=cpusThrottledTimeSecs" json:"cpus_throttled_time_secs,omitempty"` + // mem_total_bytes was added in 0.23.0 to represent the total memory + // of a process in RAM (as opposed to in Swap). This was previously + // reported as mem_rss_bytes, which was also changed in 0.23.0 to + // represent only the anonymous memory usage, to keep in sync with + // Linux kernel's (arguably erroneous) use of terminology. + MemTotalBytes *uint64 `protobuf:"varint,36,opt,name=mem_total_bytes,json=memTotalBytes" json:"mem_total_bytes,omitempty"` + // Total memory + swap usage. This is set if swap is enabled. + MemTotalMemswBytes *uint64 `protobuf:"varint,37,opt,name=mem_total_memsw_bytes,json=memTotalMemswBytes" json:"mem_total_memsw_bytes,omitempty"` + // Hard memory limit for a container. + MemLimitBytes *uint64 `protobuf:"varint,6,opt,name=mem_limit_bytes,json=memLimitBytes" json:"mem_limit_bytes,omitempty"` + // Soft memory limit for a container. + MemSoftLimitBytes *uint64 `protobuf:"varint,38,opt,name=mem_soft_limit_bytes,json=memSoftLimitBytes" json:"mem_soft_limit_bytes,omitempty"` + // TODO(chzhcn) mem_file_bytes and mem_anon_bytes are deprecated in + // 0.23.0 and will be removed in 0.24.0. + MemFileBytes *uint64 `protobuf:"varint,10,opt,name=mem_file_bytes,json=memFileBytes" json:"mem_file_bytes,omitempty"` + MemAnonBytes *uint64 `protobuf:"varint,11,opt,name=mem_anon_bytes,json=memAnonBytes" json:"mem_anon_bytes,omitempty"` + // mem_cache_bytes is added in 0.23.0 to represent page cache usage. + MemCacheBytes *uint64 `protobuf:"varint,39,opt,name=mem_cache_bytes,json=memCacheBytes" json:"mem_cache_bytes,omitempty"` + // Since 0.23.0, mem_rss_bytes is changed to represent only + // anonymous memory usage. Note that neither its requiredness, type, + // name nor numeric tag has been changed. + MemRSSBytes *uint64 `protobuf:"varint,5,opt,name=mem_rss_bytes,json=memRssBytes" json:"mem_rss_bytes,omitempty"` + MemMappedFileBytes *uint64 `protobuf:"varint,12,opt,name=mem_mapped_file_bytes,json=memMappedFileBytes" json:"mem_mapped_file_bytes,omitempty"` + // This is only set if swap is enabled. + MemSwapBytes *uint64 `protobuf:"varint,40,opt,name=mem_swap_bytes,json=memSwapBytes" json:"mem_swap_bytes,omitempty"` + MemUnevictableBytes *uint64 `protobuf:"varint,41,opt,name=mem_unevictable_bytes,json=memUnevictableBytes" json:"mem_unevictable_bytes,omitempty"` + // Number of occurrences of different levels of memory pressure + // events reported by memory cgroup. Pressure listening (re)starts + // with these values set to 0 when agent (re)starts. See + // https://www.kernel.org/doc/Documentation/cgroups/memory.txt for + // more details. + MemLowPressureCounter *uint64 `protobuf:"varint,32,opt,name=mem_low_pressure_counter,json=memLowPressureCounter" json:"mem_low_pressure_counter,omitempty"` + MemMediumPressureCounter *uint64 `protobuf:"varint,33,opt,name=mem_medium_pressure_counter,json=memMediumPressureCounter" json:"mem_medium_pressure_counter,omitempty"` + MemCriticalPressureCounter *uint64 `protobuf:"varint,34,opt,name=mem_critical_pressure_counter,json=memCriticalPressureCounter" json:"mem_critical_pressure_counter,omitempty"` + // Disk Usage Information for executor working directory. + DiskLimitBytes *uint64 `protobuf:"varint,26,opt,name=disk_limit_bytes,json=diskLimitBytes" json:"disk_limit_bytes,omitempty"` + DiskUsedBytes *uint64 `protobuf:"varint,27,opt,name=disk_used_bytes,json=diskUsedBytes" json:"disk_used_bytes,omitempty"` + // Per disk (resource) statistics. + DiskStatistics []DiskStatistics `protobuf:"bytes,43,rep,name=disk_statistics,json=diskStatistics" json:"disk_statistics"` + // Cgroups blkio statistics. + BlkioStatistics *CgroupInfo_Blkio_Statistics `protobuf:"bytes,44,opt,name=blkio_statistics,json=blkioStatistics" json:"blkio_statistics,omitempty"` + // Perf statistics. + Perf *PerfStatistics `protobuf:"bytes,13,opt,name=perf" json:"perf,omitempty"` + // Network Usage Information: + NetRxPackets *uint64 `protobuf:"varint,14,opt,name=net_rx_packets,json=netRxPackets" json:"net_rx_packets,omitempty"` + NetRxBytes *uint64 `protobuf:"varint,15,opt,name=net_rx_bytes,json=netRxBytes" json:"net_rx_bytes,omitempty"` + NetRxErrors *uint64 `protobuf:"varint,16,opt,name=net_rx_errors,json=netRxErrors" json:"net_rx_errors,omitempty"` + NetRxDropped *uint64 `protobuf:"varint,17,opt,name=net_rx_dropped,json=netRxDropped" json:"net_rx_dropped,omitempty"` + NetTxPackets *uint64 `protobuf:"varint,18,opt,name=net_tx_packets,json=netTxPackets" json:"net_tx_packets,omitempty"` + NetTxBytes *uint64 `protobuf:"varint,19,opt,name=net_tx_bytes,json=netTxBytes" json:"net_tx_bytes,omitempty"` + NetTxErrors *uint64 `protobuf:"varint,20,opt,name=net_tx_errors,json=netTxErrors" json:"net_tx_errors,omitempty"` + NetTxDropped *uint64 `protobuf:"varint,21,opt,name=net_tx_dropped,json=netTxDropped" json:"net_tx_dropped,omitempty"` + // The kernel keeps track of RTT (round-trip time) for its TCP + // sockets. RTT is a way to tell the latency of a container. + NetTCPRttMicrosecsP50 *float64 `protobuf:"fixed64,22,opt,name=net_tcp_rtt_microsecs_p50,json=netTcpRttMicrosecsP50" json:"net_tcp_rtt_microsecs_p50,omitempty"` + NetTCPRttMicrosecsP90 *float64 `protobuf:"fixed64,23,opt,name=net_tcp_rtt_microsecs_p90,json=netTcpRttMicrosecsP90" json:"net_tcp_rtt_microsecs_p90,omitempty"` + NetTCPRttMicrosecsP95 *float64 `protobuf:"fixed64,24,opt,name=net_tcp_rtt_microsecs_p95,json=netTcpRttMicrosecsP95" json:"net_tcp_rtt_microsecs_p95,omitempty"` + NetTCPRttMicrosecsP99 *float64 `protobuf:"fixed64,25,opt,name=net_tcp_rtt_microsecs_p99,json=netTcpRttMicrosecsP99" json:"net_tcp_rtt_microsecs_p99,omitempty"` + NetTCPActiveConnections *float64 `protobuf:"fixed64,28,opt,name=net_tcp_active_connections,json=netTcpActiveConnections" json:"net_tcp_active_connections,omitempty"` + NetTCPTimeWaitConnections *float64 `protobuf:"fixed64,29,opt,name=net_tcp_time_wait_connections,json=netTcpTimeWaitConnections" json:"net_tcp_time_wait_connections,omitempty"` + // Network traffic flowing into or out of a container can be delayed + // or dropped due to congestion or policy inside and outside the + // container. + NetTrafficControlStatistics []TrafficControlStatistics `protobuf:"bytes,35,rep,name=net_traffic_control_statistics,json=netTrafficControlStatistics" json:"net_traffic_control_statistics"` + // Network SNMP statistics for each container. + NetSNMPStatistics *SNMPStatistics `protobuf:"bytes,42,opt,name=net_snmp_statistics,json=netSnmpStatistics" json:"net_snmp_statistics,omitempty"` +} + +func (m *ResourceStatistics) Reset() { *m = ResourceStatistics{} } +func (*ResourceStatistics) ProtoMessage() {} +func (*ResourceStatistics) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{37} } + +func (m *ResourceStatistics) GetTimestamp() float64 { + if m != nil { + return m.Timestamp + } + return 0 +} + +func (m *ResourceStatistics) GetProcesses() uint32 { + if m != nil && m.Processes != nil { + return *m.Processes + } + return 0 +} + +func (m *ResourceStatistics) GetThreads() uint32 { + if m != nil && m.Threads != nil { + return *m.Threads + } + return 0 +} + +func (m *ResourceStatistics) GetCPUsUserTimeSecs() float64 { + if m != nil && m.CPUsUserTimeSecs != nil { + return *m.CPUsUserTimeSecs + } + return 0 +} + +func (m *ResourceStatistics) GetCPUsSystemTimeSecs() float64 { + if m != nil && m.CPUsSystemTimeSecs != nil { + return *m.CPUsSystemTimeSecs + } + return 0 +} + +func (m *ResourceStatistics) GetCPUsLimit() float64 { + if m != nil && m.CPUsLimit != nil { + return *m.CPUsLimit + } + return 0 +} + +func (m *ResourceStatistics) GetCPUsNrPeriods() uint32 { + if m != nil && m.CPUsNrPeriods != nil { + return *m.CPUsNrPeriods + } + return 0 +} + +func (m *ResourceStatistics) GetCPUsNrThrottled() uint32 { + if m != nil && m.CPUsNrThrottled != nil { + return *m.CPUsNrThrottled + } + return 0 +} + +func (m *ResourceStatistics) GetCPUsThrottledTimeSecs() float64 { + if m != nil && m.CPUsThrottledTimeSecs != nil { + return *m.CPUsThrottledTimeSecs + } + return 0 +} + +func (m *ResourceStatistics) GetMemTotalBytes() uint64 { + if m != nil && m.MemTotalBytes != nil { + return *m.MemTotalBytes + } + return 0 +} + +func (m *ResourceStatistics) GetMemTotalMemswBytes() uint64 { + if m != nil && m.MemTotalMemswBytes != nil { + return *m.MemTotalMemswBytes + } + return 0 +} + +func (m *ResourceStatistics) GetMemLimitBytes() uint64 { + if m != nil && m.MemLimitBytes != nil { + return *m.MemLimitBytes + } + return 0 +} + +func (m *ResourceStatistics) GetMemSoftLimitBytes() uint64 { + if m != nil && m.MemSoftLimitBytes != nil { + return *m.MemSoftLimitBytes + } + return 0 +} + +func (m *ResourceStatistics) GetMemFileBytes() uint64 { + if m != nil && m.MemFileBytes != nil { + return *m.MemFileBytes + } + return 0 +} + +func (m *ResourceStatistics) GetMemAnonBytes() uint64 { + if m != nil && m.MemAnonBytes != nil { + return *m.MemAnonBytes + } + return 0 +} + +func (m *ResourceStatistics) GetMemCacheBytes() uint64 { + if m != nil && m.MemCacheBytes != nil { + return *m.MemCacheBytes + } + return 0 +} + +func (m *ResourceStatistics) GetMemRSSBytes() uint64 { + if m != nil && m.MemRSSBytes != nil { + return *m.MemRSSBytes + } + return 0 +} + +func (m *ResourceStatistics) GetMemMappedFileBytes() uint64 { + if m != nil && m.MemMappedFileBytes != nil { + return *m.MemMappedFileBytes + } + return 0 +} + +func (m *ResourceStatistics) GetMemSwapBytes() uint64 { + if m != nil && m.MemSwapBytes != nil { + return *m.MemSwapBytes + } + return 0 +} + +func (m *ResourceStatistics) GetMemUnevictableBytes() uint64 { + if m != nil && m.MemUnevictableBytes != nil { + return *m.MemUnevictableBytes + } + return 0 +} + +func (m *ResourceStatistics) GetMemLowPressureCounter() uint64 { + if m != nil && m.MemLowPressureCounter != nil { + return *m.MemLowPressureCounter + } + return 0 +} + +func (m *ResourceStatistics) GetMemMediumPressureCounter() uint64 { + if m != nil && m.MemMediumPressureCounter != nil { + return *m.MemMediumPressureCounter + } + return 0 +} + +func (m *ResourceStatistics) GetMemCriticalPressureCounter() uint64 { + if m != nil && m.MemCriticalPressureCounter != nil { + return *m.MemCriticalPressureCounter + } + return 0 +} + +func (m *ResourceStatistics) GetDiskLimitBytes() uint64 { + if m != nil && m.DiskLimitBytes != nil { + return *m.DiskLimitBytes + } + return 0 +} + +func (m *ResourceStatistics) GetDiskUsedBytes() uint64 { + if m != nil && m.DiskUsedBytes != nil { + return *m.DiskUsedBytes + } + return 0 +} + +func (m *ResourceStatistics) GetDiskStatistics() []DiskStatistics { + if m != nil { + return m.DiskStatistics + } + return nil +} + +func (m *ResourceStatistics) GetBlkioStatistics() *CgroupInfo_Blkio_Statistics { + if m != nil { + return m.BlkioStatistics + } + return nil +} + +func (m *ResourceStatistics) GetPerf() *PerfStatistics { + if m != nil { + return m.Perf + } + return nil +} + +func (m *ResourceStatistics) GetNetRxPackets() uint64 { + if m != nil && m.NetRxPackets != nil { + return *m.NetRxPackets + } + return 0 +} + +func (m *ResourceStatistics) GetNetRxBytes() uint64 { + if m != nil && m.NetRxBytes != nil { + return *m.NetRxBytes + } + return 0 +} + +func (m *ResourceStatistics) GetNetRxErrors() uint64 { + if m != nil && m.NetRxErrors != nil { + return *m.NetRxErrors + } + return 0 +} + +func (m *ResourceStatistics) GetNetRxDropped() uint64 { + if m != nil && m.NetRxDropped != nil { + return *m.NetRxDropped + } + return 0 +} + +func (m *ResourceStatistics) GetNetTxPackets() uint64 { + if m != nil && m.NetTxPackets != nil { + return *m.NetTxPackets + } + return 0 +} + +func (m *ResourceStatistics) GetNetTxBytes() uint64 { + if m != nil && m.NetTxBytes != nil { + return *m.NetTxBytes + } + return 0 +} + +func (m *ResourceStatistics) GetNetTxErrors() uint64 { + if m != nil && m.NetTxErrors != nil { + return *m.NetTxErrors + } + return 0 +} + +func (m *ResourceStatistics) GetNetTxDropped() uint64 { + if m != nil && m.NetTxDropped != nil { + return *m.NetTxDropped + } + return 0 +} + +func (m *ResourceStatistics) GetNetTCPRttMicrosecsP50() float64 { + if m != nil && m.NetTCPRttMicrosecsP50 != nil { + return *m.NetTCPRttMicrosecsP50 + } + return 0 +} + +func (m *ResourceStatistics) GetNetTCPRttMicrosecsP90() float64 { + if m != nil && m.NetTCPRttMicrosecsP90 != nil { + return *m.NetTCPRttMicrosecsP90 + } + return 0 +} + +func (m *ResourceStatistics) GetNetTCPRttMicrosecsP95() float64 { + if m != nil && m.NetTCPRttMicrosecsP95 != nil { + return *m.NetTCPRttMicrosecsP95 + } + return 0 +} + +func (m *ResourceStatistics) GetNetTCPRttMicrosecsP99() float64 { + if m != nil && m.NetTCPRttMicrosecsP99 != nil { + return *m.NetTCPRttMicrosecsP99 + } + return 0 +} + +func (m *ResourceStatistics) GetNetTCPActiveConnections() float64 { + if m != nil && m.NetTCPActiveConnections != nil { + return *m.NetTCPActiveConnections + } + return 0 +} + +func (m *ResourceStatistics) GetNetTCPTimeWaitConnections() float64 { + if m != nil && m.NetTCPTimeWaitConnections != nil { + return *m.NetTCPTimeWaitConnections + } + return 0 +} + +func (m *ResourceStatistics) GetNetTrafficControlStatistics() []TrafficControlStatistics { + if m != nil { + return m.NetTrafficControlStatistics + } + return nil +} + +func (m *ResourceStatistics) GetNetSNMPStatistics() *SNMPStatistics { + if m != nil { + return m.NetSNMPStatistics + } + return nil +} + +// * +// Describes a snapshot of the resource usage for executors. +type ResourceUsage struct { + Executors []ResourceUsage_Executor `protobuf:"bytes,1,rep,name=executors" json:"executors"` + // Agent's total resources including checkpointed dynamic + // reservations and persistent volumes. + Total []Resource `protobuf:"bytes,2,rep,name=total" json:"total"` +} + +func (m *ResourceUsage) Reset() { *m = ResourceUsage{} } +func (*ResourceUsage) ProtoMessage() {} +func (*ResourceUsage) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{38} } + +func (m *ResourceUsage) GetExecutors() []ResourceUsage_Executor { + if m != nil { + return m.Executors + } + return nil +} + +func (m *ResourceUsage) GetTotal() []Resource { + if m != nil { + return m.Total + } + return nil +} + +type ResourceUsage_Executor struct { + ExecutorInfo ExecutorInfo `protobuf:"bytes,1,req,name=executor_info,json=executorInfo" json:"executor_info"` + // This includes resources used by the executor itself + // as well as its active tasks. + Allocated []Resource `protobuf:"bytes,2,rep,name=allocated" json:"allocated"` + // Current resource usage. If absent, the containerizer + // cannot provide resource usage. + Statistics *ResourceStatistics `protobuf:"bytes,3,opt,name=statistics" json:"statistics,omitempty"` + // The container id for the executor specified in the executor_info field. + ContainerID ContainerID `protobuf:"bytes,4,req,name=container_id,json=containerId" json:"container_id"` + // Non-terminal tasks. + Tasks []ResourceUsage_Executor_Task `protobuf:"bytes,5,rep,name=tasks" json:"tasks"` +} + +func (m *ResourceUsage_Executor) Reset() { *m = ResourceUsage_Executor{} } +func (*ResourceUsage_Executor) ProtoMessage() {} +func (*ResourceUsage_Executor) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{38, 0} } + +func (m *ResourceUsage_Executor) GetExecutorInfo() ExecutorInfo { + if m != nil { + return m.ExecutorInfo + } + return ExecutorInfo{} +} + +func (m *ResourceUsage_Executor) GetAllocated() []Resource { + if m != nil { + return m.Allocated + } + return nil +} + +func (m *ResourceUsage_Executor) GetStatistics() *ResourceStatistics { + if m != nil { + return m.Statistics + } + return nil +} + +func (m *ResourceUsage_Executor) GetContainerID() ContainerID { + if m != nil { + return m.ContainerID + } + return ContainerID{} +} + +func (m *ResourceUsage_Executor) GetTasks() []ResourceUsage_Executor_Task { + if m != nil { + return m.Tasks + } + return nil +} + +type ResourceUsage_Executor_Task struct { + Name string `protobuf:"bytes,1,req,name=name" json:"name"` + ID TaskID `protobuf:"bytes,2,req,name=id" json:"id"` + Resources []Resource `protobuf:"bytes,3,rep,name=resources" json:"resources"` + Labels *Labels `protobuf:"bytes,4,opt,name=labels" json:"labels,omitempty"` +} + +func (m *ResourceUsage_Executor_Task) Reset() { *m = ResourceUsage_Executor_Task{} } +func (*ResourceUsage_Executor_Task) ProtoMessage() {} +func (*ResourceUsage_Executor_Task) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{38, 0, 0} +} + +func (m *ResourceUsage_Executor_Task) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ResourceUsage_Executor_Task) GetID() TaskID { + if m != nil { + return m.ID + } + return TaskID{} +} + +func (m *ResourceUsage_Executor_Task) GetResources() []Resource { + if m != nil { + return m.Resources + } + return nil +} + +func (m *ResourceUsage_Executor_Task) GetLabels() *Labels { + if m != nil { + return m.Labels + } + return nil +} + +// * +// Describes a sample of events from "perf stat". Only available on +// Linux. +// +// NOTE: Each optional field matches the name of a perf event (see +// "perf list") with the following changes: +// 1. Names are downcased. +// 2. Hyphens ('-') are replaced with underscores ('_'). +// 3. Events with alternate names use the name "perf stat" returns, +// e.g., for the event "cycles OR cpu-cycles" perf always returns +// cycles. +type PerfStatistics struct { + Timestamp float64 `protobuf:"fixed64,1,req,name=timestamp" json:"timestamp"` + Duration float64 `protobuf:"fixed64,2,req,name=duration" json:"duration"` + // Hardware event. + Cycles *uint64 `protobuf:"varint,3,opt,name=cycles" json:"cycles,omitempty"` + StalledCyclesFrontend *uint64 `protobuf:"varint,4,opt,name=stalled_cycles_frontend,json=stalledCyclesFrontend" json:"stalled_cycles_frontend,omitempty"` + StalledCyclesBackend *uint64 `protobuf:"varint,5,opt,name=stalled_cycles_backend,json=stalledCyclesBackend" json:"stalled_cycles_backend,omitempty"` + Instructions *uint64 `protobuf:"varint,6,opt,name=instructions" json:"instructions,omitempty"` + CacheReferences *uint64 `protobuf:"varint,7,opt,name=cache_references,json=cacheReferences" json:"cache_references,omitempty"` + CacheMisses *uint64 `protobuf:"varint,8,opt,name=cache_misses,json=cacheMisses" json:"cache_misses,omitempty"` + Branches *uint64 `protobuf:"varint,9,opt,name=branches" json:"branches,omitempty"` + BranchMisses *uint64 `protobuf:"varint,10,opt,name=branch_misses,json=branchMisses" json:"branch_misses,omitempty"` + BusCycles *uint64 `protobuf:"varint,11,opt,name=bus_cycles,json=busCycles" json:"bus_cycles,omitempty"` + RefCycles *uint64 `protobuf:"varint,12,opt,name=ref_cycles,json=refCycles" json:"ref_cycles,omitempty"` + // Software event. + CPUClock *float64 `protobuf:"fixed64,13,opt,name=cpu_clock,json=cpuClock" json:"cpu_clock,omitempty"` + TaskClock *float64 `protobuf:"fixed64,14,opt,name=task_clock,json=taskClock" json:"task_clock,omitempty"` + PageFaults *uint64 `protobuf:"varint,15,opt,name=page_faults,json=pageFaults" json:"page_faults,omitempty"` + MinorFaults *uint64 `protobuf:"varint,16,opt,name=minor_faults,json=minorFaults" json:"minor_faults,omitempty"` + MajorFaults *uint64 `protobuf:"varint,17,opt,name=major_faults,json=majorFaults" json:"major_faults,omitempty"` + ContextSwitches *uint64 `protobuf:"varint,18,opt,name=context_switches,json=contextSwitches" json:"context_switches,omitempty"` + CPUMigrations *uint64 `protobuf:"varint,19,opt,name=cpu_migrations,json=cpuMigrations" json:"cpu_migrations,omitempty"` + AlignmentFaults *uint64 `protobuf:"varint,20,opt,name=alignment_faults,json=alignmentFaults" json:"alignment_faults,omitempty"` + EmulationFaults *uint64 `protobuf:"varint,21,opt,name=emulation_faults,json=emulationFaults" json:"emulation_faults,omitempty"` + // Hardware cache event. + L1DcacheLoads *uint64 `protobuf:"varint,22,opt,name=l1_dcache_loads,json=l1DcacheLoads" json:"l1_dcache_loads,omitempty"` + L1DcacheLoadMisses *uint64 `protobuf:"varint,23,opt,name=l1_dcache_load_misses,json=l1DcacheLoadMisses" json:"l1_dcache_load_misses,omitempty"` + L1DcacheStores *uint64 `protobuf:"varint,24,opt,name=l1_dcache_stores,json=l1DcacheStores" json:"l1_dcache_stores,omitempty"` + L1DcacheStoreMisses *uint64 `protobuf:"varint,25,opt,name=l1_dcache_store_misses,json=l1DcacheStoreMisses" json:"l1_dcache_store_misses,omitempty"` + L1DcachePrefetches *uint64 `protobuf:"varint,26,opt,name=l1_dcache_prefetches,json=l1DcachePrefetches" json:"l1_dcache_prefetches,omitempty"` + L1DcachePrefetchMisses *uint64 `protobuf:"varint,27,opt,name=l1_dcache_prefetch_misses,json=l1DcachePrefetchMisses" json:"l1_dcache_prefetch_misses,omitempty"` + L1IcacheLoads *uint64 `protobuf:"varint,28,opt,name=l1_icache_loads,json=l1IcacheLoads" json:"l1_icache_loads,omitempty"` + L1IcacheLoadMisses *uint64 `protobuf:"varint,29,opt,name=l1_icache_load_misses,json=l1IcacheLoadMisses" json:"l1_icache_load_misses,omitempty"` + L1IcachePrefetches *uint64 `protobuf:"varint,30,opt,name=l1_icache_prefetches,json=l1IcachePrefetches" json:"l1_icache_prefetches,omitempty"` + L1IcachePrefetchMisses *uint64 `protobuf:"varint,31,opt,name=l1_icache_prefetch_misses,json=l1IcachePrefetchMisses" json:"l1_icache_prefetch_misses,omitempty"` + LLCLoads *uint64 `protobuf:"varint,32,opt,name=llc_loads,json=llcLoads" json:"llc_loads,omitempty"` + LLCLoadMisses *uint64 `protobuf:"varint,33,opt,name=llc_load_misses,json=llcLoadMisses" json:"llc_load_misses,omitempty"` + LLCStores *uint64 `protobuf:"varint,34,opt,name=llc_stores,json=llcStores" json:"llc_stores,omitempty"` + LLCStoreMisses *uint64 `protobuf:"varint,35,opt,name=llc_store_misses,json=llcStoreMisses" json:"llc_store_misses,omitempty"` + LLCPrefetches *uint64 `protobuf:"varint,36,opt,name=llc_prefetches,json=llcPrefetches" json:"llc_prefetches,omitempty"` + LLCPrefetchMisses *uint64 `protobuf:"varint,37,opt,name=llc_prefetch_misses,json=llcPrefetchMisses" json:"llc_prefetch_misses,omitempty"` + DTLBLoads *uint64 `protobuf:"varint,38,opt,name=dtlb_loads,json=dtlbLoads" json:"dtlb_loads,omitempty"` + DTLBLoadMisses *uint64 `protobuf:"varint,39,opt,name=dtlb_load_misses,json=dtlbLoadMisses" json:"dtlb_load_misses,omitempty"` + DTLBStores *uint64 `protobuf:"varint,40,opt,name=dtlb_stores,json=dtlbStores" json:"dtlb_stores,omitempty"` + DTLBStoreMisses *uint64 `protobuf:"varint,41,opt,name=dtlb_store_misses,json=dtlbStoreMisses" json:"dtlb_store_misses,omitempty"` + DTLBPrefetches *uint64 `protobuf:"varint,42,opt,name=dtlb_prefetches,json=dtlbPrefetches" json:"dtlb_prefetches,omitempty"` + DTLBPrefetchMisses *uint64 `protobuf:"varint,43,opt,name=dtlb_prefetch_misses,json=dtlbPrefetchMisses" json:"dtlb_prefetch_misses,omitempty"` + ITLBLoads *uint64 `protobuf:"varint,44,opt,name=itlb_loads,json=itlbLoads" json:"itlb_loads,omitempty"` + ITLBLoadMisses *uint64 `protobuf:"varint,45,opt,name=itlb_load_misses,json=itlbLoadMisses" json:"itlb_load_misses,omitempty"` + BranchLoads *uint64 `protobuf:"varint,46,opt,name=branch_loads,json=branchLoads" json:"branch_loads,omitempty"` + BranchLoadMisses *uint64 `protobuf:"varint,47,opt,name=branch_load_misses,json=branchLoadMisses" json:"branch_load_misses,omitempty"` + NodeLoads *uint64 `protobuf:"varint,48,opt,name=node_loads,json=nodeLoads" json:"node_loads,omitempty"` + NodeLoadMisses *uint64 `protobuf:"varint,49,opt,name=node_load_misses,json=nodeLoadMisses" json:"node_load_misses,omitempty"` + NodeStores *uint64 `protobuf:"varint,50,opt,name=node_stores,json=nodeStores" json:"node_stores,omitempty"` + NodeStoreMisses *uint64 `protobuf:"varint,51,opt,name=node_store_misses,json=nodeStoreMisses" json:"node_store_misses,omitempty"` + NodePrefetches *uint64 `protobuf:"varint,52,opt,name=node_prefetches,json=nodePrefetches" json:"node_prefetches,omitempty"` + NodePrefetchMisses *uint64 `protobuf:"varint,53,opt,name=node_prefetch_misses,json=nodePrefetchMisses" json:"node_prefetch_misses,omitempty"` +} + +func (m *PerfStatistics) Reset() { *m = PerfStatistics{} } +func (*PerfStatistics) ProtoMessage() {} +func (*PerfStatistics) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{39} } + +func (m *PerfStatistics) GetTimestamp() float64 { + if m != nil { + return m.Timestamp + } + return 0 +} + +func (m *PerfStatistics) GetDuration() float64 { + if m != nil { + return m.Duration + } + return 0 +} + +func (m *PerfStatistics) GetCycles() uint64 { + if m != nil && m.Cycles != nil { + return *m.Cycles + } + return 0 +} + +func (m *PerfStatistics) GetStalledCyclesFrontend() uint64 { + if m != nil && m.StalledCyclesFrontend != nil { + return *m.StalledCyclesFrontend + } + return 0 +} + +func (m *PerfStatistics) GetStalledCyclesBackend() uint64 { + if m != nil && m.StalledCyclesBackend != nil { + return *m.StalledCyclesBackend + } + return 0 +} + +func (m *PerfStatistics) GetInstructions() uint64 { + if m != nil && m.Instructions != nil { + return *m.Instructions + } + return 0 +} + +func (m *PerfStatistics) GetCacheReferences() uint64 { + if m != nil && m.CacheReferences != nil { + return *m.CacheReferences + } + return 0 +} + +func (m *PerfStatistics) GetCacheMisses() uint64 { + if m != nil && m.CacheMisses != nil { + return *m.CacheMisses + } + return 0 +} + +func (m *PerfStatistics) GetBranches() uint64 { + if m != nil && m.Branches != nil { + return *m.Branches + } + return 0 +} + +func (m *PerfStatistics) GetBranchMisses() uint64 { + if m != nil && m.BranchMisses != nil { + return *m.BranchMisses + } + return 0 +} + +func (m *PerfStatistics) GetBusCycles() uint64 { + if m != nil && m.BusCycles != nil { + return *m.BusCycles + } + return 0 +} + +func (m *PerfStatistics) GetRefCycles() uint64 { + if m != nil && m.RefCycles != nil { + return *m.RefCycles + } + return 0 +} + +func (m *PerfStatistics) GetCPUClock() float64 { + if m != nil && m.CPUClock != nil { + return *m.CPUClock + } + return 0 +} + +func (m *PerfStatistics) GetTaskClock() float64 { + if m != nil && m.TaskClock != nil { + return *m.TaskClock + } + return 0 +} + +func (m *PerfStatistics) GetPageFaults() uint64 { + if m != nil && m.PageFaults != nil { + return *m.PageFaults + } + return 0 +} + +func (m *PerfStatistics) GetMinorFaults() uint64 { + if m != nil && m.MinorFaults != nil { + return *m.MinorFaults + } + return 0 +} + +func (m *PerfStatistics) GetMajorFaults() uint64 { + if m != nil && m.MajorFaults != nil { + return *m.MajorFaults + } + return 0 +} + +func (m *PerfStatistics) GetContextSwitches() uint64 { + if m != nil && m.ContextSwitches != nil { + return *m.ContextSwitches + } + return 0 +} + +func (m *PerfStatistics) GetCPUMigrations() uint64 { + if m != nil && m.CPUMigrations != nil { + return *m.CPUMigrations + } + return 0 +} + +func (m *PerfStatistics) GetAlignmentFaults() uint64 { + if m != nil && m.AlignmentFaults != nil { + return *m.AlignmentFaults + } + return 0 +} + +func (m *PerfStatistics) GetEmulationFaults() uint64 { + if m != nil && m.EmulationFaults != nil { + return *m.EmulationFaults + } + return 0 +} + +func (m *PerfStatistics) GetL1DcacheLoads() uint64 { + if m != nil && m.L1DcacheLoads != nil { + return *m.L1DcacheLoads + } + return 0 +} + +func (m *PerfStatistics) GetL1DcacheLoadMisses() uint64 { + if m != nil && m.L1DcacheLoadMisses != nil { + return *m.L1DcacheLoadMisses + } + return 0 +} + +func (m *PerfStatistics) GetL1DcacheStores() uint64 { + if m != nil && m.L1DcacheStores != nil { + return *m.L1DcacheStores + } + return 0 +} + +func (m *PerfStatistics) GetL1DcacheStoreMisses() uint64 { + if m != nil && m.L1DcacheStoreMisses != nil { + return *m.L1DcacheStoreMisses + } + return 0 +} + +func (m *PerfStatistics) GetL1DcachePrefetches() uint64 { + if m != nil && m.L1DcachePrefetches != nil { + return *m.L1DcachePrefetches + } + return 0 +} + +func (m *PerfStatistics) GetL1DcachePrefetchMisses() uint64 { + if m != nil && m.L1DcachePrefetchMisses != nil { + return *m.L1DcachePrefetchMisses + } + return 0 +} + +func (m *PerfStatistics) GetL1IcacheLoads() uint64 { + if m != nil && m.L1IcacheLoads != nil { + return *m.L1IcacheLoads + } + return 0 +} + +func (m *PerfStatistics) GetL1IcacheLoadMisses() uint64 { + if m != nil && m.L1IcacheLoadMisses != nil { + return *m.L1IcacheLoadMisses + } + return 0 +} + +func (m *PerfStatistics) GetL1IcachePrefetches() uint64 { + if m != nil && m.L1IcachePrefetches != nil { + return *m.L1IcachePrefetches + } + return 0 +} + +func (m *PerfStatistics) GetL1IcachePrefetchMisses() uint64 { + if m != nil && m.L1IcachePrefetchMisses != nil { + return *m.L1IcachePrefetchMisses + } + return 0 +} + +func (m *PerfStatistics) GetLLCLoads() uint64 { + if m != nil && m.LLCLoads != nil { + return *m.LLCLoads + } + return 0 +} + +func (m *PerfStatistics) GetLLCLoadMisses() uint64 { + if m != nil && m.LLCLoadMisses != nil { + return *m.LLCLoadMisses + } + return 0 +} + +func (m *PerfStatistics) GetLLCStores() uint64 { + if m != nil && m.LLCStores != nil { + return *m.LLCStores + } + return 0 +} + +func (m *PerfStatistics) GetLLCStoreMisses() uint64 { + if m != nil && m.LLCStoreMisses != nil { + return *m.LLCStoreMisses + } + return 0 +} + +func (m *PerfStatistics) GetLLCPrefetches() uint64 { + if m != nil && m.LLCPrefetches != nil { + return *m.LLCPrefetches + } + return 0 +} + +func (m *PerfStatistics) GetLLCPrefetchMisses() uint64 { + if m != nil && m.LLCPrefetchMisses != nil { + return *m.LLCPrefetchMisses + } + return 0 +} + +func (m *PerfStatistics) GetDTLBLoads() uint64 { + if m != nil && m.DTLBLoads != nil { + return *m.DTLBLoads + } + return 0 +} + +func (m *PerfStatistics) GetDTLBLoadMisses() uint64 { + if m != nil && m.DTLBLoadMisses != nil { + return *m.DTLBLoadMisses + } + return 0 +} + +func (m *PerfStatistics) GetDTLBStores() uint64 { + if m != nil && m.DTLBStores != nil { + return *m.DTLBStores + } + return 0 +} + +func (m *PerfStatistics) GetDTLBStoreMisses() uint64 { + if m != nil && m.DTLBStoreMisses != nil { + return *m.DTLBStoreMisses + } + return 0 +} + +func (m *PerfStatistics) GetDTLBPrefetches() uint64 { + if m != nil && m.DTLBPrefetches != nil { + return *m.DTLBPrefetches + } + return 0 +} + +func (m *PerfStatistics) GetDTLBPrefetchMisses() uint64 { + if m != nil && m.DTLBPrefetchMisses != nil { + return *m.DTLBPrefetchMisses + } + return 0 +} + +func (m *PerfStatistics) GetITLBLoads() uint64 { + if m != nil && m.ITLBLoads != nil { + return *m.ITLBLoads + } + return 0 +} + +func (m *PerfStatistics) GetITLBLoadMisses() uint64 { + if m != nil && m.ITLBLoadMisses != nil { + return *m.ITLBLoadMisses + } + return 0 +} + +func (m *PerfStatistics) GetBranchLoads() uint64 { + if m != nil && m.BranchLoads != nil { + return *m.BranchLoads + } + return 0 +} + +func (m *PerfStatistics) GetBranchLoadMisses() uint64 { + if m != nil && m.BranchLoadMisses != nil { + return *m.BranchLoadMisses + } + return 0 +} + +func (m *PerfStatistics) GetNodeLoads() uint64 { + if m != nil && m.NodeLoads != nil { + return *m.NodeLoads + } + return 0 +} + +func (m *PerfStatistics) GetNodeLoadMisses() uint64 { + if m != nil && m.NodeLoadMisses != nil { + return *m.NodeLoadMisses + } + return 0 +} + +func (m *PerfStatistics) GetNodeStores() uint64 { + if m != nil && m.NodeStores != nil { + return *m.NodeStores + } + return 0 +} + +func (m *PerfStatistics) GetNodeStoreMisses() uint64 { + if m != nil && m.NodeStoreMisses != nil { + return *m.NodeStoreMisses + } + return 0 +} + +func (m *PerfStatistics) GetNodePrefetches() uint64 { + if m != nil && m.NodePrefetches != nil { + return *m.NodePrefetches + } + return 0 +} + +func (m *PerfStatistics) GetNodePrefetchMisses() uint64 { + if m != nil && m.NodePrefetchMisses != nil { + return *m.NodePrefetchMisses + } + return 0 +} + +// * +// Describes a request for resources that can be used by a framework +// to proactively influence the allocator. If 'agent_id' is provided +// then this request is assumed to only apply to resources on that +// agent. +type Request struct { + AgentID *AgentID `protobuf:"bytes,1,opt,name=agent_id,json=agentId" json:"agent_id,omitempty"` + Resources []Resource `protobuf:"bytes,2,rep,name=resources" json:"resources"` +} + +func (m *Request) Reset() { *m = Request{} } +func (*Request) ProtoMessage() {} +func (*Request) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{40} } + +func (m *Request) GetAgentID() *AgentID { + if m != nil { + return m.AgentID + } + return nil +} + +func (m *Request) GetResources() []Resource { + if m != nil { + return m.Resources + } + return nil +} + +// * +// Describes some resources available on an agent. An offer only +// contains resources from a single agent. +type Offer struct { + ID OfferID `protobuf:"bytes,1,req,name=id" json:"id"` + FrameworkID FrameworkID `protobuf:"bytes,2,req,name=framework_id,json=frameworkId" json:"framework_id"` + AgentID AgentID `protobuf:"bytes,3,req,name=agent_id,json=agentId" json:"agent_id"` + Hostname string `protobuf:"bytes,4,req,name=hostname" json:"hostname"` + // URL for reaching the agent running on the host. + URL *URL `protobuf:"bytes,8,opt,name=url" json:"url,omitempty"` + // The domain of the agent. + Domain *DomainInfo `protobuf:"bytes,11,opt,name=domain" json:"domain,omitempty"` + Resources []Resource `protobuf:"bytes,5,rep,name=resources" json:"resources"` + Attributes []Attribute `protobuf:"bytes,7,rep,name=attributes" json:"attributes"` + ExecutorIDs []ExecutorID `protobuf:"bytes,6,rep,name=executor_ids,json=executorIds" json:"executor_ids"` + // Signifies that the resources in this Offer may be unavailable during + // the given interval. Any tasks launched using these resources may be + // killed when the interval arrives. For example, these resources may be + // part of a planned maintenance schedule. + // + // This field only provides information about a planned unavailability. + // The unavailability interval may not necessarily start at exactly this + // interval, nor last for exactly the duration of this interval. + // The unavailability may also be forever! See comments in + // `Unavailability` for more details. + Unavailability *Unavailability `protobuf:"bytes,9,opt,name=unavailability" json:"unavailability,omitempty"` + // An offer represents resources allocated to *one* of the + // roles managed by the scheduler. (Therefore, each + // `Offer.resources[i].allocation_info` will match the + // top level `Offer.allocation_info`). + AllocationInfo *Resource_AllocationInfo `protobuf:"bytes,10,opt,name=allocation_info,json=allocationInfo" json:"allocation_info,omitempty"` +} + +func (m *Offer) Reset() { *m = Offer{} } +func (*Offer) ProtoMessage() {} +func (*Offer) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{41} } + +func (m *Offer) GetID() OfferID { + if m != nil { + return m.ID + } + return OfferID{} +} + +func (m *Offer) GetFrameworkID() FrameworkID { + if m != nil { + return m.FrameworkID + } + return FrameworkID{} +} + +func (m *Offer) GetAgentID() AgentID { + if m != nil { + return m.AgentID + } + return AgentID{} +} + +func (m *Offer) GetHostname() string { + if m != nil { + return m.Hostname + } + return "" +} + +func (m *Offer) GetURL() *URL { + if m != nil { + return m.URL + } + return nil +} + +func (m *Offer) GetDomain() *DomainInfo { + if m != nil { + return m.Domain + } + return nil +} + +func (m *Offer) GetResources() []Resource { + if m != nil { + return m.Resources + } + return nil +} + +func (m *Offer) GetAttributes() []Attribute { + if m != nil { + return m.Attributes + } + return nil +} + +func (m *Offer) GetExecutorIDs() []ExecutorID { + if m != nil { + return m.ExecutorIDs + } + return nil +} + +func (m *Offer) GetUnavailability() *Unavailability { + if m != nil { + return m.Unavailability + } + return nil +} + +func (m *Offer) GetAllocationInfo() *Resource_AllocationInfo { + if m != nil { + return m.AllocationInfo + } + return nil +} + +// Defines an operation that can be performed against offers. +type Offer_Operation struct { + Type Offer_Operation_Type `protobuf:"varint,1,opt,name=type,enum=mesos.Offer_Operation_Type" json:"type"` + // NOTE: The `id` field will allow frameworks to indicate that they wish to + // receive feedback about an operation. Since this feature is not yet + // implemented, the `id` field should NOT be set at present. See MESOS-8054. + ID *OperationID `protobuf:"bytes,12,opt,name=id" json:"id,omitempty"` + Launch *Offer_Operation_Launch `protobuf:"bytes,2,opt,name=launch" json:"launch,omitempty"` + LaunchGroup *Offer_Operation_LaunchGroup `protobuf:"bytes,7,opt,name=launch_group,json=launchGroup" json:"launch_group,omitempty"` + Reserve *Offer_Operation_Reserve `protobuf:"bytes,3,opt,name=reserve" json:"reserve,omitempty"` + Unreserve *Offer_Operation_Unreserve `protobuf:"bytes,4,opt,name=unreserve" json:"unreserve,omitempty"` + Create *Offer_Operation_Create `protobuf:"bytes,5,opt,name=create" json:"create,omitempty"` + Destroy *Offer_Operation_Destroy `protobuf:"bytes,6,opt,name=destroy" json:"destroy,omitempty"` + CreateVolume *Offer_Operation_CreateVolume `protobuf:"bytes,8,opt,name=create_volume,json=createVolume" json:"create_volume,omitempty"` + DestroyVolume *Offer_Operation_DestroyVolume `protobuf:"bytes,9,opt,name=destroy_volume,json=destroyVolume" json:"destroy_volume,omitempty"` + CreateBlock *Offer_Operation_CreateBlock `protobuf:"bytes,10,opt,name=create_block,json=createBlock" json:"create_block,omitempty"` + DestroyBlock *Offer_Operation_DestroyBlock `protobuf:"bytes,11,opt,name=destroy_block,json=destroyBlock" json:"destroy_block,omitempty"` +} + +func (m *Offer_Operation) Reset() { *m = Offer_Operation{} } +func (*Offer_Operation) ProtoMessage() {} +func (*Offer_Operation) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{41, 0} } + +func (m *Offer_Operation) GetType() Offer_Operation_Type { + if m != nil { + return m.Type + } + return Offer_Operation_UNKNOWN +} + +func (m *Offer_Operation) GetID() *OperationID { + if m != nil { + return m.ID + } + return nil +} + +func (m *Offer_Operation) GetLaunch() *Offer_Operation_Launch { + if m != nil { + return m.Launch + } + return nil +} + +func (m *Offer_Operation) GetLaunchGroup() *Offer_Operation_LaunchGroup { + if m != nil { + return m.LaunchGroup + } + return nil +} + +func (m *Offer_Operation) GetReserve() *Offer_Operation_Reserve { + if m != nil { + return m.Reserve + } + return nil +} + +func (m *Offer_Operation) GetUnreserve() *Offer_Operation_Unreserve { + if m != nil { + return m.Unreserve + } + return nil +} + +func (m *Offer_Operation) GetCreate() *Offer_Operation_Create { + if m != nil { + return m.Create + } + return nil +} + +func (m *Offer_Operation) GetDestroy() *Offer_Operation_Destroy { + if m != nil { + return m.Destroy + } + return nil +} + +func (m *Offer_Operation) GetCreateVolume() *Offer_Operation_CreateVolume { + if m != nil { + return m.CreateVolume + } + return nil +} + +func (m *Offer_Operation) GetDestroyVolume() *Offer_Operation_DestroyVolume { + if m != nil { + return m.DestroyVolume + } + return nil +} + +func (m *Offer_Operation) GetCreateBlock() *Offer_Operation_CreateBlock { + if m != nil { + return m.CreateBlock + } + return nil +} + +func (m *Offer_Operation) GetDestroyBlock() *Offer_Operation_DestroyBlock { + if m != nil { + return m.DestroyBlock + } + return nil +} + +// TODO(vinod): Deprecate this in favor of `LaunchGroup` below. +type Offer_Operation_Launch struct { + TaskInfos []TaskInfo `protobuf:"bytes,1,rep,name=task_infos,json=taskInfos" json:"task_infos"` +} + +func (m *Offer_Operation_Launch) Reset() { *m = Offer_Operation_Launch{} } +func (*Offer_Operation_Launch) ProtoMessage() {} +func (*Offer_Operation_Launch) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{41, 0, 0} +} + +func (m *Offer_Operation_Launch) GetTaskInfos() []TaskInfo { + if m != nil { + return m.TaskInfos + } + return nil +} + +// Unlike `Launch` above, all the tasks in a `task_group` are +// atomically delivered to an executor. +// +// `NetworkInfo` set on executor will be shared by all tasks in +// the task group. +// +// TODO(vinod): Any volumes set on executor could be used by a +// task by explicitly setting `Volume.source` in its resources. +type Offer_Operation_LaunchGroup struct { + Executor ExecutorInfo `protobuf:"bytes,1,req,name=executor" json:"executor"` + TaskGroup TaskGroupInfo `protobuf:"bytes,2,req,name=task_group,json=taskGroup" json:"task_group"` +} + +func (m *Offer_Operation_LaunchGroup) Reset() { *m = Offer_Operation_LaunchGroup{} } +func (*Offer_Operation_LaunchGroup) ProtoMessage() {} +func (*Offer_Operation_LaunchGroup) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{41, 0, 1} +} + +func (m *Offer_Operation_LaunchGroup) GetExecutor() ExecutorInfo { + if m != nil { + return m.Executor + } + return ExecutorInfo{} +} + +func (m *Offer_Operation_LaunchGroup) GetTaskGroup() TaskGroupInfo { + if m != nil { + return m.TaskGroup + } + return TaskGroupInfo{} +} + +type Offer_Operation_Reserve struct { + Resources []Resource `protobuf:"bytes,1,rep,name=resources" json:"resources"` +} + +func (m *Offer_Operation_Reserve) Reset() { *m = Offer_Operation_Reserve{} } +func (*Offer_Operation_Reserve) ProtoMessage() {} +func (*Offer_Operation_Reserve) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{41, 0, 2} +} + +func (m *Offer_Operation_Reserve) GetResources() []Resource { + if m != nil { + return m.Resources + } + return nil +} + +type Offer_Operation_Unreserve struct { + Resources []Resource `protobuf:"bytes,1,rep,name=resources" json:"resources"` +} + +func (m *Offer_Operation_Unreserve) Reset() { *m = Offer_Operation_Unreserve{} } +func (*Offer_Operation_Unreserve) ProtoMessage() {} +func (*Offer_Operation_Unreserve) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{41, 0, 3} +} + +func (m *Offer_Operation_Unreserve) GetResources() []Resource { + if m != nil { + return m.Resources + } + return nil +} + +type Offer_Operation_Create struct { + Volumes []Resource `protobuf:"bytes,1,rep,name=volumes" json:"volumes"` +} + +func (m *Offer_Operation_Create) Reset() { *m = Offer_Operation_Create{} } +func (*Offer_Operation_Create) ProtoMessage() {} +func (*Offer_Operation_Create) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{41, 0, 4} +} + +func (m *Offer_Operation_Create) GetVolumes() []Resource { + if m != nil { + return m.Volumes + } + return nil +} + +type Offer_Operation_Destroy struct { + Volumes []Resource `protobuf:"bytes,1,rep,name=volumes" json:"volumes"` +} + +func (m *Offer_Operation_Destroy) Reset() { *m = Offer_Operation_Destroy{} } +func (*Offer_Operation_Destroy) ProtoMessage() {} +func (*Offer_Operation_Destroy) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{41, 0, 5} +} + +func (m *Offer_Operation_Destroy) GetVolumes() []Resource { + if m != nil { + return m.Volumes + } + return nil +} + +type Offer_Operation_CreateVolume struct { + Source Resource `protobuf:"bytes,1,req,name=source" json:"source"` + TargetType Resource_DiskInfo_Source_Type `protobuf:"varint,2,req,name=target_type,json=targetType,enum=mesos.Resource_DiskInfo_Source_Type" json:"target_type"` +} + +func (m *Offer_Operation_CreateVolume) Reset() { *m = Offer_Operation_CreateVolume{} } +func (*Offer_Operation_CreateVolume) ProtoMessage() {} +func (*Offer_Operation_CreateVolume) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{41, 0, 6} +} + +func (m *Offer_Operation_CreateVolume) GetSource() Resource { + if m != nil { + return m.Source + } + return Resource{} +} + +func (m *Offer_Operation_CreateVolume) GetTargetType() Resource_DiskInfo_Source_Type { + if m != nil { + return m.TargetType + } + return Resource_DiskInfo_Source_UNKNOWN +} + +type Offer_Operation_DestroyVolume struct { + Volume Resource `protobuf:"bytes,1,req,name=volume" json:"volume"` +} + +func (m *Offer_Operation_DestroyVolume) Reset() { *m = Offer_Operation_DestroyVolume{} } +func (*Offer_Operation_DestroyVolume) ProtoMessage() {} +func (*Offer_Operation_DestroyVolume) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{41, 0, 7} +} + +func (m *Offer_Operation_DestroyVolume) GetVolume() Resource { + if m != nil { + return m.Volume + } + return Resource{} +} + +type Offer_Operation_CreateBlock struct { + Source Resource `protobuf:"bytes,1,req,name=source" json:"source"` +} + +func (m *Offer_Operation_CreateBlock) Reset() { *m = Offer_Operation_CreateBlock{} } +func (*Offer_Operation_CreateBlock) ProtoMessage() {} +func (*Offer_Operation_CreateBlock) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{41, 0, 8} +} + +func (m *Offer_Operation_CreateBlock) GetSource() Resource { + if m != nil { + return m.Source + } + return Resource{} +} + +type Offer_Operation_DestroyBlock struct { + Block Resource `protobuf:"bytes,1,req,name=block" json:"block"` +} + +func (m *Offer_Operation_DestroyBlock) Reset() { *m = Offer_Operation_DestroyBlock{} } +func (*Offer_Operation_DestroyBlock) ProtoMessage() {} +func (*Offer_Operation_DestroyBlock) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{41, 0, 9} +} + +func (m *Offer_Operation_DestroyBlock) GetBlock() Resource { + if m != nil { + return m.Block + } + return Resource{} +} + +// * +// A request to return some resources occupied by a framework. +type InverseOffer struct { + // This is the same OfferID as found in normal offers, which allows + // re-use of some of the OfferID-only messages. + OfferID OfferID `protobuf:"bytes,1,req,name=id" json:"id"` + // URL for reaching the agent running on the host. This enables some + // optimizations as described in MESOS-3012, such as allowing the + // scheduler driver to bypass the master and talk directly with an agent. + URL *URL `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"` + // The framework that should release its resources. + // If no specifics are provided (i.e. which agent), all the framework's + // resources are requested back. + FrameworkID FrameworkID `protobuf:"bytes,3,req,name=framework_id,json=frameworkId" json:"framework_id"` + // Specified if the resources need to be released from a particular agent. + // All the framework's resources on this agent are requested back, + // unless further qualified by the `resources` field. + AgentID *AgentID `protobuf:"bytes,4,opt,name=agent_id,json=agentId" json:"agent_id,omitempty"` + // This InverseOffer represents a planned unavailability event in the + // specified interval. Any tasks running on the given framework or agent + // may be killed when the interval arrives. Therefore, frameworks should + // aim to gracefully terminate tasks prior to the arrival of the interval. + // + // For reserved resources, the resources are expected to be returned to the + // framework after the unavailability interval. This is an expectation, + // not a guarantee. For example, if the unavailability duration is not set, + // the resources may be removed permanently. + // + // For other resources, there is no guarantee that requested resources will + // be returned after the unavailability interval. The allocator has no + // obligation to re-offer these resources to the prior framework after + // the unavailability. + Unavailability Unavailability `protobuf:"bytes,5,req,name=unavailability" json:"unavailability"` + // A list of resources being requested back from the framework, + // on the agent identified by `agent_id`. If no resources are specified + // then all resources are being requested back. For the purpose of + // maintenance, this field is always empty (maintenance always requests + // all resources back). + Resources []Resource `protobuf:"bytes,6,rep,name=resources" json:"resources"` +} + +func (m *InverseOffer) Reset() { *m = InverseOffer{} } +func (*InverseOffer) ProtoMessage() {} +func (*InverseOffer) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{42} } + +func (m *InverseOffer) GetOfferID() OfferID { + if m != nil { + return m.OfferID + } + return OfferID{} +} + +func (m *InverseOffer) GetURL() *URL { + if m != nil { + return m.URL + } + return nil +} + +func (m *InverseOffer) GetFrameworkID() FrameworkID { + if m != nil { + return m.FrameworkID + } + return FrameworkID{} +} + +func (m *InverseOffer) GetAgentID() *AgentID { + if m != nil { + return m.AgentID + } + return nil +} + +func (m *InverseOffer) GetUnavailability() Unavailability { + if m != nil { + return m.Unavailability + } + return Unavailability{} +} + +func (m *InverseOffer) GetResources() []Resource { + if m != nil { + return m.Resources + } + return nil +} + +// * +// Describes a task. Passed from the scheduler all the way to an +// executor (see SchedulerDriver::launchTasks and +// Executor::launchTask). Either ExecutorInfo or CommandInfo should be set. +// A different executor can be used to launch this task, and subsequent tasks +// meant for the same executor can reuse the same ExecutorInfo struct. +type TaskInfo struct { + Name string `protobuf:"bytes,1,req,name=name" json:"name"` + TaskID TaskID `protobuf:"bytes,2,req,name=task_id,json=taskId" json:"task_id"` + AgentID AgentID `protobuf:"bytes,3,req,name=agent_id,json=agentId" json:"agent_id"` + Resources []Resource `protobuf:"bytes,4,rep,name=resources" json:"resources"` + Executor *ExecutorInfo `protobuf:"bytes,5,opt,name=executor" json:"executor,omitempty"` + Command *CommandInfo `protobuf:"bytes,7,opt,name=command" json:"command,omitempty"` + // Task provided with a container will launch the container as part + // of this task paired with the task's CommandInfo. + Container *ContainerInfo `protobuf:"bytes,9,opt,name=container" json:"container,omitempty"` + // A health check for the task. Implemented for executor-less + // command-based tasks. For tasks that specify an executor, it is + // the executor's responsibility to implement the health checking. + HealthCheck *HealthCheck `protobuf:"bytes,8,opt,name=health_check,json=healthCheck" json:"health_check,omitempty"` + // A general check for the task. Implemented for all built-in executors. + // For tasks that specify an executor, it is the executor's responsibility + // to implement checking support. Executors should (all built-in executors + // will) neither interpret nor act on the check's result. + // + // NOTE: Check support in built-in executors is experimental. + // + // TODO(alexr): Consider supporting multiple checks per task. + Check *CheckInfo `protobuf:"bytes,13,opt,name=check" json:"check,omitempty"` + // A kill policy for the task. Implemented for executor-less + // command-based and docker tasks. For tasks that specify an + // executor, it is the executor's responsibility to implement + // the kill policy. + KillPolicy *KillPolicy `protobuf:"bytes,12,opt,name=kill_policy,json=killPolicy" json:"kill_policy,omitempty"` + Data []byte `protobuf:"bytes,6,opt,name=data" json:"data,omitempty"` + // Labels are free-form key value pairs which are exposed through + // master and agent endpoints. Labels will not be interpreted or + // acted upon by Mesos itself. As opposed to the data field, labels + // will be kept in memory on master and agent processes. Therefore, + // labels should be used to tag tasks with light-weight meta-data. + // Labels should not contain duplicate key-value pairs. + Labels *Labels `protobuf:"bytes,10,opt,name=labels" json:"labels,omitempty"` + // Service discovery information for the task. It is not interpreted + // or acted upon by Mesos. It is up to a service discovery system + // to use this information as needed and to handle tasks without + // service discovery information. + Discovery *DiscoveryInfo `protobuf:"bytes,11,opt,name=discovery" json:"discovery,omitempty"` +} + +func (m *TaskInfo) Reset() { *m = TaskInfo{} } +func (*TaskInfo) ProtoMessage() {} +func (*TaskInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{43} } + +func (m *TaskInfo) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *TaskInfo) GetTaskID() TaskID { + if m != nil { + return m.TaskID + } + return TaskID{} +} + +func (m *TaskInfo) GetAgentID() AgentID { + if m != nil { + return m.AgentID + } + return AgentID{} +} + +func (m *TaskInfo) GetResources() []Resource { + if m != nil { + return m.Resources + } + return nil +} + +func (m *TaskInfo) GetExecutor() *ExecutorInfo { + if m != nil { + return m.Executor + } + return nil +} + +func (m *TaskInfo) GetCommand() *CommandInfo { + if m != nil { + return m.Command + } + return nil +} + +func (m *TaskInfo) GetContainer() *ContainerInfo { + if m != nil { + return m.Container + } + return nil +} + +func (m *TaskInfo) GetHealthCheck() *HealthCheck { + if m != nil { + return m.HealthCheck + } + return nil +} + +func (m *TaskInfo) GetCheck() *CheckInfo { + if m != nil { + return m.Check + } + return nil +} + +func (m *TaskInfo) GetKillPolicy() *KillPolicy { + if m != nil { + return m.KillPolicy + } + return nil +} + +func (m *TaskInfo) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func (m *TaskInfo) GetLabels() *Labels { + if m != nil { + return m.Labels + } + return nil +} + +func (m *TaskInfo) GetDiscovery() *DiscoveryInfo { + if m != nil { + return m.Discovery + } + return nil +} + +// * +// Describes a group of tasks that belong to an executor. The +// executor will receive the task group in a single message to +// allow the group to be launched "atomically". +// +// NOTES: +// 1) `NetworkInfo` must not be set inside task's `ContainerInfo`. +// 2) `TaskInfo.executor` doesn't need to set. If set, it should match +// `LaunchGroup.executor`. +type TaskGroupInfo struct { + Tasks []TaskInfo `protobuf:"bytes,1,rep,name=tasks" json:"tasks"` +} + +func (m *TaskGroupInfo) Reset() { *m = TaskGroupInfo{} } +func (*TaskGroupInfo) ProtoMessage() {} +func (*TaskGroupInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{44} } + +func (m *TaskGroupInfo) GetTasks() []TaskInfo { + if m != nil { + return m.Tasks + } + return nil +} + +// * +// Describes a task, similar to `TaskInfo`. +// +// `Task` is used in some of the Mesos messages found below. +// `Task` is used instead of `TaskInfo` if: +// 1) we need additional IDs, such as a specific +// framework, executor, or agent; or +// 2) we do not need the additional data, such as the command run by the +// task or the health checks. These additional fields may be large and +// unnecessary for some Mesos messages. +// +// `Task` is generally constructed from a `TaskInfo`. See protobuf::createTask. +type Task struct { + Name string `protobuf:"bytes,1,req,name=name" json:"name"` + TaskID TaskID `protobuf:"bytes,2,req,name=task_id,json=taskId" json:"task_id"` + FrameworkID FrameworkID `protobuf:"bytes,3,req,name=framework_id,json=frameworkId" json:"framework_id"` + ExecutorID *ExecutorID `protobuf:"bytes,4,opt,name=executor_id,json=executorId" json:"executor_id,omitempty"` + AgentID AgentID `protobuf:"bytes,5,req,name=agent_id,json=agentId" json:"agent_id"` + State *TaskState `protobuf:"varint,6,req,name=state,enum=mesos.TaskState" json:"state,omitempty"` + Resources []Resource `protobuf:"bytes,7,rep,name=resources" json:"resources"` + Statuses []TaskStatus `protobuf:"bytes,8,rep,name=statuses" json:"statuses"` + // These fields correspond to the state and uuid of the latest + // status update forwarded to the master. + // NOTE: Either both the fields must be set or both must be unset. + StatusUpdateState *TaskState `protobuf:"varint,9,opt,name=status_update_state,json=statusUpdateState,enum=mesos.TaskState" json:"status_update_state,omitempty"` + StatusUpdateUUID []byte `protobuf:"bytes,10,opt,name=status_update_uuid,json=statusUpdateUuid" json:"status_update_uuid,omitempty"` + Labels *Labels `protobuf:"bytes,11,opt,name=labels" json:"labels,omitempty"` + // Service discovery information for the task. It is not interpreted + // or acted upon by Mesos. It is up to a service discovery system + // to use this information as needed and to handle tasks without + // service discovery information. + Discovery *DiscoveryInfo `protobuf:"bytes,12,opt,name=discovery" json:"discovery,omitempty"` + // Container information for the task. + Container *ContainerInfo `protobuf:"bytes,13,opt,name=container" json:"container,omitempty"` + // Specific user under which task is running. + User *string `protobuf:"bytes,14,opt,name=user" json:"user,omitempty"` +} + +func (m *Task) Reset() { *m = Task{} } +func (*Task) ProtoMessage() {} +func (*Task) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{45} } + +func (m *Task) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Task) GetTaskID() TaskID { + if m != nil { + return m.TaskID + } + return TaskID{} +} + +func (m *Task) GetFrameworkID() FrameworkID { + if m != nil { + return m.FrameworkID + } + return FrameworkID{} +} + +func (m *Task) GetExecutorID() *ExecutorID { + if m != nil { + return m.ExecutorID + } + return nil +} + +func (m *Task) GetAgentID() AgentID { + if m != nil { + return m.AgentID + } + return AgentID{} +} + +func (m *Task) GetState() TaskState { + if m != nil && m.State != nil { + return *m.State + } + return TASK_STAGING +} + +func (m *Task) GetResources() []Resource { + if m != nil { + return m.Resources + } + return nil +} + +func (m *Task) GetStatuses() []TaskStatus { + if m != nil { + return m.Statuses + } + return nil +} + +func (m *Task) GetStatusUpdateState() TaskState { + if m != nil && m.StatusUpdateState != nil { + return *m.StatusUpdateState + } + return TASK_STAGING +} + +func (m *Task) GetStatusUpdateUUID() []byte { + if m != nil { + return m.StatusUpdateUUID + } + return nil +} + +func (m *Task) GetLabels() *Labels { + if m != nil { + return m.Labels + } + return nil +} + +func (m *Task) GetDiscovery() *DiscoveryInfo { + if m != nil { + return m.Discovery + } + return nil +} + +func (m *Task) GetContainer() *ContainerInfo { + if m != nil { + return m.Container + } + return nil +} + +func (m *Task) GetUser() string { + if m != nil && m.User != nil { + return *m.User + } + return "" +} + +// * +// Describes a resource limitation that caused a task failure. +type TaskResourceLimitation struct { + // This field contains the resource whose limits were violated. + // + // NOTE: 'Resources' is used here because the resource may span + // multiple roles (e.g. `"mem(*):1;mem(role):2"`). + Resources []Resource `protobuf:"bytes,1,rep,name=resources" json:"resources"` +} + +func (m *TaskResourceLimitation) Reset() { *m = TaskResourceLimitation{} } +func (*TaskResourceLimitation) ProtoMessage() {} +func (*TaskResourceLimitation) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{46} } + +func (m *TaskResourceLimitation) GetResources() []Resource { + if m != nil { + return m.Resources + } + return nil +} + +// * +// Describes a UUID. +type UUID struct { + Value []byte `protobuf:"bytes,1,req,name=value" json:"value,omitempty"` +} + +func (m *UUID) Reset() { *m = UUID{} } +func (*UUID) ProtoMessage() {} +func (*UUID) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{47} } + +func (m *UUID) GetValue() []byte { + if m != nil { + return m.Value + } + return nil +} + +// * +// Describes an operation, similar to `Offer.Operation`, with +// some additional information. +type Operation struct { + FrameworkID *FrameworkID `protobuf:"bytes,1,opt,name=framework_id,json=frameworkId" json:"framework_id,omitempty"` + AgentID *AgentID `protobuf:"bytes,2,opt,name=agent_id,json=agentId" json:"agent_id,omitempty"` + Info Offer_Operation `protobuf:"bytes,3,req,name=info" json:"info"` + LatestStatus OperationStatus `protobuf:"bytes,4,req,name=latest_status,json=latestStatus" json:"latest_status"` + // All the statuses known to this operation. Some of the statuses in this + // list might not have been acknowledged yet. The statuses are ordered. + Statuses []OperationStatus `protobuf:"bytes,5,rep,name=statuses" json:"statuses"` + // This is the internal UUID for the operation, which is kept independently + // from the framework-specified operation ID, which is optional. + UUID UUID `protobuf:"bytes,6,req,name=uuid" json:"uuid"` +} + +func (m *Operation) Reset() { *m = Operation{} } +func (*Operation) ProtoMessage() {} +func (*Operation) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{48} } + +func (m *Operation) GetFrameworkID() *FrameworkID { + if m != nil { + return m.FrameworkID + } + return nil +} + +func (m *Operation) GetAgentID() *AgentID { + if m != nil { + return m.AgentID + } + return nil +} + +func (m *Operation) GetInfo() Offer_Operation { + if m != nil { + return m.Info + } + return Offer_Operation{} +} + +func (m *Operation) GetLatestStatus() OperationStatus { + if m != nil { + return m.LatestStatus + } + return OperationStatus{} +} + +func (m *Operation) GetStatuses() []OperationStatus { + if m != nil { + return m.Statuses + } + return nil +} + +func (m *Operation) GetUUID() UUID { + if m != nil { + return m.UUID + } + return UUID{} +} + +// * +// Describes the current status of an operation. +type OperationStatus struct { + OperationID *OperationID `protobuf:"bytes,1,opt,name=operation_id,json=operationId" json:"operation_id,omitempty"` + State OperationState `protobuf:"varint,2,req,name=state,enum=mesos.OperationState" json:"state"` + Message *string `protobuf:"bytes,3,opt,name=message" json:"message,omitempty"` + // Converted resources after applying the operation. This only + // applies if the `state` is `OPERATION_FINISHED`. + ConvertedResources []Resource `protobuf:"bytes,4,rep,name=converted_resources,json=convertedResources" json:"converted_resources"` + // Statuses that are delivered reliably to the scheduler will + // include a `uuid`. The status is considered delivered once + // it is acknowledged by the scheduler. + UUID *UUID `protobuf:"bytes,5,opt,name=uuid" json:"uuid,omitempty"` +} + +func (m *OperationStatus) Reset() { *m = OperationStatus{} } +func (*OperationStatus) ProtoMessage() {} +func (*OperationStatus) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{49} } + +func (m *OperationStatus) GetOperationID() *OperationID { + if m != nil { + return m.OperationID + } + return nil +} + +func (m *OperationStatus) GetState() OperationState { + if m != nil { + return m.State + } + return OPERATION_UNSUPPORTED +} + +func (m *OperationStatus) GetMessage() string { + if m != nil && m.Message != nil { + return *m.Message + } + return "" +} + +func (m *OperationStatus) GetConvertedResources() []Resource { + if m != nil { + return m.ConvertedResources + } + return nil +} + +func (m *OperationStatus) GetUUID() *UUID { + if m != nil { + return m.UUID + } + return nil +} + +// * +// Describes the status of a check. Type and the corresponding field, i.e., +// `command` or `http` must be set. If the result of the check is not available +// (e.g., the check timed out), these fields must contain empty messages, i.e., +// `exit_code` or `status_code` will be unset. +// +// NOTE: This API is unstable and the related feature is experimental. +type CheckStatusInfo struct { + // The type of the check this status corresponds to. + Type *CheckInfo_Type `protobuf:"varint,1,opt,name=type,enum=mesos.CheckInfo_Type" json:"type,omitempty"` + // Status of a command check. + Command *CheckStatusInfo_Command `protobuf:"bytes,2,opt,name=command" json:"command,omitempty"` + // Status of an HTTP check. + HTTP *CheckStatusInfo_Http `protobuf:"bytes,3,opt,name=http" json:"http,omitempty"` + // Status of a TCP check. + TCP *CheckStatusInfo_Tcp `protobuf:"bytes,4,opt,name=tcp" json:"tcp,omitempty"` +} + +func (m *CheckStatusInfo) Reset() { *m = CheckStatusInfo{} } +func (*CheckStatusInfo) ProtoMessage() {} +func (*CheckStatusInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{50} } + +func (m *CheckStatusInfo) GetType() CheckInfo_Type { + if m != nil && m.Type != nil { + return *m.Type + } + return CheckInfo_UNKNOWN +} + +func (m *CheckStatusInfo) GetCommand() *CheckStatusInfo_Command { + if m != nil { + return m.Command + } + return nil +} + +func (m *CheckStatusInfo) GetHTTP() *CheckStatusInfo_Http { + if m != nil { + return m.HTTP + } + return nil +} + +func (m *CheckStatusInfo) GetTCP() *CheckStatusInfo_Tcp { + if m != nil { + return m.TCP + } + return nil +} + +type CheckStatusInfo_Command struct { + // Exit code of a command check. It is the result of calling + // `WEXITSTATUS()` on `waitpid()` termination information on + // Posix and calling `GetExitCodeProcess()` on Windows. + ExitCode *int32 `protobuf:"varint,1,opt,name=exit_code,json=exitCode" json:"exit_code,omitempty"` +} + +func (m *CheckStatusInfo_Command) Reset() { *m = CheckStatusInfo_Command{} } +func (*CheckStatusInfo_Command) ProtoMessage() {} +func (*CheckStatusInfo_Command) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{50, 0} } + +func (m *CheckStatusInfo_Command) GetExitCode() int32 { + if m != nil && m.ExitCode != nil { + return *m.ExitCode + } + return 0 +} + +type CheckStatusInfo_Http struct { + // HTTP status code of an HTTP check. + StatusCode *uint32 `protobuf:"varint,1,opt,name=status_code,json=statusCode" json:"status_code,omitempty"` +} + +func (m *CheckStatusInfo_Http) Reset() { *m = CheckStatusInfo_Http{} } +func (*CheckStatusInfo_Http) ProtoMessage() {} +func (*CheckStatusInfo_Http) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{50, 1} } + +func (m *CheckStatusInfo_Http) GetStatusCode() uint32 { + if m != nil && m.StatusCode != nil { + return *m.StatusCode + } + return 0 +} + +type CheckStatusInfo_Tcp struct { + // Whether a TCP connection succeeded. + Succeeded *bool `protobuf:"varint,1,opt,name=succeeded" json:"succeeded,omitempty"` +} + +func (m *CheckStatusInfo_Tcp) Reset() { *m = CheckStatusInfo_Tcp{} } +func (*CheckStatusInfo_Tcp) ProtoMessage() {} +func (*CheckStatusInfo_Tcp) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{50, 2} } + +func (m *CheckStatusInfo_Tcp) GetSucceeded() bool { + if m != nil && m.Succeeded != nil { + return *m.Succeeded + } + return false +} + +// * +// Describes the current status of a task. +type TaskStatus struct { + TaskID TaskID `protobuf:"bytes,1,req,name=task_id,json=taskId" json:"task_id"` + State *TaskState `protobuf:"varint,2,req,name=state,enum=mesos.TaskState" json:"state,omitempty"` + Message *string `protobuf:"bytes,4,opt,name=message" json:"message,omitempty"` + Source *TaskStatus_Source `protobuf:"varint,9,opt,name=source,enum=mesos.TaskStatus_Source" json:"source,omitempty"` + Reason *TaskStatus_Reason `protobuf:"varint,10,opt,name=reason,enum=mesos.TaskStatus_Reason" json:"reason,omitempty"` + Data []byte `protobuf:"bytes,3,opt,name=data" json:"data,omitempty"` + AgentID *AgentID `protobuf:"bytes,5,opt,name=agent_id,json=agentId" json:"agent_id,omitempty"` + ExecutorID *ExecutorID `protobuf:"bytes,7,opt,name=executor_id,json=executorId" json:"executor_id,omitempty"` + Timestamp *float64 `protobuf:"fixed64,6,opt,name=timestamp" json:"timestamp,omitempty"` + // Statuses that are delivered reliably to the scheduler will + // include a 'uuid'. The status is considered delivered once + // it is acknowledged by the scheduler. Schedulers can choose + // to either explicitly acknowledge statuses or let the scheduler + // driver implicitly acknowledge (default). + // + // TODO(bmahler): This is currently overwritten in the scheduler + // driver and executor driver, but executors will need to set this + // to a valid RFC-4122 UUID if using the HTTP API. + UUID []byte `protobuf:"bytes,11,opt,name=uuid" json:"uuid,omitempty"` + // Describes whether the task has been determined to be healthy (true) or + // unhealthy (false) according to the `health_check` field in `TaskInfo`. + Healthy *bool `protobuf:"varint,8,opt,name=healthy" json:"healthy,omitempty"` + // Contains check status for the check specified in the corresponding + // `TaskInfo`. If no check has been specified, this field must be + // absent, otherwise it must be present even if the check status is + // not available yet. If the status update is triggered for a different + // reason than `REASON_TASK_CHECK_STATUS_UPDATED`, this field will contain + // the last known value. + // + // NOTE: A check-related task status update is triggered if and only if + // the value or presence of any field in `CheckStatusInfo` changes. + // + // NOTE: Check support in built-in executors is experimental. + CheckStatus *CheckStatusInfo `protobuf:"bytes,15,opt,name=check_status,json=checkStatus" json:"check_status,omitempty"` + // Labels are free-form key value pairs which are exposed through + // master and agent endpoints. Labels will not be interpreted or + // acted upon by Mesos itself. As opposed to the data field, labels + // will be kept in memory on master and agent processes. Therefore, + // labels should be used to tag TaskStatus message with light-weight + // meta-data. Labels should not contain duplicate key-value pairs. + Labels *Labels `protobuf:"bytes,12,opt,name=labels" json:"labels,omitempty"` + // Container related information that is resolved dynamically such as + // network address. + ContainerStatus *ContainerStatus `protobuf:"bytes,13,opt,name=container_status,json=containerStatus" json:"container_status,omitempty"` + // The time (according to the master's clock) when the agent where + // this task was running became unreachable. This is only set on + // status updates for tasks running on agents that are unreachable + // (e.g., partitioned away from the master). + UnreachableTime *TimeInfo `protobuf:"bytes,14,opt,name=unreachable_time,json=unreachableTime" json:"unreachable_time,omitempty"` + // If the reason field indicates a container resource limitation, + // this field optionally contains additional information. + Limitation *TaskResourceLimitation `protobuf:"bytes,16,opt,name=limitation" json:"limitation,omitempty"` +} + +func (m *TaskStatus) Reset() { *m = TaskStatus{} } +func (*TaskStatus) ProtoMessage() {} +func (*TaskStatus) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{51} } + +func (m *TaskStatus) GetTaskID() TaskID { + if m != nil { + return m.TaskID + } + return TaskID{} +} + +func (m *TaskStatus) GetState() TaskState { + if m != nil && m.State != nil { + return *m.State + } + return TASK_STAGING +} + +func (m *TaskStatus) GetMessage() string { + if m != nil && m.Message != nil { + return *m.Message + } + return "" +} + +func (m *TaskStatus) GetSource() TaskStatus_Source { + if m != nil && m.Source != nil { + return *m.Source + } + return SOURCE_MASTER +} + +func (m *TaskStatus) GetReason() TaskStatus_Reason { + if m != nil && m.Reason != nil { + return *m.Reason + } + return REASON_COMMAND_EXECUTOR_FAILED +} + +func (m *TaskStatus) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func (m *TaskStatus) GetAgentID() *AgentID { + if m != nil { + return m.AgentID + } + return nil +} + +func (m *TaskStatus) GetExecutorID() *ExecutorID { + if m != nil { + return m.ExecutorID + } + return nil +} + +func (m *TaskStatus) GetTimestamp() float64 { + if m != nil && m.Timestamp != nil { + return *m.Timestamp + } + return 0 +} + +func (m *TaskStatus) GetUUID() []byte { + if m != nil { + return m.UUID + } + return nil +} + +func (m *TaskStatus) GetHealthy() bool { + if m != nil && m.Healthy != nil { + return *m.Healthy + } + return false +} + +func (m *TaskStatus) GetCheckStatus() *CheckStatusInfo { + if m != nil { + return m.CheckStatus + } + return nil +} + +func (m *TaskStatus) GetLabels() *Labels { + if m != nil { + return m.Labels + } + return nil +} + +func (m *TaskStatus) GetContainerStatus() *ContainerStatus { + if m != nil { + return m.ContainerStatus + } + return nil +} + +func (m *TaskStatus) GetUnreachableTime() *TimeInfo { + if m != nil { + return m.UnreachableTime + } + return nil +} + +func (m *TaskStatus) GetLimitation() *TaskResourceLimitation { + if m != nil { + return m.Limitation + } + return nil +} + +// * +// Describes possible filters that can be applied to unused resources +// (see SchedulerDriver::launchTasks) to influence the allocator. +type Filters struct { + // Time to consider unused resources refused. Note that all unused + // resources will be considered refused and use the default value + // (below) regardless of whether Filters was passed to + // SchedulerDriver::launchTasks. You MUST pass Filters with this + // field set to change this behavior (i.e., get another offer which + // includes unused resources sooner or later than the default). + // + // If this field is set to a number of seconds greater than 31536000 + // (365 days), then the resources will be considered refused for 365 + // days. If it is set to a negative number, then the default value + // will be used. + RefuseSeconds *float64 `protobuf:"fixed64,1,opt,name=refuse_seconds,json=refuseSeconds,def=5" json:"refuse_seconds,omitempty"` +} + +func (m *Filters) Reset() { *m = Filters{} } +func (*Filters) ProtoMessage() {} +func (*Filters) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{52} } + +const Default_Filters_RefuseSeconds float64 = 5 + +func (m *Filters) GetRefuseSeconds() float64 { + if m != nil && m.RefuseSeconds != nil { + return *m.RefuseSeconds + } + return Default_Filters_RefuseSeconds +} + +// * +// Describes a collection of environment variables. This is used with +// CommandInfo in order to set environment variables before running a +// command. The contents of each variable may be specified as a string +// or a Secret; only one of `value` and `secret` must be set. +type Environment struct { + Variables []Environment_Variable `protobuf:"bytes,1,rep,name=variables" json:"variables"` +} + +func (m *Environment) Reset() { *m = Environment{} } +func (*Environment) ProtoMessage() {} +func (*Environment) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{53} } + +func (m *Environment) GetVariables() []Environment_Variable { + if m != nil { + return m.Variables + } + return nil +} + +type Environment_Variable struct { + Name string `protobuf:"bytes,1,req,name=name" json:"name"` + // In Mesos 1.2, the `Environment.variables.value` message was made + // optional. The default type for `Environment.variables.type` is now VALUE, + // which requires `value` to be set, maintaining backward compatibility. + // + // TODO(greggomann): The default can be removed in Mesos 2.1 (MESOS-7134). + Type *Environment_Variable_Type `protobuf:"varint,3,opt,name=type,enum=mesos.Environment_Variable_Type,def=1" json:"type,omitempty"` + // Only one of `value` and `secret` must be set. + Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` + Secret *Secret `protobuf:"bytes,4,opt,name=secret" json:"secret,omitempty"` +} + +func (m *Environment_Variable) Reset() { *m = Environment_Variable{} } +func (*Environment_Variable) ProtoMessage() {} +func (*Environment_Variable) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{53, 0} } + +const Default_Environment_Variable_Type Environment_Variable_Type = Environment_Variable_VALUE + +func (m *Environment_Variable) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Environment_Variable) GetType() Environment_Variable_Type { + if m != nil && m.Type != nil { + return *m.Type + } + return Default_Environment_Variable_Type +} + +func (m *Environment_Variable) GetValue() string { + if m != nil && m.Value != nil { + return *m.Value + } + return "" +} + +func (m *Environment_Variable) GetSecret() *Secret { + if m != nil { + return m.Secret + } + return nil +} + +// * +// A generic (key, value) pair used in various places for parameters. +type Parameter struct { + Key string `protobuf:"bytes,1,req,name=key" json:"key"` + Value string `protobuf:"bytes,2,req,name=value" json:"value"` +} + +func (m *Parameter) Reset() { *m = Parameter{} } +func (*Parameter) ProtoMessage() {} +func (*Parameter) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{54} } + +func (m *Parameter) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *Parameter) GetValue() string { + if m != nil { + return m.Value + } + return "" +} + +// * +// Collection of Parameter. +type Parameters struct { + Parameter []Parameter `protobuf:"bytes,1,rep,name=parameter" json:"parameter"` +} + +func (m *Parameters) Reset() { *m = Parameters{} } +func (*Parameters) ProtoMessage() {} +func (*Parameters) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{55} } + +func (m *Parameters) GetParameter() []Parameter { + if m != nil { + return m.Parameter + } + return nil +} + +// * +// Credential used in various places for authentication and +// authorization. +// +// NOTE: A 'principal' is different from 'FrameworkInfo.user'. The +// former is used for authentication and authorization while the +// latter is used to determine the default user under which the +// framework's executors/tasks are run. +type Credential struct { + Principal string `protobuf:"bytes,1,req,name=principal" json:"principal"` + Secret *string `protobuf:"bytes,2,opt,name=secret" json:"secret,omitempty"` +} + +func (m *Credential) Reset() { *m = Credential{} } +func (*Credential) ProtoMessage() {} +func (*Credential) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{56} } + +func (m *Credential) GetPrincipal() string { + if m != nil { + return m.Principal + } + return "" +} + +func (m *Credential) GetSecret() string { + if m != nil && m.Secret != nil { + return *m.Secret + } + return "" +} + +// * +// Credentials used for framework authentication, HTTP authentication +// (where the common 'username' and 'password' are captured as +// 'principal' and 'secret' respectively), etc. +type Credentials struct { + Credentials []Credential `protobuf:"bytes,1,rep,name=credentials" json:"credentials"` +} + +func (m *Credentials) Reset() { *m = Credentials{} } +func (*Credentials) ProtoMessage() {} +func (*Credentials) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{57} } + +func (m *Credentials) GetCredentials() []Credential { + if m != nil { + return m.Credentials + } + return nil +} + +// * +// Secret used to pass privileged information. It is designed to provide +// pass-by-value or pass-by-reference semantics, where the REFERENCE type can be +// used by custom modules which interact with a secure back-end. +type Secret struct { + Type Secret_Type `protobuf:"varint,1,opt,name=type,enum=mesos.Secret_Type" json:"type"` + // Only one of `reference` and `value` must be set. + Reference *Secret_Reference `protobuf:"bytes,2,opt,name=reference" json:"reference,omitempty"` + Value *Secret_Value `protobuf:"bytes,3,opt,name=value" json:"value,omitempty"` +} + +func (m *Secret) Reset() { *m = Secret{} } +func (*Secret) ProtoMessage() {} +func (*Secret) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{58} } + +func (m *Secret) GetType() Secret_Type { + if m != nil { + return m.Type + } + return Secret_UNKNOWN +} + +func (m *Secret) GetReference() *Secret_Reference { + if m != nil { + return m.Reference + } + return nil +} + +func (m *Secret) GetValue() *Secret_Value { + if m != nil { + return m.Value + } + return nil +} + +// Can be used by modules to refer to a secret stored in a secure back-end. +// The `key` field is provided to permit reference to a single value within a +// secret containing arbitrary key-value pairs. +// +// For example, given a back-end secret store with a secret named +// "my-secret" containing the following key-value pairs: +// +// { +// "username": "my-user", +// "password": "my-password +// } +// +// the username could be referred to in a `Secret` by specifying +// "my-secret" for the `name` and "username" for the `key`. +type Secret_Reference struct { + Name string `protobuf:"bytes,1,req,name=name" json:"name"` + Key *string `protobuf:"bytes,2,opt,name=key" json:"key,omitempty"` +} + +func (m *Secret_Reference) Reset() { *m = Secret_Reference{} } +func (*Secret_Reference) ProtoMessage() {} +func (*Secret_Reference) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{58, 0} } + +func (m *Secret_Reference) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Secret_Reference) GetKey() string { + if m != nil && m.Key != nil { + return *m.Key + } + return "" +} + +// Used to pass the value of a secret. +type Secret_Value struct { + Data []byte `protobuf:"bytes,1,req,name=data" json:"data,omitempty"` +} + +func (m *Secret_Value) Reset() { *m = Secret_Value{} } +func (*Secret_Value) ProtoMessage() {} +func (*Secret_Value) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{58, 1} } + +func (m *Secret_Value) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +// * +// Rate (queries per second, QPS) limit for messages from a framework to master. +// Strictly speaking they are the combined rate from all frameworks of the same +// principal. +type RateLimit struct { + // Leaving QPS unset gives it unlimited rate (i.e., not throttled), + // which also implies unlimited capacity. + QPS *float64 `protobuf:"fixed64,1,opt,name=qps" json:"qps,omitempty"` + // Principal of framework(s) to be throttled. Should match + // FrameworkInfo.principal and Credential.principal (if using authentication). + Principal string `protobuf:"bytes,2,req,name=principal" json:"principal"` + // Max number of outstanding messages from frameworks of this principal + // allowed by master before the next message is dropped and an error is sent + // back to the sender. Messages received before the capacity is reached are + // still going to be processed after the error is sent. + // If unspecified, this principal is assigned unlimited capacity. + // NOTE: This value is ignored if 'qps' is not set. + Capacity *uint64 `protobuf:"varint,3,opt,name=capacity" json:"capacity,omitempty"` +} + +func (m *RateLimit) Reset() { *m = RateLimit{} } +func (*RateLimit) ProtoMessage() {} +func (*RateLimit) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{59} } + +func (m *RateLimit) GetQPS() float64 { + if m != nil && m.QPS != nil { + return *m.QPS + } + return 0 +} + +func (m *RateLimit) GetPrincipal() string { + if m != nil { + return m.Principal + } + return "" +} + +func (m *RateLimit) GetCapacity() uint64 { + if m != nil && m.Capacity != nil { + return *m.Capacity + } + return 0 +} + +// * +// Collection of RateLimit. +// Frameworks without rate limits defined here are not throttled unless +// 'aggregate_default_qps' is specified. +type RateLimits struct { + // Items should have unique principals. + Limits []RateLimit `protobuf:"bytes,1,rep,name=limits" json:"limits"` + // All the frameworks not specified in 'limits' get this default rate. + // This rate is an aggregate rate for all of them, i.e., their combined + // traffic is throttled together at this rate. + AggregateDefaultQPS *float64 `protobuf:"fixed64,2,opt,name=aggregate_default_qps,json=aggregateDefaultQps" json:"aggregate_default_qps,omitempty"` + // All the frameworks not specified in 'limits' get this default capacity. + // This is an aggregate value similar to 'aggregate_default_qps'. + AggregateDefaultCapacity *uint64 `protobuf:"varint,3,opt,name=aggregate_default_capacity,json=aggregateDefaultCapacity" json:"aggregate_default_capacity,omitempty"` +} + +func (m *RateLimits) Reset() { *m = RateLimits{} } +func (*RateLimits) ProtoMessage() {} +func (*RateLimits) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{60} } + +func (m *RateLimits) GetLimits() []RateLimit { + if m != nil { + return m.Limits + } + return nil +} + +func (m *RateLimits) GetAggregateDefaultQPS() float64 { + if m != nil && m.AggregateDefaultQPS != nil { + return *m.AggregateDefaultQPS + } + return 0 +} + +func (m *RateLimits) GetAggregateDefaultCapacity() uint64 { + if m != nil && m.AggregateDefaultCapacity != nil { + return *m.AggregateDefaultCapacity + } + return 0 +} + +// * +// Describe an image used by tasks or executors. Note that it's only +// for tasks or executors launched by MesosContainerizer currently. +type Image struct { + Type *Image_Type `protobuf:"varint,1,req,name=type,enum=mesos.Image_Type" json:"type,omitempty"` + // Only one of the following image messages should be set to match + // the type. + Appc *Image_Appc `protobuf:"bytes,2,opt,name=appc" json:"appc,omitempty"` + Docker *Image_Docker `protobuf:"bytes,3,opt,name=docker" json:"docker,omitempty"` + // With this flag set to false, the mesos containerizer will pull + // the docker/appc image from the registry even if the image is + // already downloaded on the agent. + Cached *bool `protobuf:"varint,4,opt,name=cached,def=1" json:"cached,omitempty"` +} + +func (m *Image) Reset() { *m = Image{} } +func (*Image) ProtoMessage() {} +func (*Image) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{61} } + +const Default_Image_Cached bool = true + +func (m *Image) GetType() Image_Type { + if m != nil && m.Type != nil { + return *m.Type + } + return Image_APPC +} + +func (m *Image) GetAppc() *Image_Appc { + if m != nil { + return m.Appc + } + return nil +} + +func (m *Image) GetDocker() *Image_Docker { + if m != nil { + return m.Docker + } + return nil +} + +func (m *Image) GetCached() bool { + if m != nil && m.Cached != nil { + return *m.Cached + } + return Default_Image_Cached +} + +// Protobuf for specifying an Appc container image. See: +// https://github.com/appc/spec/blob/master/spec/aci.md +type Image_Appc struct { + // The name of the image. + Name string `protobuf:"bytes,1,req,name=name" json:"name"` + // An image ID is a string of the format "hash-value", where + // "hash" is the hash algorithm used and "value" is the hex + // encoded string of the digest. Currently the only permitted + // hash algorithm is sha512. + ID *string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"` + // Optional labels. Suggested labels: "version", "os", and "arch". + Labels *Labels `protobuf:"bytes,3,opt,name=labels" json:"labels,omitempty"` +} + +func (m *Image_Appc) Reset() { *m = Image_Appc{} } +func (*Image_Appc) ProtoMessage() {} +func (*Image_Appc) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{61, 0} } + +func (m *Image_Appc) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Image_Appc) GetID() string { + if m != nil && m.ID != nil { + return *m.ID + } + return "" +} + +func (m *Image_Appc) GetLabels() *Labels { + if m != nil { + return m.Labels + } + return nil +} + +type Image_Docker struct { + // The name of the image. Expected format: + // [REGISTRY_HOST[:REGISTRY_PORT]/]REPOSITORY[:TAG|@TYPE:DIGEST] + // + // See: https://docs.docker.com/reference/commandline/pull/ + Name string `protobuf:"bytes,1,req,name=name" json:"name"` + // Credential to authenticate with docker registry. + // NOTE: This is not encrypted, therefore framework and operators + // should enable SSL when passing this information. + // + // This field has never been used in Mesos before and is + // deprecated since Mesos 1.3. Please use `config` below + // (see MESOS-7088 for details). + Credential *Credential `protobuf:"bytes,2,opt,name=credential" json:"credential,omitempty"` + // Docker config containing credentails to authenticate with + // docker registry. The secret is expected to be a docker + // config file in JSON format with UTF-8 character encoding. + Config *Secret `protobuf:"bytes,3,opt,name=config" json:"config,omitempty"` +} + +func (m *Image_Docker) Reset() { *m = Image_Docker{} } +func (*Image_Docker) ProtoMessage() {} +func (*Image_Docker) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{61, 1} } + +func (m *Image_Docker) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Image_Docker) GetCredential() *Credential { + if m != nil { + return m.Credential + } + return nil +} + +func (m *Image_Docker) GetConfig() *Secret { + if m != nil { + return m.Config + } + return nil +} + +// * +// Describes how the mount will be propagated for a volume. See the +// following doc for more details about mount propagation: +// https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt +type MountPropagation struct { + Mode *MountPropagation_Mode `protobuf:"varint,1,opt,name=mode,enum=mesos.MountPropagation_Mode" json:"mode,omitempty"` +} + +func (m *MountPropagation) Reset() { *m = MountPropagation{} } +func (*MountPropagation) ProtoMessage() {} +func (*MountPropagation) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{62} } + +func (m *MountPropagation) GetMode() MountPropagation_Mode { + if m != nil && m.Mode != nil { + return *m.Mode + } + return MountPropagation_UNKNOWN +} + +// * +// Describes a volume mapping either from host to container or vice +// versa. Both paths can either refer to a directory or a file. +type Volume struct { + // TODO(gyliu513): Make this as `optional` after deprecation cycle of 1.0. + Mode *Volume_Mode `protobuf:"varint,3,req,name=mode,enum=mesos.Volume_Mode" json:"mode,omitempty"` + // Path pointing to a directory or file in the container. If the + // path is a relative path, it is relative to the container work + // directory. If the path is an absolute path, that path must + // already exist. + ContainerPath string `protobuf:"bytes,1,req,name=container_path,json=containerPath" json:"container_path"` + // Absolute path pointing to a directory or file on the host or a + // path relative to the container work directory. + HostPath *string `protobuf:"bytes,2,opt,name=host_path,json=hostPath" json:"host_path,omitempty"` + // The source of the volume is an Image which describes a root + // filesystem which will be provisioned by Mesos. + Image *Image `protobuf:"bytes,4,opt,name=image" json:"image,omitempty"` + Source *Volume_Source `protobuf:"bytes,5,opt,name=source" json:"source,omitempty"` +} + +func (m *Volume) Reset() { *m = Volume{} } +func (*Volume) ProtoMessage() {} +func (*Volume) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{63} } + +func (m *Volume) GetMode() Volume_Mode { + if m != nil && m.Mode != nil { + return *m.Mode + } + return RW +} + +func (m *Volume) GetContainerPath() string { + if m != nil { + return m.ContainerPath + } + return "" +} + +func (m *Volume) GetHostPath() string { + if m != nil && m.HostPath != nil { + return *m.HostPath + } + return "" +} + +func (m *Volume) GetImage() *Image { + if m != nil { + return m.Image + } + return nil +} + +func (m *Volume) GetSource() *Volume_Source { + if m != nil { + return m.Source + } + return nil +} + +// Describes where a volume originates from. +type Volume_Source struct { + // Enum fields should be optional, see: MESOS-4997. + Type Volume_Source_Type `protobuf:"varint,1,opt,name=type,enum=mesos.Volume_Source_Type" json:"type"` + // The source of the volume created by docker volume driver. + DockerVolume *Volume_Source_DockerVolume `protobuf:"bytes,2,opt,name=docker_volume,json=dockerVolume" json:"docker_volume,omitempty"` + HostPath *Volume_Source_HostPath `protobuf:"bytes,5,opt,name=host_path,json=hostPath" json:"host_path,omitempty"` + SandboxPath *Volume_Source_SandboxPath `protobuf:"bytes,3,opt,name=sandbox_path,json=sandboxPath" json:"sandbox_path,omitempty"` + // The volume/secret isolator uses the secret-fetcher module (third-party or + // internal) downloads the secret and makes it available at container_path. + Secret *Secret `protobuf:"bytes,4,opt,name=secret" json:"secret,omitempty"` +} + +func (m *Volume_Source) Reset() { *m = Volume_Source{} } +func (*Volume_Source) ProtoMessage() {} +func (*Volume_Source) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{63, 0} } + +func (m *Volume_Source) GetType() Volume_Source_Type { + if m != nil { + return m.Type + } + return Volume_Source_UNKNOWN +} + +func (m *Volume_Source) GetDockerVolume() *Volume_Source_DockerVolume { + if m != nil { + return m.DockerVolume + } + return nil +} + +func (m *Volume_Source) GetHostPath() *Volume_Source_HostPath { + if m != nil { + return m.HostPath + } + return nil +} + +func (m *Volume_Source) GetSandboxPath() *Volume_Source_SandboxPath { + if m != nil { + return m.SandboxPath + } + return nil +} + +func (m *Volume_Source) GetSecret() *Secret { + if m != nil { + return m.Secret + } + return nil +} + +type Volume_Source_DockerVolume struct { + // Driver of the volume, it can be flocker, convoy, raxrey etc. + Driver *string `protobuf:"bytes,1,opt,name=driver" json:"driver,omitempty"` + // Name of the volume. + Name string `protobuf:"bytes,2,req,name=name" json:"name"` + // Volume driver specific options. + DriverOptions *Parameters `protobuf:"bytes,3,opt,name=driver_options,json=driverOptions" json:"driver_options,omitempty"` +} + +func (m *Volume_Source_DockerVolume) Reset() { *m = Volume_Source_DockerVolume{} } +func (*Volume_Source_DockerVolume) ProtoMessage() {} +func (*Volume_Source_DockerVolume) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{63, 0, 0} +} + +func (m *Volume_Source_DockerVolume) GetDriver() string { + if m != nil && m.Driver != nil { + return *m.Driver + } + return "" +} + +func (m *Volume_Source_DockerVolume) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Volume_Source_DockerVolume) GetDriverOptions() *Parameters { + if m != nil { + return m.DriverOptions + } + return nil +} + +// Absolute path pointing to a directory or file on the host. +type Volume_Source_HostPath struct { + Path string `protobuf:"bytes,1,req,name=path" json:"path"` + MountPropagation *MountPropagation `protobuf:"bytes,2,opt,name=mount_propagation,json=mountPropagation" json:"mount_propagation,omitempty"` +} + +func (m *Volume_Source_HostPath) Reset() { *m = Volume_Source_HostPath{} } +func (*Volume_Source_HostPath) ProtoMessage() {} +func (*Volume_Source_HostPath) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{63, 0, 1} +} + +func (m *Volume_Source_HostPath) GetPath() string { + if m != nil { + return m.Path + } + return "" +} + +func (m *Volume_Source_HostPath) GetMountPropagation() *MountPropagation { + if m != nil { + return m.MountPropagation + } + return nil +} + +// Describe a path from a container's sandbox. The container can +// be the current container (SELF), or its parent container +// (PARENT). PARENT allows all child containers to share a volume +// from their parent container's sandbox. It'll be an error if +// the current container is a top level container. +type Volume_Source_SandboxPath struct { + Type Volume_Source_SandboxPath_Type `protobuf:"varint,1,opt,name=type,enum=mesos.Volume_Source_SandboxPath_Type" json:"type"` + // A path relative to the corresponding container's sandbox. + // Note that upwards traversal (i.e. ../../abc) is not allowed. + Path string `protobuf:"bytes,2,req,name=path" json:"path"` +} + +func (m *Volume_Source_SandboxPath) Reset() { *m = Volume_Source_SandboxPath{} } +func (*Volume_Source_SandboxPath) ProtoMessage() {} +func (*Volume_Source_SandboxPath) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{63, 0, 2} +} + +func (m *Volume_Source_SandboxPath) GetType() Volume_Source_SandboxPath_Type { + if m != nil { + return m.Type + } + return Volume_Source_SandboxPath_UNKNOWN +} + +func (m *Volume_Source_SandboxPath) GetPath() string { + if m != nil { + return m.Path + } + return "" +} + +// * +// Describes a network request from a framework as well as network resolution +// provided by Mesos. +// +// A framework may request the network isolator on the Agent to isolate the +// container in a network namespace and create a virtual network interface. +// The `NetworkInfo` message describes the properties of that virtual +// interface, including the IP addresses and network isolation policy +// (network group membership). +// +// The NetworkInfo message is not interpreted by the Master or Agent and is +// intended to be used by Agent and Master modules implementing network +// isolation. If the modules are missing, the message is simply ignored. In +// future, the task launch will fail if there is no module providing the +// network isolation capabilities (MESOS-3390). +// +// An executor, Agent, or an Agent module may append NetworkInfos inside +// TaskStatus::container_status to provide information such as the container IP +// address and isolation groups. +type NetworkInfo struct { + // When included in a ContainerInfo, each of these represent a + // request for an IP address. Each request can specify an explicit address + // or the IP protocol to use. + // + // When included in a TaskStatus message, these inform the framework + // scheduler about the IP addresses that are bound to the container + // interface. When there are no custom network isolator modules installed, + // this field is filled in automatically with the Agent IP address. + IPAddresses []NetworkInfo_IPAddress `protobuf:"bytes,5,rep,name=ip_addresses,json=ipAddresses" json:"ip_addresses"` + // Name of the network which will be used by network isolator to determine + // the network that the container joins. It's up to the network isolator + // to decide how to interpret this field. + Name *string `protobuf:"bytes,6,opt,name=name" json:"name,omitempty"` + // A group is the name given to a set of logically-related interfaces that + // are allowed to communicate among themselves. Network traffic is allowed + // between two container interfaces that share at least one network group. + // For example, one might want to create separate groups for isolating dev, + // testing, qa and prod deployment environments. + Groups []string `protobuf:"bytes,3,rep,name=groups" json:"groups,omitempty"` + // To tag certain metadata to be used by Isolator/IPAM, e.g., rack, etc. + Labels *Labels `protobuf:"bytes,4,opt,name=labels" json:"labels,omitempty"` + PortMappings []NetworkInfo_PortMapping `protobuf:"bytes,7,rep,name=port_mappings,json=portMappings" json:"port_mappings"` +} + +func (m *NetworkInfo) Reset() { *m = NetworkInfo{} } +func (*NetworkInfo) ProtoMessage() {} +func (*NetworkInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{64} } + +func (m *NetworkInfo) GetIPAddresses() []NetworkInfo_IPAddress { + if m != nil { + return m.IPAddresses + } + return nil +} + +func (m *NetworkInfo) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *NetworkInfo) GetGroups() []string { + if m != nil { + return m.Groups + } + return nil +} + +func (m *NetworkInfo) GetLabels() *Labels { + if m != nil { + return m.Labels + } + return nil +} + +func (m *NetworkInfo) GetPortMappings() []NetworkInfo_PortMapping { + if m != nil { + return m.PortMappings + } + return nil +} + +// Specifies a request for an IP address, or reports the assigned container +// IP address. +// +// Users can request an automatically assigned IP (for example, via an +// IPAM service) or a specific IP by adding a NetworkInfo to the +// ContainerInfo for a task. On a request, specifying neither `protocol` +// nor `ip_address` means that any available address may be assigned. +type NetworkInfo_IPAddress struct { + // Specify IP address requirement. Set protocol to the desired value to + // request the network isolator on the Agent to assign an IP address to the + // container being launched. If a specific IP address is specified in + // ip_address, this field should not be set. + Protocol *NetworkInfo_Protocol `protobuf:"varint,1,opt,name=protocol,enum=mesos.NetworkInfo_Protocol,def=1" json:"protocol,omitempty"` + // Statically assigned IP provided by the Framework. This IP will be + // assigned to the container by the network isolator module on the Agent. + // This field should not be used with the protocol field above. + // + // If an explicit address is requested but is unavailable, the network + // isolator should fail the task. + IPAddress *string `protobuf:"bytes,2,opt,name=ip_address,json=ipAddress" json:"ip_address,omitempty"` +} + +func (m *NetworkInfo_IPAddress) Reset() { *m = NetworkInfo_IPAddress{} } +func (*NetworkInfo_IPAddress) ProtoMessage() {} +func (*NetworkInfo_IPAddress) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{64, 0} } + +const Default_NetworkInfo_IPAddress_Protocol NetworkInfo_Protocol = IPv4 + +func (m *NetworkInfo_IPAddress) GetProtocol() NetworkInfo_Protocol { + if m != nil && m.Protocol != nil { + return *m.Protocol + } + return Default_NetworkInfo_IPAddress_Protocol +} + +func (m *NetworkInfo_IPAddress) GetIPAddress() string { + if m != nil && m.IPAddress != nil { + return *m.IPAddress + } + return "" +} + +// Specifies a port mapping request for the task on this network. +type NetworkInfo_PortMapping struct { + HostPort uint32 `protobuf:"varint,1,req,name=host_port,json=hostPort" json:"host_port"` + ContainerPort uint32 `protobuf:"varint,2,req,name=container_port,json=containerPort" json:"container_port"` + // Protocol to expose as (ie: tcp, udp). + Protocol *string `protobuf:"bytes,3,opt,name=protocol" json:"protocol,omitempty"` +} + +func (m *NetworkInfo_PortMapping) Reset() { *m = NetworkInfo_PortMapping{} } +func (*NetworkInfo_PortMapping) ProtoMessage() {} +func (*NetworkInfo_PortMapping) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{64, 1} } + +func (m *NetworkInfo_PortMapping) GetHostPort() uint32 { + if m != nil { + return m.HostPort + } + return 0 +} + +func (m *NetworkInfo_PortMapping) GetContainerPort() uint32 { + if m != nil { + return m.ContainerPort + } + return 0 +} + +func (m *NetworkInfo_PortMapping) GetProtocol() string { + if m != nil && m.Protocol != nil { + return *m.Protocol + } + return "" +} + +// * +// Encapsulation of `Capabilities` supported by Linux. +// Reference: http://linux.die.net/man/7/capabilities. +type CapabilityInfo struct { + Capabilities []CapabilityInfo_Capability `protobuf:"varint,1,rep,name=capabilities,enum=mesos.CapabilityInfo_Capability" json:"capabilities,omitempty"` +} + +func (m *CapabilityInfo) Reset() { *m = CapabilityInfo{} } +func (*CapabilityInfo) ProtoMessage() {} +func (*CapabilityInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{65} } + +func (m *CapabilityInfo) GetCapabilities() []CapabilityInfo_Capability { + if m != nil { + return m.Capabilities + } + return nil +} + +// * +// Encapsulation for Linux specific configuration. +// E.g, capabilities, limits etc. +type LinuxInfo struct { + // Since 1.4.0, deprecated in favor of `effective_capabilities`. + CapabilityInfo *CapabilityInfo `protobuf:"bytes,1,opt,name=capability_info,json=capabilityInfo" json:"capability_info,omitempty"` + // The set of capabilities that are allowed but not initially + // granted to tasks. + BoundingCapabilities *CapabilityInfo `protobuf:"bytes,2,opt,name=bounding_capabilities,json=boundingCapabilities" json:"bounding_capabilities,omitempty"` + // Represents the set of capabilities that the task will + // be executed with. + EffectiveCapabilities *CapabilityInfo `protobuf:"bytes,3,opt,name=effective_capabilities,json=effectiveCapabilities" json:"effective_capabilities,omitempty"` + // If set as 'true', the container shares the pid namespace with + // its parent. If the container is a top level container, it will + // share the pid namespace with the agent. If the container is a + // nested container, it will share the pid namespace with its + // parent container. This field will be ignored if 'namespaces/pid' + // isolator is not enabled. + SharePIDNamespace *bool `protobuf:"varint,4,opt,name=share_pid_namespace,json=sharePidNamespace" json:"share_pid_namespace,omitempty"` +} + +func (m *LinuxInfo) Reset() { *m = LinuxInfo{} } +func (*LinuxInfo) ProtoMessage() {} +func (*LinuxInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{66} } + +func (m *LinuxInfo) GetCapabilityInfo() *CapabilityInfo { + if m != nil { + return m.CapabilityInfo + } + return nil +} + +func (m *LinuxInfo) GetBoundingCapabilities() *CapabilityInfo { + if m != nil { + return m.BoundingCapabilities + } + return nil +} + +func (m *LinuxInfo) GetEffectiveCapabilities() *CapabilityInfo { + if m != nil { + return m.EffectiveCapabilities + } + return nil +} + +func (m *LinuxInfo) GetSharePIDNamespace() bool { + if m != nil && m.SharePIDNamespace != nil { + return *m.SharePIDNamespace + } + return false +} + +// * +// Encapsulation for POSIX rlimits, see +// http://pubs.opengroup.org/onlinepubs/009695399/functions/getrlimit.html. +// Note that some types might only be defined for Linux. +// We use a custom prefix to avoid conflict with existing system macros +// (e.g., `RLIMIT_CPU` or `NOFILE`). +type RLimitInfo struct { + Rlimits []RLimitInfo_RLimit `protobuf:"bytes,1,rep,name=rlimits" json:"rlimits"` +} + +func (m *RLimitInfo) Reset() { *m = RLimitInfo{} } +func (*RLimitInfo) ProtoMessage() {} +func (*RLimitInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{67} } + +func (m *RLimitInfo) GetRlimits() []RLimitInfo_RLimit { + if m != nil { + return m.Rlimits + } + return nil +} + +type RLimitInfo_RLimit struct { + Type RLimitInfo_RLimit_Type `protobuf:"varint,1,opt,name=type,enum=mesos.RLimitInfo_RLimit_Type" json:"type"` + // Either both are set or both are not set. + // If both are not set, it represents unlimited. + // If both are set, we require `soft` <= `hard`. + Hard *uint64 `protobuf:"varint,2,opt,name=hard" json:"hard,omitempty"` + Soft *uint64 `protobuf:"varint,3,opt,name=soft" json:"soft,omitempty"` +} + +func (m *RLimitInfo_RLimit) Reset() { *m = RLimitInfo_RLimit{} } +func (*RLimitInfo_RLimit) ProtoMessage() {} +func (*RLimitInfo_RLimit) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{67, 0} } + +func (m *RLimitInfo_RLimit) GetType() RLimitInfo_RLimit_Type { + if m != nil { + return m.Type + } + return RLimitInfo_RLimit_UNKNOWN +} + +func (m *RLimitInfo_RLimit) GetHard() uint64 { + if m != nil && m.Hard != nil { + return *m.Hard + } + return 0 +} + +func (m *RLimitInfo_RLimit) GetSoft() uint64 { + if m != nil && m.Soft != nil { + return *m.Soft + } + return 0 +} + +// * +// Describes the information about (pseudo) TTY that can +// be attached to a process running in a container. +type TTYInfo struct { + WindowSize *TTYInfo_WindowSize `protobuf:"bytes,1,opt,name=window_size,json=windowSize" json:"window_size,omitempty"` +} + +func (m *TTYInfo) Reset() { *m = TTYInfo{} } +func (*TTYInfo) ProtoMessage() {} +func (*TTYInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{68} } + +func (m *TTYInfo) GetWindowSize() *TTYInfo_WindowSize { + if m != nil { + return m.WindowSize + } + return nil +} + +type TTYInfo_WindowSize struct { + Rows uint32 `protobuf:"varint,1,req,name=rows" json:"rows"` + Columns uint32 `protobuf:"varint,2,req,name=columns" json:"columns"` +} + +func (m *TTYInfo_WindowSize) Reset() { *m = TTYInfo_WindowSize{} } +func (*TTYInfo_WindowSize) ProtoMessage() {} +func (*TTYInfo_WindowSize) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{68, 0} } + +func (m *TTYInfo_WindowSize) GetRows() uint32 { + if m != nil { + return m.Rows + } + return 0 +} + +func (m *TTYInfo_WindowSize) GetColumns() uint32 { + if m != nil { + return m.Columns + } + return 0 +} + +// * +// Describes a container configuration and allows extensible +// configurations for different container implementations. +// +// NOTE: `ContainerInfo` may be specified, e.g., by a task, even if no +// container image is provided. In this case neither `MesosInfo` nor +// `DockerInfo` is set, the required `type` must be `MESOS`. This is to +// address a case when a task without an image, e.g., a shell script +// with URIs, wants to use features originally designed for containers, +// for example custom network isolation via `NetworkInfo`. +type ContainerInfo struct { + Type *ContainerInfo_Type `protobuf:"varint,1,req,name=type,enum=mesos.ContainerInfo_Type" json:"type,omitempty"` + Volumes []Volume `protobuf:"bytes,2,rep,name=volumes" json:"volumes"` + Hostname *string `protobuf:"bytes,4,opt,name=hostname" json:"hostname,omitempty"` + // Only one of the following *Info messages should be set to match + // the type. + Docker *ContainerInfo_DockerInfo `protobuf:"bytes,3,opt,name=docker" json:"docker,omitempty"` + Mesos *ContainerInfo_MesosInfo `protobuf:"bytes,5,opt,name=mesos" json:"mesos,omitempty"` + // A list of network requests. A framework can request multiple IP addresses + // for the container. + NetworkInfos []NetworkInfo `protobuf:"bytes,7,rep,name=network_infos,json=networkInfos" json:"network_infos"` + // Linux specific information for the container. + LinuxInfo *LinuxInfo `protobuf:"bytes,8,opt,name=linux_info,json=linuxInfo" json:"linux_info,omitempty"` + // (POSIX only) rlimits of the container. + RlimitInfo *RLimitInfo `protobuf:"bytes,9,opt,name=rlimit_info,json=rlimitInfo" json:"rlimit_info,omitempty"` + // If specified a tty will be attached to the container entrypoint. + TTYInfo *TTYInfo `protobuf:"bytes,10,opt,name=tty_info,json=ttyInfo" json:"tty_info,omitempty"` +} + +func (m *ContainerInfo) Reset() { *m = ContainerInfo{} } +func (*ContainerInfo) ProtoMessage() {} +func (*ContainerInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{69} } + +func (m *ContainerInfo) GetType() ContainerInfo_Type { + if m != nil && m.Type != nil { + return *m.Type + } + return ContainerInfo_DOCKER +} + +func (m *ContainerInfo) GetVolumes() []Volume { + if m != nil { + return m.Volumes + } + return nil +} + +func (m *ContainerInfo) GetHostname() string { + if m != nil && m.Hostname != nil { + return *m.Hostname + } + return "" +} + +func (m *ContainerInfo) GetDocker() *ContainerInfo_DockerInfo { + if m != nil { + return m.Docker + } + return nil +} + +func (m *ContainerInfo) GetMesos() *ContainerInfo_MesosInfo { + if m != nil { + return m.Mesos + } + return nil +} + +func (m *ContainerInfo) GetNetworkInfos() []NetworkInfo { + if m != nil { + return m.NetworkInfos + } + return nil +} + +func (m *ContainerInfo) GetLinuxInfo() *LinuxInfo { + if m != nil { + return m.LinuxInfo + } + return nil +} + +func (m *ContainerInfo) GetRlimitInfo() *RLimitInfo { + if m != nil { + return m.RlimitInfo + } + return nil +} + +func (m *ContainerInfo) GetTTYInfo() *TTYInfo { + if m != nil { + return m.TTYInfo + } + return nil +} + +type ContainerInfo_DockerInfo struct { + // The docker image that is going to be passed to the registry. + Image string `protobuf:"bytes,1,req,name=image" json:"image"` + Network *ContainerInfo_DockerInfo_Network `protobuf:"varint,2,opt,name=network,enum=mesos.ContainerInfo_DockerInfo_Network,def=1" json:"network,omitempty"` + PortMappings []ContainerInfo_DockerInfo_PortMapping `protobuf:"bytes,3,rep,name=port_mappings,json=portMappings" json:"port_mappings"` + Privileged *bool `protobuf:"varint,4,opt,name=privileged,def=0" json:"privileged,omitempty"` + // Allowing arbitrary parameters to be passed to docker CLI. + // Note that anything passed to this field is not guaranteed + // to be supported moving forward, as we might move away from + // the docker CLI. + Parameters []Parameter `protobuf:"bytes,5,rep,name=parameters" json:"parameters"` + // With this flag set to true, the docker containerizer will + // pull the docker image from the registry even if the image + // is already downloaded on the agent. + ForcePullImage *bool `protobuf:"varint,6,opt,name=force_pull_image,json=forcePullImage" json:"force_pull_image,omitempty"` + // The name of volume driver plugin. + VolumeDriver *string `protobuf:"bytes,7,opt,name=volume_driver,json=volumeDriver" json:"volume_driver,omitempty"` +} + +func (m *ContainerInfo_DockerInfo) Reset() { *m = ContainerInfo_DockerInfo{} } +func (*ContainerInfo_DockerInfo) ProtoMessage() {} +func (*ContainerInfo_DockerInfo) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{69, 0} +} + +const Default_ContainerInfo_DockerInfo_Network ContainerInfo_DockerInfo_Network = ContainerInfo_DockerInfo_HOST +const Default_ContainerInfo_DockerInfo_Privileged bool = false + +func (m *ContainerInfo_DockerInfo) GetImage() string { + if m != nil { + return m.Image + } + return "" +} + +func (m *ContainerInfo_DockerInfo) GetNetwork() ContainerInfo_DockerInfo_Network { + if m != nil && m.Network != nil { + return *m.Network + } + return Default_ContainerInfo_DockerInfo_Network +} + +func (m *ContainerInfo_DockerInfo) GetPortMappings() []ContainerInfo_DockerInfo_PortMapping { + if m != nil { + return m.PortMappings + } + return nil +} + +func (m *ContainerInfo_DockerInfo) GetPrivileged() bool { + if m != nil && m.Privileged != nil { + return *m.Privileged + } + return Default_ContainerInfo_DockerInfo_Privileged +} + +func (m *ContainerInfo_DockerInfo) GetParameters() []Parameter { + if m != nil { + return m.Parameters + } + return nil +} + +func (m *ContainerInfo_DockerInfo) GetForcePullImage() bool { + if m != nil && m.ForcePullImage != nil { + return *m.ForcePullImage + } + return false +} + +func (m *ContainerInfo_DockerInfo) GetVolumeDriver() string { + if m != nil && m.VolumeDriver != nil { + return *m.VolumeDriver + } + return "" +} + +type ContainerInfo_DockerInfo_PortMapping struct { + HostPort uint32 `protobuf:"varint,1,req,name=host_port,json=hostPort" json:"host_port"` + ContainerPort uint32 `protobuf:"varint,2,req,name=container_port,json=containerPort" json:"container_port"` + // Protocol to expose as (ie: tcp, udp). + Protocol *string `protobuf:"bytes,3,opt,name=protocol" json:"protocol,omitempty"` +} + +func (m *ContainerInfo_DockerInfo_PortMapping) Reset() { *m = ContainerInfo_DockerInfo_PortMapping{} } +func (*ContainerInfo_DockerInfo_PortMapping) ProtoMessage() {} +func (*ContainerInfo_DockerInfo_PortMapping) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{69, 0, 0} +} + +func (m *ContainerInfo_DockerInfo_PortMapping) GetHostPort() uint32 { + if m != nil { + return m.HostPort + } + return 0 +} + +func (m *ContainerInfo_DockerInfo_PortMapping) GetContainerPort() uint32 { + if m != nil { + return m.ContainerPort + } + return 0 +} + +func (m *ContainerInfo_DockerInfo_PortMapping) GetProtocol() string { + if m != nil && m.Protocol != nil { + return *m.Protocol + } + return "" +} + +type ContainerInfo_MesosInfo struct { + Image *Image `protobuf:"bytes,1,opt,name=image" json:"image,omitempty"` +} + +func (m *ContainerInfo_MesosInfo) Reset() { *m = ContainerInfo_MesosInfo{} } +func (*ContainerInfo_MesosInfo) ProtoMessage() {} +func (*ContainerInfo_MesosInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{69, 1} } + +func (m *ContainerInfo_MesosInfo) GetImage() *Image { + if m != nil { + return m.Image + } + return nil +} + +// * +// Container related information that is resolved during container +// setup. The information is sent back to the framework as part of the +// TaskStatus message. +type ContainerStatus struct { + ContainerID *ContainerID `protobuf:"bytes,4,opt,name=container_id,json=containerId" json:"container_id,omitempty"` + // This field can be reliably used to identify the container IP address. + NetworkInfos []NetworkInfo `protobuf:"bytes,1,rep,name=network_infos,json=networkInfos" json:"network_infos"` + // Information about Linux control group (cgroup). + CgroupInfo *CgroupInfo `protobuf:"bytes,2,opt,name=cgroup_info,json=cgroupInfo" json:"cgroup_info,omitempty"` + // Information about Executor PID. + ExecutorPID *uint32 `protobuf:"varint,3,opt,name=executor_pid,json=executorPid" json:"executor_pid,omitempty"` +} + +func (m *ContainerStatus) Reset() { *m = ContainerStatus{} } +func (*ContainerStatus) ProtoMessage() {} +func (*ContainerStatus) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{70} } + +func (m *ContainerStatus) GetContainerID() *ContainerID { + if m != nil { + return m.ContainerID + } + return nil +} + +func (m *ContainerStatus) GetNetworkInfos() []NetworkInfo { + if m != nil { + return m.NetworkInfos + } + return nil +} + +func (m *ContainerStatus) GetCgroupInfo() *CgroupInfo { + if m != nil { + return m.CgroupInfo + } + return nil +} + +func (m *ContainerStatus) GetExecutorPID() uint32 { + if m != nil && m.ExecutorPID != nil { + return *m.ExecutorPID + } + return 0 +} + +// * +// Linux control group (cgroup) information. +type CgroupInfo struct { + NetCLS *CgroupInfo_NetCls `protobuf:"bytes,1,opt,name=net_cls,json=netCls" json:"net_cls,omitempty"` +} + +func (m *CgroupInfo) Reset() { *m = CgroupInfo{} } +func (*CgroupInfo) ProtoMessage() {} +func (*CgroupInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{71} } + +func (m *CgroupInfo) GetNetCLS() *CgroupInfo_NetCls { + if m != nil { + return m.NetCLS + } + return nil +} + +// Configuration of a blkio cgroup subsystem. +type CgroupInfo_Blkio struct { +} + +func (m *CgroupInfo_Blkio) Reset() { *m = CgroupInfo_Blkio{} } +func (*CgroupInfo_Blkio) ProtoMessage() {} +func (*CgroupInfo_Blkio) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{71, 0} } + +// Describes a stat value without the device descriptor part. +type CgroupInfo_Blkio_Value struct { + Op *CgroupInfo_Blkio_Operation `protobuf:"varint,1,opt,name=op,enum=mesos.CgroupInfo_Blkio_Operation" json:"op,omitempty"` + Value *uint64 `protobuf:"varint,2,opt,name=value" json:"value,omitempty"` +} + +func (m *CgroupInfo_Blkio_Value) Reset() { *m = CgroupInfo_Blkio_Value{} } +func (*CgroupInfo_Blkio_Value) ProtoMessage() {} +func (*CgroupInfo_Blkio_Value) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{71, 0, 0} +} + +func (m *CgroupInfo_Blkio_Value) GetOp() CgroupInfo_Blkio_Operation { + if m != nil && m.Op != nil { + return *m.Op + } + return CgroupInfo_Blkio_UNKNOWN +} + +func (m *CgroupInfo_Blkio_Value) GetValue() uint64 { + if m != nil && m.Value != nil { + return *m.Value + } + return 0 +} + +type CgroupInfo_Blkio_CFQ struct { +} + +func (m *CgroupInfo_Blkio_CFQ) Reset() { *m = CgroupInfo_Blkio_CFQ{} } +func (*CgroupInfo_Blkio_CFQ) ProtoMessage() {} +func (*CgroupInfo_Blkio_CFQ) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{71, 0, 1} } + +type CgroupInfo_Blkio_CFQ_Statistics struct { + // Stats are grouped by block devices. If `device` is not + // set, it represents `Total`. + Device *Device_Number `protobuf:"bytes,1,opt,name=device" json:"device,omitempty"` + // blkio.sectors + Sectors *uint64 `protobuf:"varint,2,opt,name=sectors" json:"sectors,omitempty"` + // blkio.time + Time *uint64 `protobuf:"varint,3,opt,name=time" json:"time,omitempty"` + // blkio.io_serviced + IOServiced []CgroupInfo_Blkio_Value `protobuf:"bytes,4,rep,name=io_serviced,json=ioServiced" json:"io_serviced"` + // blkio.io_service_bytes + IOServiceBytes []CgroupInfo_Blkio_Value `protobuf:"bytes,5,rep,name=io_service_bytes,json=ioServiceBytes" json:"io_service_bytes"` + // blkio.io_service_time + IOServiceTime []CgroupInfo_Blkio_Value `protobuf:"bytes,6,rep,name=io_service_time,json=ioServiceTime" json:"io_service_time"` + // blkio.io_wait_time + IOWaitTime []CgroupInfo_Blkio_Value `protobuf:"bytes,7,rep,name=io_wait_time,json=ioWaitTime" json:"io_wait_time"` + // blkio.io_merged + IOMerged []CgroupInfo_Blkio_Value `protobuf:"bytes,8,rep,name=io_merged,json=ioMerged" json:"io_merged"` + // blkio.io_queued + IOQueued []CgroupInfo_Blkio_Value `protobuf:"bytes,9,rep,name=io_queued,json=ioQueued" json:"io_queued"` +} + +func (m *CgroupInfo_Blkio_CFQ_Statistics) Reset() { *m = CgroupInfo_Blkio_CFQ_Statistics{} } +func (*CgroupInfo_Blkio_CFQ_Statistics) ProtoMessage() {} +func (*CgroupInfo_Blkio_CFQ_Statistics) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{71, 0, 1, 0} +} + +func (m *CgroupInfo_Blkio_CFQ_Statistics) GetDevice() *Device_Number { + if m != nil { + return m.Device + } + return nil +} + +func (m *CgroupInfo_Blkio_CFQ_Statistics) GetSectors() uint64 { + if m != nil && m.Sectors != nil { + return *m.Sectors + } + return 0 +} + +func (m *CgroupInfo_Blkio_CFQ_Statistics) GetTime() uint64 { + if m != nil && m.Time != nil { + return *m.Time + } + return 0 +} + +func (m *CgroupInfo_Blkio_CFQ_Statistics) GetIOServiced() []CgroupInfo_Blkio_Value { + if m != nil { + return m.IOServiced + } + return nil +} + +func (m *CgroupInfo_Blkio_CFQ_Statistics) GetIOServiceBytes() []CgroupInfo_Blkio_Value { + if m != nil { + return m.IOServiceBytes + } + return nil +} + +func (m *CgroupInfo_Blkio_CFQ_Statistics) GetIOServiceTime() []CgroupInfo_Blkio_Value { + if m != nil { + return m.IOServiceTime + } + return nil +} + +func (m *CgroupInfo_Blkio_CFQ_Statistics) GetIOWaitTime() []CgroupInfo_Blkio_Value { + if m != nil { + return m.IOWaitTime + } + return nil +} + +func (m *CgroupInfo_Blkio_CFQ_Statistics) GetIOMerged() []CgroupInfo_Blkio_Value { + if m != nil { + return m.IOMerged + } + return nil +} + +func (m *CgroupInfo_Blkio_CFQ_Statistics) GetIOQueued() []CgroupInfo_Blkio_Value { + if m != nil { + return m.IOQueued + } + return nil +} + +type CgroupInfo_Blkio_Throttling struct { +} + +func (m *CgroupInfo_Blkio_Throttling) Reset() { *m = CgroupInfo_Blkio_Throttling{} } +func (*CgroupInfo_Blkio_Throttling) ProtoMessage() {} +func (*CgroupInfo_Blkio_Throttling) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{71, 0, 2} +} + +type CgroupInfo_Blkio_Throttling_Statistics struct { + // Stats are grouped by block devices. If `device` is not + // set, it represents `Total`. + Device *Device_Number `protobuf:"bytes,1,opt,name=device" json:"device,omitempty"` + // blkio.throttle.io_serviced + IOServiced []CgroupInfo_Blkio_Value `protobuf:"bytes,2,rep,name=io_serviced,json=ioServiced" json:"io_serviced"` + // blkio.throttle.io_service_bytes + IOServiceBytes []CgroupInfo_Blkio_Value `protobuf:"bytes,3,rep,name=io_service_bytes,json=ioServiceBytes" json:"io_service_bytes"` +} + +func (m *CgroupInfo_Blkio_Throttling_Statistics) Reset() { + *m = CgroupInfo_Blkio_Throttling_Statistics{} +} +func (*CgroupInfo_Blkio_Throttling_Statistics) ProtoMessage() {} +func (*CgroupInfo_Blkio_Throttling_Statistics) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{71, 0, 2, 0} +} + +func (m *CgroupInfo_Blkio_Throttling_Statistics) GetDevice() *Device_Number { + if m != nil { + return m.Device + } + return nil +} + +func (m *CgroupInfo_Blkio_Throttling_Statistics) GetIOServiced() []CgroupInfo_Blkio_Value { + if m != nil { + return m.IOServiced + } + return nil +} + +func (m *CgroupInfo_Blkio_Throttling_Statistics) GetIOServiceBytes() []CgroupInfo_Blkio_Value { + if m != nil { + return m.IOServiceBytes + } + return nil +} + +type CgroupInfo_Blkio_Statistics struct { + CFQ []CgroupInfo_Blkio_CFQ_Statistics `protobuf:"bytes,1,rep,name=cfq" json:"cfq"` + CFQRecursive []CgroupInfo_Blkio_CFQ_Statistics `protobuf:"bytes,2,rep,name=cfq_recursive,json=cfqRecursive" json:"cfq_recursive"` + Throttling []*CgroupInfo_Blkio_Throttling_Statistics `protobuf:"bytes,3,rep,name=throttling" json:"throttling,omitempty"` +} + +func (m *CgroupInfo_Blkio_Statistics) Reset() { *m = CgroupInfo_Blkio_Statistics{} } +func (*CgroupInfo_Blkio_Statistics) ProtoMessage() {} +func (*CgroupInfo_Blkio_Statistics) Descriptor() ([]byte, []int) { + return fileDescriptorMesos, []int{71, 0, 3} +} + +func (m *CgroupInfo_Blkio_Statistics) GetCFQ() []CgroupInfo_Blkio_CFQ_Statistics { + if m != nil { + return m.CFQ + } + return nil +} + +func (m *CgroupInfo_Blkio_Statistics) GetCFQRecursive() []CgroupInfo_Blkio_CFQ_Statistics { + if m != nil { + return m.CFQRecursive + } + return nil +} + +func (m *CgroupInfo_Blkio_Statistics) GetThrottling() []*CgroupInfo_Blkio_Throttling_Statistics { + if m != nil { + return m.Throttling + } + return nil +} + +// Configuration of a net_cls cgroup subsystem. +type CgroupInfo_NetCls struct { + // The 32-bit classid consists of two parts, a 16 bit major handle + // and a 16-bit minor handle. The major and minor handle are + // represented using the format 0xAAAABBBB, where 0xAAAA is the + // 16-bit major handle and 0xBBBB is the 16-bit minor handle. + ClassID *uint32 `protobuf:"varint,1,opt,name=classid" json:"classid,omitempty"` +} + +func (m *CgroupInfo_NetCls) Reset() { *m = CgroupInfo_NetCls{} } +func (*CgroupInfo_NetCls) ProtoMessage() {} +func (*CgroupInfo_NetCls) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{71, 1} } + +func (m *CgroupInfo_NetCls) GetClassID() uint32 { + if m != nil && m.ClassID != nil { + return *m.ClassID + } + return 0 +} + +// * +// Collection of labels. Labels should not contain duplicate key-value +// pairs. +type Labels struct { + Labels []Label `protobuf:"bytes,1,rep,name=labels" json:"labels"` +} + +func (m *Labels) Reset() { *m = Labels{} } +func (*Labels) ProtoMessage() {} +func (*Labels) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{72} } + +func (m *Labels) GetLabels() []Label { + if m != nil { + return m.Labels + } + return nil +} + +// * +// Key, value pair used to store free form user-data. +type Label struct { + Key string `protobuf:"bytes,1,req,name=key" json:"key"` + Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *Label) Reset() { *m = Label{} } +func (*Label) ProtoMessage() {} +func (*Label) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{73} } + +func (m *Label) GetKey() string { + if m != nil { + return m.Key + } + return "" +} + +func (m *Label) GetValue() string { + if m != nil && m.Value != nil { + return *m.Value + } + return "" +} + +// * +// Named port used for service discovery. +type Port struct { + // Port number on which the framework exposes a service. + Number uint32 `protobuf:"varint,1,req,name=number" json:"number"` + // Name of the service hosted on this port. + Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` + // Layer 4-7 protocol on which the framework exposes its services. + Protocol *string `protobuf:"bytes,3,opt,name=protocol" json:"protocol,omitempty"` + // This field restricts discovery within a framework (FRAMEWORK), + // within a Mesos cluster (CLUSTER), or places no restrictions (EXTERNAL). + // The visibility setting for a Port overrides the general visibility setting + // in the DiscoveryInfo. + Visibility *DiscoveryInfo_Visibility `protobuf:"varint,4,opt,name=visibility,enum=mesos.DiscoveryInfo_Visibility" json:"visibility,omitempty"` + // This can be used to decorate the message with metadata to be + // interpreted by external applications such as firewalls. + Labels *Labels `protobuf:"bytes,5,opt,name=labels" json:"labels,omitempty"` +} + +func (m *Port) Reset() { *m = Port{} } +func (*Port) ProtoMessage() {} +func (*Port) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{74} } + +func (m *Port) GetNumber() uint32 { + if m != nil { + return m.Number + } + return 0 +} + +func (m *Port) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *Port) GetProtocol() string { + if m != nil && m.Protocol != nil { + return *m.Protocol + } + return "" +} + +func (m *Port) GetVisibility() DiscoveryInfo_Visibility { + if m != nil && m.Visibility != nil { + return *m.Visibility + } + return FRAMEWORK +} + +func (m *Port) GetLabels() *Labels { + if m != nil { + return m.Labels + } + return nil +} + +// * +// Collection of ports. +type Ports struct { + Ports []Port `protobuf:"bytes,1,rep,name=ports" json:"ports"` +} + +func (m *Ports) Reset() { *m = Ports{} } +func (*Ports) ProtoMessage() {} +func (*Ports) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{75} } + +func (m *Ports) GetPorts() []Port { + if m != nil { + return m.Ports + } + return nil +} + +// * +// Service discovery information. +// The visibility field restricts discovery within a framework (FRAMEWORK), +// within a Mesos cluster (CLUSTER), or places no restrictions (EXTERNAL). +// Each port in the ports field also has an optional visibility field. +// If visibility is specified for a port, it overrides the default service-wide +// DiscoveryInfo.visibility for that port. +// The environment, location, and version fields provide first class support for +// common attributes used to differentiate between similar services. The +// environment may receive values such as PROD/QA/DEV, the location field may +// receive values like EAST-US/WEST-US/EUROPE/AMEA, and the version field may +// receive values like v2.0/v0.9. The exact use of these fields is up to each +// service discovery system. +type DiscoveryInfo struct { + Visibility DiscoveryInfo_Visibility `protobuf:"varint,1,req,name=visibility,enum=mesos.DiscoveryInfo_Visibility" json:"visibility"` + Name *string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"` + Environment *string `protobuf:"bytes,3,opt,name=environment" json:"environment,omitempty"` + Location *string `protobuf:"bytes,4,opt,name=location" json:"location,omitempty"` + Version *string `protobuf:"bytes,5,opt,name=version" json:"version,omitempty"` + Ports *Ports `protobuf:"bytes,6,opt,name=ports" json:"ports,omitempty"` + Labels *Labels `protobuf:"bytes,7,opt,name=labels" json:"labels,omitempty"` +} + +func (m *DiscoveryInfo) Reset() { *m = DiscoveryInfo{} } +func (*DiscoveryInfo) ProtoMessage() {} +func (*DiscoveryInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{76} } + +func (m *DiscoveryInfo) GetVisibility() DiscoveryInfo_Visibility { + if m != nil { + return m.Visibility + } + return FRAMEWORK +} + +func (m *DiscoveryInfo) GetName() string { + if m != nil && m.Name != nil { + return *m.Name + } + return "" +} + +func (m *DiscoveryInfo) GetEnvironment() string { + if m != nil && m.Environment != nil { + return *m.Environment + } + return "" +} + +func (m *DiscoveryInfo) GetLocation() string { + if m != nil && m.Location != nil { + return *m.Location + } + return "" +} + +func (m *DiscoveryInfo) GetVersion() string { + if m != nil && m.Version != nil { + return *m.Version + } + return "" +} + +func (m *DiscoveryInfo) GetPorts() *Ports { + if m != nil { + return m.Ports + } + return nil +} + +func (m *DiscoveryInfo) GetLabels() *Labels { + if m != nil { + return m.Labels + } + return nil +} + +// * +// Named WeightInfo to indicate resource allocation +// priority between the different roles. +type WeightInfo struct { + Weight float64 `protobuf:"fixed64,1,req,name=weight" json:"weight"` + // Related role name. + Role *string `protobuf:"bytes,2,opt,name=role" json:"role,omitempty"` +} + +func (m *WeightInfo) Reset() { *m = WeightInfo{} } +func (*WeightInfo) ProtoMessage() {} +func (*WeightInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{77} } + +func (m *WeightInfo) GetWeight() float64 { + if m != nil { + return m.Weight + } + return 0 +} + +func (m *WeightInfo) GetRole() string { + if m != nil && m.Role != nil { + return *m.Role + } + return "" +} + +// * +// Version information of a component. +type VersionInfo struct { + Version string `protobuf:"bytes,1,req,name=version" json:"version"` + BuildDate *string `protobuf:"bytes,2,opt,name=build_date,json=buildDate" json:"build_date,omitempty"` + BuildTime *float64 `protobuf:"fixed64,3,opt,name=build_time,json=buildTime" json:"build_time,omitempty"` + BuildUser *string `protobuf:"bytes,4,opt,name=build_user,json=buildUser" json:"build_user,omitempty"` + GitSHA *string `protobuf:"bytes,5,opt,name=git_sha,json=gitSha" json:"git_sha,omitempty"` + GitBranch *string `protobuf:"bytes,6,opt,name=git_branch,json=gitBranch" json:"git_branch,omitempty"` + GitTag *string `protobuf:"bytes,7,opt,name=git_tag,json=gitTag" json:"git_tag,omitempty"` +} + +func (m *VersionInfo) Reset() { *m = VersionInfo{} } +func (*VersionInfo) ProtoMessage() {} +func (*VersionInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{78} } + +func (m *VersionInfo) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *VersionInfo) GetBuildDate() string { + if m != nil && m.BuildDate != nil { + return *m.BuildDate + } + return "" +} + +func (m *VersionInfo) GetBuildTime() float64 { + if m != nil && m.BuildTime != nil { + return *m.BuildTime + } + return 0 +} + +func (m *VersionInfo) GetBuildUser() string { + if m != nil && m.BuildUser != nil { + return *m.BuildUser + } + return "" +} + +func (m *VersionInfo) GetGitSHA() string { + if m != nil && m.GitSHA != nil { + return *m.GitSHA + } + return "" +} + +func (m *VersionInfo) GetGitBranch() string { + if m != nil && m.GitBranch != nil { + return *m.GitBranch + } + return "" +} + +func (m *VersionInfo) GetGitTag() string { + if m != nil && m.GitTag != nil { + return *m.GitTag + } + return "" +} + +// * +// Flag consists of a name and optionally its value. +type Flag struct { + Name string `protobuf:"bytes,1,req,name=name" json:"name"` + Value *string `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"` +} + +func (m *Flag) Reset() { *m = Flag{} } +func (*Flag) ProtoMessage() {} +func (*Flag) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{79} } + +func (m *Flag) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Flag) GetValue() string { + if m != nil && m.Value != nil { + return *m.Value + } + return "" +} + +// * +// Describes a Role. Roles can be used to specify that certain resources are +// reserved for the use of one or more frameworks. +type Role struct { + Name string `protobuf:"bytes,1,req,name=name" json:"name"` + Weight float64 `protobuf:"fixed64,2,req,name=weight" json:"weight"` + Frameworks []FrameworkID `protobuf:"bytes,3,rep,name=frameworks" json:"frameworks"` + Resources []Resource `protobuf:"bytes,4,rep,name=resources" json:"resources"` +} + +func (m *Role) Reset() { *m = Role{} } +func (*Role) ProtoMessage() {} +func (*Role) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{80} } + +func (m *Role) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Role) GetWeight() float64 { + if m != nil { + return m.Weight + } + return 0 +} + +func (m *Role) GetFrameworks() []FrameworkID { + if m != nil { + return m.Frameworks + } + return nil +} + +func (m *Role) GetResources() []Resource { + if m != nil { + return m.Resources + } + return nil +} + +// * +// Metric consists of a name and optionally its value. +type Metric struct { + Name string `protobuf:"bytes,1,req,name=name" json:"name"` + Value *float64 `protobuf:"fixed64,2,opt,name=value" json:"value,omitempty"` +} + +func (m *Metric) Reset() { *m = Metric{} } +func (*Metric) ProtoMessage() {} +func (*Metric) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{81} } + +func (m *Metric) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *Metric) GetValue() float64 { + if m != nil && m.Value != nil { + return *m.Value + } + return 0 +} + +// * +// Describes a File. +type FileInfo struct { + // Absolute path to the file. + Path string `protobuf:"bytes,1,req,name=path" json:"path"` + // Number of hard links. + Nlink *int32 `protobuf:"varint,2,opt,name=nlink" json:"nlink,omitempty"` + // Total size in bytes. + Size *uint64 `protobuf:"varint,3,opt,name=size" json:"size,omitempty"` + // Last modification time. + Mtime *TimeInfo `protobuf:"bytes,4,opt,name=mtime" json:"mtime,omitempty"` + // Represents a file's mode and permission bits. The bits have the same + // definition on all systems and is portable. + Mode *uint32 `protobuf:"varint,5,opt,name=mode" json:"mode,omitempty"` + // User ID of owner. + UID *string `protobuf:"bytes,6,opt,name=uid" json:"uid,omitempty"` + // Group ID of owner. + GID *string `protobuf:"bytes,7,opt,name=gid" json:"gid,omitempty"` +} + +func (m *FileInfo) Reset() { *m = FileInfo{} } +func (*FileInfo) ProtoMessage() {} +func (*FileInfo) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{82} } + +func (m *FileInfo) GetPath() string { + if m != nil { + return m.Path + } + return "" +} + +func (m *FileInfo) GetNlink() int32 { + if m != nil && m.Nlink != nil { + return *m.Nlink + } + return 0 +} + +func (m *FileInfo) GetSize() uint64 { + if m != nil && m.Size != nil { + return *m.Size + } + return 0 +} + +func (m *FileInfo) GetMtime() *TimeInfo { + if m != nil { + return m.Mtime + } + return nil +} + +func (m *FileInfo) GetMode() uint32 { + if m != nil && m.Mode != nil { + return *m.Mode + } + return 0 +} + +func (m *FileInfo) GetUID() string { + if m != nil && m.UID != nil { + return *m.UID + } + return "" +} + +func (m *FileInfo) GetGID() string { + if m != nil && m.GID != nil { + return *m.GID + } + return "" +} + +// * +// Describes information abount a device. +type Device struct { + Path *string `protobuf:"bytes,1,opt,name=path" json:"path,omitempty"` + Number *Device_Number `protobuf:"bytes,2,opt,name=number" json:"number,omitempty"` +} + +func (m *Device) Reset() { *m = Device{} } +func (*Device) ProtoMessage() {} +func (*Device) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{83} } + +func (m *Device) GetPath() string { + if m != nil && m.Path != nil { + return *m.Path + } + return "" +} + +func (m *Device) GetNumber() *Device_Number { + if m != nil { + return m.Number + } + return nil +} + +type Device_Number struct { + MajorNumber *uint64 `protobuf:"varint,1,req,name=major_number,json=majorNumber" json:"major_number,omitempty"` + MinorNumber *uint64 `protobuf:"varint,2,req,name=minor_number,json=minorNumber" json:"minor_number,omitempty"` +} + +func (m *Device_Number) Reset() { *m = Device_Number{} } +func (*Device_Number) ProtoMessage() {} +func (*Device_Number) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{83, 0} } + +func (m *Device_Number) GetMajorNumber() uint64 { + if m != nil && m.MajorNumber != nil { + return *m.MajorNumber + } + return 0 +} + +func (m *Device_Number) GetMinorNumber() uint64 { + if m != nil && m.MinorNumber != nil { + return *m.MinorNumber + } + return 0 +} + +// * +// Describes a device whitelist entry that expose from host to container. +type DeviceAccess struct { + Device Device `protobuf:"bytes,1,req,name=device" json:"device"` + Access DeviceAccess_Access `protobuf:"bytes,2,req,name=access" json:"access"` +} + +func (m *DeviceAccess) Reset() { *m = DeviceAccess{} } +func (*DeviceAccess) ProtoMessage() {} +func (*DeviceAccess) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{84} } + +func (m *DeviceAccess) GetDevice() Device { + if m != nil { + return m.Device + } + return Device{} +} + +func (m *DeviceAccess) GetAccess() DeviceAccess_Access { + if m != nil { + return m.Access + } + return DeviceAccess_Access{} +} + +type DeviceAccess_Access struct { + Read *bool `protobuf:"varint,1,opt,name=read" json:"read,omitempty"` + Write *bool `protobuf:"varint,2,opt,name=write" json:"write,omitempty"` + Mknod *bool `protobuf:"varint,3,opt,name=mknod" json:"mknod,omitempty"` +} + +func (m *DeviceAccess_Access) Reset() { *m = DeviceAccess_Access{} } +func (*DeviceAccess_Access) ProtoMessage() {} +func (*DeviceAccess_Access) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{84, 0} } + +func (m *DeviceAccess_Access) GetRead() bool { + if m != nil && m.Read != nil { + return *m.Read + } + return false +} + +func (m *DeviceAccess_Access) GetWrite() bool { + if m != nil && m.Write != nil { + return *m.Write + } + return false +} + +func (m *DeviceAccess_Access) GetMknod() bool { + if m != nil && m.Mknod != nil { + return *m.Mknod + } + return false +} + +type DeviceWhitelist struct { + AllowedDevices []DeviceAccess `protobuf:"bytes,1,rep,name=allowed_devices,json=allowedDevices" json:"allowed_devices"` +} + +func (m *DeviceWhitelist) Reset() { *m = DeviceWhitelist{} } +func (*DeviceWhitelist) ProtoMessage() {} +func (*DeviceWhitelist) Descriptor() ([]byte, []int) { return fileDescriptorMesos, []int{85} } + +func (m *DeviceWhitelist) GetAllowedDevices() []DeviceAccess { + if m != nil { + return m.AllowedDevices + } + return nil +} + +func init() { + proto.RegisterType((*FrameworkID)(nil), "mesos.FrameworkID") + proto.RegisterType((*OfferID)(nil), "mesos.OfferID") + proto.RegisterType((*AgentID)(nil), "mesos.AgentID") + proto.RegisterType((*TaskID)(nil), "mesos.TaskID") + proto.RegisterType((*ExecutorID)(nil), "mesos.ExecutorID") + proto.RegisterType((*ContainerID)(nil), "mesos.ContainerID") + proto.RegisterType((*ResourceProviderID)(nil), "mesos.ResourceProviderID") + proto.RegisterType((*OperationID)(nil), "mesos.OperationID") + proto.RegisterType((*TimeInfo)(nil), "mesos.TimeInfo") + proto.RegisterType((*DurationInfo)(nil), "mesos.DurationInfo") + proto.RegisterType((*Address)(nil), "mesos.Address") + proto.RegisterType((*URL)(nil), "mesos.URL") + proto.RegisterType((*Unavailability)(nil), "mesos.Unavailability") + proto.RegisterType((*MachineID)(nil), "mesos.MachineID") + proto.RegisterType((*MachineInfo)(nil), "mesos.MachineInfo") + proto.RegisterType((*FrameworkInfo)(nil), "mesos.FrameworkInfo") + proto.RegisterType((*FrameworkInfo_Capability)(nil), "mesos.FrameworkInfo.Capability") + proto.RegisterType((*CheckInfo)(nil), "mesos.CheckInfo") + proto.RegisterType((*CheckInfo_Command)(nil), "mesos.CheckInfo.Command") + proto.RegisterType((*CheckInfo_Http)(nil), "mesos.CheckInfo.Http") + proto.RegisterType((*CheckInfo_Tcp)(nil), "mesos.CheckInfo.Tcp") + proto.RegisterType((*HealthCheck)(nil), "mesos.HealthCheck") + proto.RegisterType((*HealthCheck_HTTPCheckInfo)(nil), "mesos.HealthCheck.HTTPCheckInfo") + proto.RegisterType((*HealthCheck_TCPCheckInfo)(nil), "mesos.HealthCheck.TCPCheckInfo") + proto.RegisterType((*KillPolicy)(nil), "mesos.KillPolicy") + proto.RegisterType((*CommandInfo)(nil), "mesos.CommandInfo") + proto.RegisterType((*CommandInfo_URI)(nil), "mesos.CommandInfo.URI") + proto.RegisterType((*ExecutorInfo)(nil), "mesos.ExecutorInfo") + proto.RegisterType((*DomainInfo)(nil), "mesos.DomainInfo") + proto.RegisterType((*DomainInfo_FaultDomain)(nil), "mesos.DomainInfo.FaultDomain") + proto.RegisterType((*DomainInfo_FaultDomain_RegionInfo)(nil), "mesos.DomainInfo.FaultDomain.RegionInfo") + proto.RegisterType((*DomainInfo_FaultDomain_ZoneInfo)(nil), "mesos.DomainInfo.FaultDomain.ZoneInfo") + proto.RegisterType((*MasterInfo)(nil), "mesos.MasterInfo") + proto.RegisterType((*MasterInfo_Capability)(nil), "mesos.MasterInfo.Capability") + proto.RegisterType((*AgentInfo)(nil), "mesos.AgentInfo") + proto.RegisterType((*AgentInfo_Capability)(nil), "mesos.AgentInfo.Capability") + proto.RegisterType((*CSIPluginContainerInfo)(nil), "mesos.CSIPluginContainerInfo") + proto.RegisterType((*CSIPluginInfo)(nil), "mesos.CSIPluginInfo") + proto.RegisterType((*ResourceProviderInfo)(nil), "mesos.ResourceProviderInfo") + proto.RegisterType((*ResourceProviderInfo_Storage)(nil), "mesos.ResourceProviderInfo.Storage") + proto.RegisterType((*Value)(nil), "mesos.Value") + proto.RegisterType((*Value_Scalar)(nil), "mesos.Value.Scalar") + proto.RegisterType((*Value_Range)(nil), "mesos.Value.Range") + proto.RegisterType((*Value_Ranges)(nil), "mesos.Value.Ranges") + proto.RegisterType((*Value_Set)(nil), "mesos.Value.Set") + proto.RegisterType((*Value_Text)(nil), "mesos.Value.Text") + proto.RegisterType((*Attribute)(nil), "mesos.Attribute") + proto.RegisterType((*Resource)(nil), "mesos.Resource") + proto.RegisterType((*Resource_AllocationInfo)(nil), "mesos.Resource.AllocationInfo") + proto.RegisterType((*Resource_ReservationInfo)(nil), "mesos.Resource.ReservationInfo") + proto.RegisterType((*Resource_DiskInfo)(nil), "mesos.Resource.DiskInfo") + proto.RegisterType((*Resource_DiskInfo_Persistence)(nil), "mesos.Resource.DiskInfo.Persistence") + proto.RegisterType((*Resource_DiskInfo_Source)(nil), "mesos.Resource.DiskInfo.Source") + proto.RegisterType((*Resource_DiskInfo_Source_Path)(nil), "mesos.Resource.DiskInfo.Source.Path") + proto.RegisterType((*Resource_DiskInfo_Source_Mount)(nil), "mesos.Resource.DiskInfo.Source.Mount") + proto.RegisterType((*Resource_RevocableInfo)(nil), "mesos.Resource.RevocableInfo") + proto.RegisterType((*Resource_SharedInfo)(nil), "mesos.Resource.SharedInfo") + proto.RegisterType((*TrafficControlStatistics)(nil), "mesos.TrafficControlStatistics") + proto.RegisterType((*IpStatistics)(nil), "mesos.IpStatistics") + proto.RegisterType((*IcmpStatistics)(nil), "mesos.IcmpStatistics") + proto.RegisterType((*TcpStatistics)(nil), "mesos.TcpStatistics") + proto.RegisterType((*UdpStatistics)(nil), "mesos.UdpStatistics") + proto.RegisterType((*SNMPStatistics)(nil), "mesos.SNMPStatistics") + proto.RegisterType((*DiskStatistics)(nil), "mesos.DiskStatistics") + proto.RegisterType((*ResourceStatistics)(nil), "mesos.ResourceStatistics") + proto.RegisterType((*ResourceUsage)(nil), "mesos.ResourceUsage") + proto.RegisterType((*ResourceUsage_Executor)(nil), "mesos.ResourceUsage.Executor") + proto.RegisterType((*ResourceUsage_Executor_Task)(nil), "mesos.ResourceUsage.Executor.Task") + proto.RegisterType((*PerfStatistics)(nil), "mesos.PerfStatistics") + proto.RegisterType((*Request)(nil), "mesos.Request") + proto.RegisterType((*Offer)(nil), "mesos.Offer") + proto.RegisterType((*Offer_Operation)(nil), "mesos.Offer.Operation") + proto.RegisterType((*Offer_Operation_Launch)(nil), "mesos.Offer.Operation.Launch") + proto.RegisterType((*Offer_Operation_LaunchGroup)(nil), "mesos.Offer.Operation.LaunchGroup") + proto.RegisterType((*Offer_Operation_Reserve)(nil), "mesos.Offer.Operation.Reserve") + proto.RegisterType((*Offer_Operation_Unreserve)(nil), "mesos.Offer.Operation.Unreserve") + proto.RegisterType((*Offer_Operation_Create)(nil), "mesos.Offer.Operation.Create") + proto.RegisterType((*Offer_Operation_Destroy)(nil), "mesos.Offer.Operation.Destroy") + proto.RegisterType((*Offer_Operation_CreateVolume)(nil), "mesos.Offer.Operation.CreateVolume") + proto.RegisterType((*Offer_Operation_DestroyVolume)(nil), "mesos.Offer.Operation.DestroyVolume") + proto.RegisterType((*Offer_Operation_CreateBlock)(nil), "mesos.Offer.Operation.CreateBlock") + proto.RegisterType((*Offer_Operation_DestroyBlock)(nil), "mesos.Offer.Operation.DestroyBlock") + proto.RegisterType((*InverseOffer)(nil), "mesos.InverseOffer") + proto.RegisterType((*TaskInfo)(nil), "mesos.TaskInfo") + proto.RegisterType((*TaskGroupInfo)(nil), "mesos.TaskGroupInfo") + proto.RegisterType((*Task)(nil), "mesos.Task") + proto.RegisterType((*TaskResourceLimitation)(nil), "mesos.TaskResourceLimitation") + proto.RegisterType((*UUID)(nil), "mesos.UUID") + proto.RegisterType((*Operation)(nil), "mesos.Operation") + proto.RegisterType((*OperationStatus)(nil), "mesos.OperationStatus") + proto.RegisterType((*CheckStatusInfo)(nil), "mesos.CheckStatusInfo") + proto.RegisterType((*CheckStatusInfo_Command)(nil), "mesos.CheckStatusInfo.Command") + proto.RegisterType((*CheckStatusInfo_Http)(nil), "mesos.CheckStatusInfo.Http") + proto.RegisterType((*CheckStatusInfo_Tcp)(nil), "mesos.CheckStatusInfo.Tcp") + proto.RegisterType((*TaskStatus)(nil), "mesos.TaskStatus") + proto.RegisterType((*Filters)(nil), "mesos.Filters") + proto.RegisterType((*Environment)(nil), "mesos.Environment") + proto.RegisterType((*Environment_Variable)(nil), "mesos.Environment.Variable") + proto.RegisterType((*Parameter)(nil), "mesos.Parameter") + proto.RegisterType((*Parameters)(nil), "mesos.Parameters") + proto.RegisterType((*Credential)(nil), "mesos.Credential") + proto.RegisterType((*Credentials)(nil), "mesos.Credentials") + proto.RegisterType((*Secret)(nil), "mesos.Secret") + proto.RegisterType((*Secret_Reference)(nil), "mesos.Secret.Reference") + proto.RegisterType((*Secret_Value)(nil), "mesos.Secret.Value") + proto.RegisterType((*RateLimit)(nil), "mesos.RateLimit") + proto.RegisterType((*RateLimits)(nil), "mesos.RateLimits") + proto.RegisterType((*Image)(nil), "mesos.Image") + proto.RegisterType((*Image_Appc)(nil), "mesos.Image.Appc") + proto.RegisterType((*Image_Docker)(nil), "mesos.Image.Docker") + proto.RegisterType((*MountPropagation)(nil), "mesos.MountPropagation") + proto.RegisterType((*Volume)(nil), "mesos.Volume") + proto.RegisterType((*Volume_Source)(nil), "mesos.Volume.Source") + proto.RegisterType((*Volume_Source_DockerVolume)(nil), "mesos.Volume.Source.DockerVolume") + proto.RegisterType((*Volume_Source_HostPath)(nil), "mesos.Volume.Source.HostPath") + proto.RegisterType((*Volume_Source_SandboxPath)(nil), "mesos.Volume.Source.SandboxPath") + proto.RegisterType((*NetworkInfo)(nil), "mesos.NetworkInfo") + proto.RegisterType((*NetworkInfo_IPAddress)(nil), "mesos.NetworkInfo.IPAddress") + proto.RegisterType((*NetworkInfo_PortMapping)(nil), "mesos.NetworkInfo.PortMapping") + proto.RegisterType((*CapabilityInfo)(nil), "mesos.CapabilityInfo") + proto.RegisterType((*LinuxInfo)(nil), "mesos.LinuxInfo") + proto.RegisterType((*RLimitInfo)(nil), "mesos.RLimitInfo") + proto.RegisterType((*RLimitInfo_RLimit)(nil), "mesos.RLimitInfo.RLimit") + proto.RegisterType((*TTYInfo)(nil), "mesos.TTYInfo") + proto.RegisterType((*TTYInfo_WindowSize)(nil), "mesos.TTYInfo.WindowSize") + proto.RegisterType((*ContainerInfo)(nil), "mesos.ContainerInfo") + proto.RegisterType((*ContainerInfo_DockerInfo)(nil), "mesos.ContainerInfo.DockerInfo") + proto.RegisterType((*ContainerInfo_DockerInfo_PortMapping)(nil), "mesos.ContainerInfo.DockerInfo.PortMapping") + proto.RegisterType((*ContainerInfo_MesosInfo)(nil), "mesos.ContainerInfo.MesosInfo") + proto.RegisterType((*ContainerStatus)(nil), "mesos.ContainerStatus") + proto.RegisterType((*CgroupInfo)(nil), "mesos.CgroupInfo") + proto.RegisterType((*CgroupInfo_Blkio)(nil), "mesos.CgroupInfo.Blkio") + proto.RegisterType((*CgroupInfo_Blkio_Value)(nil), "mesos.CgroupInfo.Blkio.Value") + proto.RegisterType((*CgroupInfo_Blkio_CFQ)(nil), "mesos.CgroupInfo.Blkio.CFQ") + proto.RegisterType((*CgroupInfo_Blkio_CFQ_Statistics)(nil), "mesos.CgroupInfo.Blkio.CFQ.Statistics") + proto.RegisterType((*CgroupInfo_Blkio_Throttling)(nil), "mesos.CgroupInfo.Blkio.Throttling") + proto.RegisterType((*CgroupInfo_Blkio_Throttling_Statistics)(nil), "mesos.CgroupInfo.Blkio.Throttling.Statistics") + proto.RegisterType((*CgroupInfo_Blkio_Statistics)(nil), "mesos.CgroupInfo.Blkio.Statistics") + proto.RegisterType((*CgroupInfo_NetCls)(nil), "mesos.CgroupInfo.NetCls") + proto.RegisterType((*Labels)(nil), "mesos.Labels") + proto.RegisterType((*Label)(nil), "mesos.Label") + proto.RegisterType((*Port)(nil), "mesos.Port") + proto.RegisterType((*Ports)(nil), "mesos.Ports") + proto.RegisterType((*DiscoveryInfo)(nil), "mesos.DiscoveryInfo") + proto.RegisterType((*WeightInfo)(nil), "mesos.WeightInfo") + proto.RegisterType((*VersionInfo)(nil), "mesos.VersionInfo") + proto.RegisterType((*Flag)(nil), "mesos.Flag") + proto.RegisterType((*Role)(nil), "mesos.Role") + proto.RegisterType((*Metric)(nil), "mesos.Metric") + proto.RegisterType((*FileInfo)(nil), "mesos.FileInfo") + proto.RegisterType((*Device)(nil), "mesos.Device") + proto.RegisterType((*Device_Number)(nil), "mesos.Device.Number") + proto.RegisterType((*DeviceAccess)(nil), "mesos.DeviceAccess") + proto.RegisterType((*DeviceAccess_Access)(nil), "mesos.DeviceAccess.Access") + proto.RegisterType((*DeviceWhitelist)(nil), "mesos.DeviceWhitelist") + proto.RegisterEnum("mesos.Status", Status_name, Status_value) + proto.RegisterEnum("mesos.TaskState", TaskState_name, TaskState_value) + proto.RegisterEnum("mesos.OperationState", OperationState_name, OperationState_value) + proto.RegisterEnum("mesos.MachineInfo_Mode", MachineInfo_Mode_name, MachineInfo_Mode_value) + proto.RegisterEnum("mesos.FrameworkInfo_Capability_Type", FrameworkInfo_Capability_Type_name, FrameworkInfo_Capability_Type_value) + proto.RegisterEnum("mesos.CheckInfo_Type", CheckInfo_Type_name, CheckInfo_Type_value) + proto.RegisterEnum("mesos.HealthCheck_Type", HealthCheck_Type_name, HealthCheck_Type_value) + proto.RegisterEnum("mesos.ExecutorInfo_Type", ExecutorInfo_Type_name, ExecutorInfo_Type_value) + proto.RegisterEnum("mesos.MasterInfo_Capability_Type", MasterInfo_Capability_Type_name, MasterInfo_Capability_Type_value) + proto.RegisterEnum("mesos.AgentInfo_Capability_Type", AgentInfo_Capability_Type_name, AgentInfo_Capability_Type_value) + proto.RegisterEnum("mesos.CSIPluginContainerInfo_Service", CSIPluginContainerInfo_Service_name, CSIPluginContainerInfo_Service_value) + proto.RegisterEnum("mesos.Value_Type", Value_Type_name, Value_Type_value) + proto.RegisterEnum("mesos.Resource_ReservationInfo_Type", Resource_ReservationInfo_Type_name, Resource_ReservationInfo_Type_value) + proto.RegisterEnum("mesos.Resource_DiskInfo_Source_Type", Resource_DiskInfo_Source_Type_name, Resource_DiskInfo_Source_Type_value) + proto.RegisterEnum("mesos.Offer_Operation_Type", Offer_Operation_Type_name, Offer_Operation_Type_value) + proto.RegisterEnum("mesos.TaskStatus_Source", TaskStatus_Source_name, TaskStatus_Source_value) + proto.RegisterEnum("mesos.TaskStatus_Reason", TaskStatus_Reason_name, TaskStatus_Reason_value) + proto.RegisterEnum("mesos.Environment_Variable_Type", Environment_Variable_Type_name, Environment_Variable_Type_value) + proto.RegisterEnum("mesos.Secret_Type", Secret_Type_name, Secret_Type_value) + proto.RegisterEnum("mesos.Image_Type", Image_Type_name, Image_Type_value) + proto.RegisterEnum("mesos.MountPropagation_Mode", MountPropagation_Mode_name, MountPropagation_Mode_value) + proto.RegisterEnum("mesos.Volume_Mode", Volume_Mode_name, Volume_Mode_value) + proto.RegisterEnum("mesos.Volume_Source_Type", Volume_Source_Type_name, Volume_Source_Type_value) + proto.RegisterEnum("mesos.Volume_Source_SandboxPath_Type", Volume_Source_SandboxPath_Type_name, Volume_Source_SandboxPath_Type_value) + proto.RegisterEnum("mesos.NetworkInfo_Protocol", NetworkInfo_Protocol_name, NetworkInfo_Protocol_value) + proto.RegisterEnum("mesos.CapabilityInfo_Capability", CapabilityInfo_Capability_name, CapabilityInfo_Capability_value) + proto.RegisterEnum("mesos.RLimitInfo_RLimit_Type", RLimitInfo_RLimit_Type_name, RLimitInfo_RLimit_Type_value) + proto.RegisterEnum("mesos.ContainerInfo_Type", ContainerInfo_Type_name, ContainerInfo_Type_value) + proto.RegisterEnum("mesos.ContainerInfo_DockerInfo_Network", ContainerInfo_DockerInfo_Network_name, ContainerInfo_DockerInfo_Network_value) + proto.RegisterEnum("mesos.CgroupInfo_Blkio_Operation", CgroupInfo_Blkio_Operation_name, CgroupInfo_Blkio_Operation_value) + proto.RegisterEnum("mesos.DiscoveryInfo_Visibility", DiscoveryInfo_Visibility_name, DiscoveryInfo_Visibility_value) +} +func (x Status) String() string { + s, ok := Status_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x TaskState) String() string { + s, ok := TaskState_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x OperationState) String() string { + s, ok := OperationState_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x MachineInfo_Mode) String() string { + s, ok := MachineInfo_Mode_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x FrameworkInfo_Capability_Type) String() string { + s, ok := FrameworkInfo_Capability_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x CheckInfo_Type) String() string { + s, ok := CheckInfo_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x HealthCheck_Type) String() string { + s, ok := HealthCheck_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x ExecutorInfo_Type) String() string { + s, ok := ExecutorInfo_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x MasterInfo_Capability_Type) String() string { + s, ok := MasterInfo_Capability_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x AgentInfo_Capability_Type) String() string { + s, ok := AgentInfo_Capability_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x CSIPluginContainerInfo_Service) String() string { + s, ok := CSIPluginContainerInfo_Service_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Value_Type) String() string { + s, ok := Value_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Resource_ReservationInfo_Type) String() string { + s, ok := Resource_ReservationInfo_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Resource_DiskInfo_Source_Type) String() string { + s, ok := Resource_DiskInfo_Source_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Offer_Operation_Type) String() string { + s, ok := Offer_Operation_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x TaskStatus_Source) String() string { + s, ok := TaskStatus_Source_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x TaskStatus_Reason) String() string { + s, ok := TaskStatus_Reason_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Environment_Variable_Type) String() string { + s, ok := Environment_Variable_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Secret_Type) String() string { + s, ok := Secret_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Image_Type) String() string { + s, ok := Image_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x MountPropagation_Mode) String() string { + s, ok := MountPropagation_Mode_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Volume_Mode) String() string { + s, ok := Volume_Mode_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Volume_Source_Type) String() string { + s, ok := Volume_Source_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x Volume_Source_SandboxPath_Type) String() string { + s, ok := Volume_Source_SandboxPath_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x NetworkInfo_Protocol) String() string { + s, ok := NetworkInfo_Protocol_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x CapabilityInfo_Capability) String() string { + s, ok := CapabilityInfo_Capability_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x RLimitInfo_RLimit_Type) String() string { + s, ok := RLimitInfo_RLimit_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x ContainerInfo_Type) String() string { + s, ok := ContainerInfo_Type_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x ContainerInfo_DockerInfo_Network) String() string { + s, ok := ContainerInfo_DockerInfo_Network_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x CgroupInfo_Blkio_Operation) String() string { + s, ok := CgroupInfo_Blkio_Operation_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (x DiscoveryInfo_Visibility) String() string { + s, ok := DiscoveryInfo_Visibility_name[int32(x)] + if ok { + return s + } + return strconv.Itoa(int(x)) +} +func (this *FrameworkID) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FrameworkID) + if !ok { + that2, ok := that.(FrameworkID) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FrameworkID") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FrameworkID but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FrameworkID but is not nil && this == nil") + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + return nil +} +func (this *FrameworkID) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*FrameworkID) + if !ok { + that2, ok := that.(FrameworkID) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + return true +} +func (this *OfferID) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OfferID) + if !ok { + that2, ok := that.(OfferID) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OfferID") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OfferID but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OfferID but is not nil && this == nil") + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + return nil +} +func (this *OfferID) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OfferID) + if !ok { + that2, ok := that.(OfferID) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + return true +} +func (this *AgentID) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AgentID) + if !ok { + that2, ok := that.(AgentID) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AgentID") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AgentID but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AgentID but is not nil && this == nil") + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + return nil +} +func (this *AgentID) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AgentID) + if !ok { + that2, ok := that.(AgentID) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + return true +} +func (this *TaskID) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TaskID) + if !ok { + that2, ok := that.(TaskID) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TaskID") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TaskID but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TaskID but is not nil && this == nil") + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + return nil +} +func (this *TaskID) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TaskID) + if !ok { + that2, ok := that.(TaskID) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + return true +} +func (this *ExecutorID) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ExecutorID) + if !ok { + that2, ok := that.(ExecutorID) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ExecutorID") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ExecutorID but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ExecutorID but is not nil && this == nil") + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + return nil +} +func (this *ExecutorID) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ExecutorID) + if !ok { + that2, ok := that.(ExecutorID) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + return true +} +func (this *ContainerID) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainerID) + if !ok { + that2, ok := that.(ContainerID) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainerID") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainerID but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainerID but is not nil && this == nil") + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !this.Parent.Equal(that1.Parent) { + return fmt.Errorf("Parent this(%v) Not Equal that(%v)", this.Parent, that1.Parent) + } + return nil +} +func (this *ContainerID) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ContainerID) + if !ok { + that2, ok := that.(ContainerID) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if !this.Parent.Equal(that1.Parent) { + return false + } + return true +} +func (this *ResourceProviderID) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ResourceProviderID) + if !ok { + that2, ok := that.(ResourceProviderID) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ResourceProviderID") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ResourceProviderID but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ResourceProviderID but is not nil && this == nil") + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + return nil +} +func (this *ResourceProviderID) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ResourceProviderID) + if !ok { + that2, ok := that.(ResourceProviderID) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + return true +} +func (this *OperationID) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OperationID) + if !ok { + that2, ok := that.(OperationID) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OperationID") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OperationID but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OperationID but is not nil && this == nil") + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + return nil +} +func (this *OperationID) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OperationID) + if !ok { + that2, ok := that.(OperationID) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + return true +} +func (this *TimeInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TimeInfo) + if !ok { + that2, ok := that.(TimeInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TimeInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TimeInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TimeInfo but is not nil && this == nil") + } + if this.Nanoseconds != that1.Nanoseconds { + return fmt.Errorf("Nanoseconds this(%v) Not Equal that(%v)", this.Nanoseconds, that1.Nanoseconds) + } + return nil +} +func (this *TimeInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TimeInfo) + if !ok { + that2, ok := that.(TimeInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Nanoseconds != that1.Nanoseconds { + return false + } + return true +} +func (this *DurationInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DurationInfo) + if !ok { + that2, ok := that.(DurationInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DurationInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DurationInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DurationInfo but is not nil && this == nil") + } + if this.Nanoseconds != that1.Nanoseconds { + return fmt.Errorf("Nanoseconds this(%v) Not Equal that(%v)", this.Nanoseconds, that1.Nanoseconds) + } + return nil +} +func (this *DurationInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DurationInfo) + if !ok { + that2, ok := that.(DurationInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Nanoseconds != that1.Nanoseconds { + return false + } + return true +} +func (this *Address) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Address) + if !ok { + that2, ok := that.(Address) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Address") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Address but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Address but is not nil && this == nil") + } + if this.Hostname != nil && that1.Hostname != nil { + if *this.Hostname != *that1.Hostname { + return fmt.Errorf("Hostname this(%v) Not Equal that(%v)", *this.Hostname, *that1.Hostname) + } + } else if this.Hostname != nil { + return fmt.Errorf("this.Hostname == nil && that.Hostname != nil") + } else if that1.Hostname != nil { + return fmt.Errorf("Hostname this(%v) Not Equal that(%v)", this.Hostname, that1.Hostname) + } + if this.IP != nil && that1.IP != nil { + if *this.IP != *that1.IP { + return fmt.Errorf("IP this(%v) Not Equal that(%v)", *this.IP, *that1.IP) + } + } else if this.IP != nil { + return fmt.Errorf("this.IP == nil && that.IP != nil") + } else if that1.IP != nil { + return fmt.Errorf("IP this(%v) Not Equal that(%v)", this.IP, that1.IP) + } + if this.Port != that1.Port { + return fmt.Errorf("Port this(%v) Not Equal that(%v)", this.Port, that1.Port) + } + return nil +} +func (this *Address) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Address) + if !ok { + that2, ok := that.(Address) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Hostname != nil && that1.Hostname != nil { + if *this.Hostname != *that1.Hostname { + return false + } + } else if this.Hostname != nil { + return false + } else if that1.Hostname != nil { + return false + } + if this.IP != nil && that1.IP != nil { + if *this.IP != *that1.IP { + return false + } + } else if this.IP != nil { + return false + } else if that1.IP != nil { + return false + } + if this.Port != that1.Port { + return false + } + return true +} +func (this *URL) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*URL) + if !ok { + that2, ok := that.(URL) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *URL") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *URL but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *URL but is not nil && this == nil") + } + if this.Scheme != that1.Scheme { + return fmt.Errorf("Scheme this(%v) Not Equal that(%v)", this.Scheme, that1.Scheme) + } + if !this.Address.Equal(&that1.Address) { + return fmt.Errorf("Address this(%v) Not Equal that(%v)", this.Address, that1.Address) + } + if this.Path != nil && that1.Path != nil { + if *this.Path != *that1.Path { + return fmt.Errorf("Path this(%v) Not Equal that(%v)", *this.Path, *that1.Path) + } + } else if this.Path != nil { + return fmt.Errorf("this.Path == nil && that.Path != nil") + } else if that1.Path != nil { + return fmt.Errorf("Path this(%v) Not Equal that(%v)", this.Path, that1.Path) + } + if len(this.Query) != len(that1.Query) { + return fmt.Errorf("Query this(%v) Not Equal that(%v)", len(this.Query), len(that1.Query)) + } + for i := range this.Query { + if !this.Query[i].Equal(&that1.Query[i]) { + return fmt.Errorf("Query this[%v](%v) Not Equal that[%v](%v)", i, this.Query[i], i, that1.Query[i]) + } + } + if this.Fragment != nil && that1.Fragment != nil { + if *this.Fragment != *that1.Fragment { + return fmt.Errorf("Fragment this(%v) Not Equal that(%v)", *this.Fragment, *that1.Fragment) + } + } else if this.Fragment != nil { + return fmt.Errorf("this.Fragment == nil && that.Fragment != nil") + } else if that1.Fragment != nil { + return fmt.Errorf("Fragment this(%v) Not Equal that(%v)", this.Fragment, that1.Fragment) + } + return nil +} +func (this *URL) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*URL) + if !ok { + that2, ok := that.(URL) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Scheme != that1.Scheme { + return false + } + if !this.Address.Equal(&that1.Address) { + return false + } + if this.Path != nil && that1.Path != nil { + if *this.Path != *that1.Path { + return false + } + } else if this.Path != nil { + return false + } else if that1.Path != nil { + return false + } + if len(this.Query) != len(that1.Query) { + return false + } + for i := range this.Query { + if !this.Query[i].Equal(&that1.Query[i]) { + return false + } + } + if this.Fragment != nil && that1.Fragment != nil { + if *this.Fragment != *that1.Fragment { + return false + } + } else if this.Fragment != nil { + return false + } else if that1.Fragment != nil { + return false + } + return true +} +func (this *Unavailability) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Unavailability) + if !ok { + that2, ok := that.(Unavailability) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Unavailability") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Unavailability but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Unavailability but is not nil && this == nil") + } + if !this.Start.Equal(&that1.Start) { + return fmt.Errorf("Start this(%v) Not Equal that(%v)", this.Start, that1.Start) + } + if !this.Duration.Equal(that1.Duration) { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + return nil +} +func (this *Unavailability) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Unavailability) + if !ok { + that2, ok := that.(Unavailability) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Start.Equal(&that1.Start) { + return false + } + if !this.Duration.Equal(that1.Duration) { + return false + } + return true +} +func (this *MachineID) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MachineID) + if !ok { + that2, ok := that.(MachineID) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MachineID") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MachineID but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MachineID but is not nil && this == nil") + } + if this.Hostname != nil && that1.Hostname != nil { + if *this.Hostname != *that1.Hostname { + return fmt.Errorf("Hostname this(%v) Not Equal that(%v)", *this.Hostname, *that1.Hostname) + } + } else if this.Hostname != nil { + return fmt.Errorf("this.Hostname == nil && that.Hostname != nil") + } else if that1.Hostname != nil { + return fmt.Errorf("Hostname this(%v) Not Equal that(%v)", this.Hostname, that1.Hostname) + } + if this.IP != nil && that1.IP != nil { + if *this.IP != *that1.IP { + return fmt.Errorf("IP this(%v) Not Equal that(%v)", *this.IP, *that1.IP) + } + } else if this.IP != nil { + return fmt.Errorf("this.IP == nil && that.IP != nil") + } else if that1.IP != nil { + return fmt.Errorf("IP this(%v) Not Equal that(%v)", this.IP, that1.IP) + } + return nil +} +func (this *MachineID) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MachineID) + if !ok { + that2, ok := that.(MachineID) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Hostname != nil && that1.Hostname != nil { + if *this.Hostname != *that1.Hostname { + return false + } + } else if this.Hostname != nil { + return false + } else if that1.Hostname != nil { + return false + } + if this.IP != nil && that1.IP != nil { + if *this.IP != *that1.IP { + return false + } + } else if this.IP != nil { + return false + } else if that1.IP != nil { + return false + } + return true +} +func (this *MachineInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MachineInfo) + if !ok { + that2, ok := that.(MachineInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MachineInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MachineInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MachineInfo but is not nil && this == nil") + } + if !this.ID.Equal(&that1.ID) { + return fmt.Errorf("ID this(%v) Not Equal that(%v)", this.ID, that1.ID) + } + if this.Mode != nil && that1.Mode != nil { + if *this.Mode != *that1.Mode { + return fmt.Errorf("Mode this(%v) Not Equal that(%v)", *this.Mode, *that1.Mode) + } + } else if this.Mode != nil { + return fmt.Errorf("this.Mode == nil && that.Mode != nil") + } else if that1.Mode != nil { + return fmt.Errorf("Mode this(%v) Not Equal that(%v)", this.Mode, that1.Mode) + } + if !this.Unavailability.Equal(that1.Unavailability) { + return fmt.Errorf("Unavailability this(%v) Not Equal that(%v)", this.Unavailability, that1.Unavailability) + } + return nil +} +func (this *MachineInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MachineInfo) + if !ok { + that2, ok := that.(MachineInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.ID.Equal(&that1.ID) { + return false + } + if this.Mode != nil && that1.Mode != nil { + if *this.Mode != *that1.Mode { + return false + } + } else if this.Mode != nil { + return false + } else if that1.Mode != nil { + return false + } + if !this.Unavailability.Equal(that1.Unavailability) { + return false + } + return true +} +func (this *FrameworkInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FrameworkInfo) + if !ok { + that2, ok := that.(FrameworkInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FrameworkInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FrameworkInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FrameworkInfo but is not nil && this == nil") + } + if this.User != that1.User { + return fmt.Errorf("User this(%v) Not Equal that(%v)", this.User, that1.User) + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if !this.ID.Equal(that1.ID) { + return fmt.Errorf("ID this(%v) Not Equal that(%v)", this.ID, that1.ID) + } + if this.FailoverTimeout != nil && that1.FailoverTimeout != nil { + if *this.FailoverTimeout != *that1.FailoverTimeout { + return fmt.Errorf("FailoverTimeout this(%v) Not Equal that(%v)", *this.FailoverTimeout, *that1.FailoverTimeout) + } + } else if this.FailoverTimeout != nil { + return fmt.Errorf("this.FailoverTimeout == nil && that.FailoverTimeout != nil") + } else if that1.FailoverTimeout != nil { + return fmt.Errorf("FailoverTimeout this(%v) Not Equal that(%v)", this.FailoverTimeout, that1.FailoverTimeout) + } + if this.Checkpoint != nil && that1.Checkpoint != nil { + if *this.Checkpoint != *that1.Checkpoint { + return fmt.Errorf("Checkpoint this(%v) Not Equal that(%v)", *this.Checkpoint, *that1.Checkpoint) + } + } else if this.Checkpoint != nil { + return fmt.Errorf("this.Checkpoint == nil && that.Checkpoint != nil") + } else if that1.Checkpoint != nil { + return fmt.Errorf("Checkpoint this(%v) Not Equal that(%v)", this.Checkpoint, that1.Checkpoint) + } + if this.Role != nil && that1.Role != nil { + if *this.Role != *that1.Role { + return fmt.Errorf("Role this(%v) Not Equal that(%v)", *this.Role, *that1.Role) + } + } else if this.Role != nil { + return fmt.Errorf("this.Role == nil && that.Role != nil") + } else if that1.Role != nil { + return fmt.Errorf("Role this(%v) Not Equal that(%v)", this.Role, that1.Role) + } + if len(this.Roles) != len(that1.Roles) { + return fmt.Errorf("Roles this(%v) Not Equal that(%v)", len(this.Roles), len(that1.Roles)) + } + for i := range this.Roles { + if this.Roles[i] != that1.Roles[i] { + return fmt.Errorf("Roles this[%v](%v) Not Equal that[%v](%v)", i, this.Roles[i], i, that1.Roles[i]) + } + } + if this.Hostname != nil && that1.Hostname != nil { + if *this.Hostname != *that1.Hostname { + return fmt.Errorf("Hostname this(%v) Not Equal that(%v)", *this.Hostname, *that1.Hostname) + } + } else if this.Hostname != nil { + return fmt.Errorf("this.Hostname == nil && that.Hostname != nil") + } else if that1.Hostname != nil { + return fmt.Errorf("Hostname this(%v) Not Equal that(%v)", this.Hostname, that1.Hostname) + } + if this.Principal != nil && that1.Principal != nil { + if *this.Principal != *that1.Principal { + return fmt.Errorf("Principal this(%v) Not Equal that(%v)", *this.Principal, *that1.Principal) + } + } else if this.Principal != nil { + return fmt.Errorf("this.Principal == nil && that.Principal != nil") + } else if that1.Principal != nil { + return fmt.Errorf("Principal this(%v) Not Equal that(%v)", this.Principal, that1.Principal) + } + if this.WebUiURL != nil && that1.WebUiURL != nil { + if *this.WebUiURL != *that1.WebUiURL { + return fmt.Errorf("WebUiURL this(%v) Not Equal that(%v)", *this.WebUiURL, *that1.WebUiURL) + } + } else if this.WebUiURL != nil { + return fmt.Errorf("this.WebUiURL == nil && that.WebUiURL != nil") + } else if that1.WebUiURL != nil { + return fmt.Errorf("WebUiURL this(%v) Not Equal that(%v)", this.WebUiURL, that1.WebUiURL) + } + if len(this.Capabilities) != len(that1.Capabilities) { + return fmt.Errorf("Capabilities this(%v) Not Equal that(%v)", len(this.Capabilities), len(that1.Capabilities)) + } + for i := range this.Capabilities { + if !this.Capabilities[i].Equal(&that1.Capabilities[i]) { + return fmt.Errorf("Capabilities this[%v](%v) Not Equal that[%v](%v)", i, this.Capabilities[i], i, that1.Capabilities[i]) + } + } + if !this.Labels.Equal(that1.Labels) { + return fmt.Errorf("Labels this(%v) Not Equal that(%v)", this.Labels, that1.Labels) + } + return nil +} +func (this *FrameworkInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*FrameworkInfo) + if !ok { + that2, ok := that.(FrameworkInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.User != that1.User { + return false + } + if this.Name != that1.Name { + return false + } + if !this.ID.Equal(that1.ID) { + return false + } + if this.FailoverTimeout != nil && that1.FailoverTimeout != nil { + if *this.FailoverTimeout != *that1.FailoverTimeout { + return false + } + } else if this.FailoverTimeout != nil { + return false + } else if that1.FailoverTimeout != nil { + return false + } + if this.Checkpoint != nil && that1.Checkpoint != nil { + if *this.Checkpoint != *that1.Checkpoint { + return false + } + } else if this.Checkpoint != nil { + return false + } else if that1.Checkpoint != nil { + return false + } + if this.Role != nil && that1.Role != nil { + if *this.Role != *that1.Role { + return false + } + } else if this.Role != nil { + return false + } else if that1.Role != nil { + return false + } + if len(this.Roles) != len(that1.Roles) { + return false + } + for i := range this.Roles { + if this.Roles[i] != that1.Roles[i] { + return false + } + } + if this.Hostname != nil && that1.Hostname != nil { + if *this.Hostname != *that1.Hostname { + return false + } + } else if this.Hostname != nil { + return false + } else if that1.Hostname != nil { + return false + } + if this.Principal != nil && that1.Principal != nil { + if *this.Principal != *that1.Principal { + return false + } + } else if this.Principal != nil { + return false + } else if that1.Principal != nil { + return false + } + if this.WebUiURL != nil && that1.WebUiURL != nil { + if *this.WebUiURL != *that1.WebUiURL { + return false + } + } else if this.WebUiURL != nil { + return false + } else if that1.WebUiURL != nil { + return false + } + if len(this.Capabilities) != len(that1.Capabilities) { + return false + } + for i := range this.Capabilities { + if !this.Capabilities[i].Equal(&that1.Capabilities[i]) { + return false + } + } + if !this.Labels.Equal(that1.Labels) { + return false + } + return true +} +func (this *FrameworkInfo_Capability) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FrameworkInfo_Capability) + if !ok { + that2, ok := that.(FrameworkInfo_Capability) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FrameworkInfo_Capability") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FrameworkInfo_Capability but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FrameworkInfo_Capability but is not nil && this == nil") + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + return nil +} +func (this *FrameworkInfo_Capability) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*FrameworkInfo_Capability) + if !ok { + that2, ok := that.(FrameworkInfo_Capability) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + return true +} +func (this *CheckInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CheckInfo) + if !ok { + that2, ok := that.(CheckInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CheckInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CheckInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CheckInfo but is not nil && this == nil") + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.Command.Equal(that1.Command) { + return fmt.Errorf("Command this(%v) Not Equal that(%v)", this.Command, that1.Command) + } + if !this.HTTP.Equal(that1.HTTP) { + return fmt.Errorf("HTTP this(%v) Not Equal that(%v)", this.HTTP, that1.HTTP) + } + if !this.TCP.Equal(that1.TCP) { + return fmt.Errorf("TCP this(%v) Not Equal that(%v)", this.TCP, that1.TCP) + } + if this.DelaySeconds != nil && that1.DelaySeconds != nil { + if *this.DelaySeconds != *that1.DelaySeconds { + return fmt.Errorf("DelaySeconds this(%v) Not Equal that(%v)", *this.DelaySeconds, *that1.DelaySeconds) + } + } else if this.DelaySeconds != nil { + return fmt.Errorf("this.DelaySeconds == nil && that.DelaySeconds != nil") + } else if that1.DelaySeconds != nil { + return fmt.Errorf("DelaySeconds this(%v) Not Equal that(%v)", this.DelaySeconds, that1.DelaySeconds) + } + if this.IntervalSeconds != nil && that1.IntervalSeconds != nil { + if *this.IntervalSeconds != *that1.IntervalSeconds { + return fmt.Errorf("IntervalSeconds this(%v) Not Equal that(%v)", *this.IntervalSeconds, *that1.IntervalSeconds) + } + } else if this.IntervalSeconds != nil { + return fmt.Errorf("this.IntervalSeconds == nil && that.IntervalSeconds != nil") + } else if that1.IntervalSeconds != nil { + return fmt.Errorf("IntervalSeconds this(%v) Not Equal that(%v)", this.IntervalSeconds, that1.IntervalSeconds) + } + if this.TimeoutSeconds != nil && that1.TimeoutSeconds != nil { + if *this.TimeoutSeconds != *that1.TimeoutSeconds { + return fmt.Errorf("TimeoutSeconds this(%v) Not Equal that(%v)", *this.TimeoutSeconds, *that1.TimeoutSeconds) + } + } else if this.TimeoutSeconds != nil { + return fmt.Errorf("this.TimeoutSeconds == nil && that.TimeoutSeconds != nil") + } else if that1.TimeoutSeconds != nil { + return fmt.Errorf("TimeoutSeconds this(%v) Not Equal that(%v)", this.TimeoutSeconds, that1.TimeoutSeconds) + } + return nil +} +func (this *CheckInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CheckInfo) + if !ok { + that2, ok := that.(CheckInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + if !this.Command.Equal(that1.Command) { + return false + } + if !this.HTTP.Equal(that1.HTTP) { + return false + } + if !this.TCP.Equal(that1.TCP) { + return false + } + if this.DelaySeconds != nil && that1.DelaySeconds != nil { + if *this.DelaySeconds != *that1.DelaySeconds { + return false + } + } else if this.DelaySeconds != nil { + return false + } else if that1.DelaySeconds != nil { + return false + } + if this.IntervalSeconds != nil && that1.IntervalSeconds != nil { + if *this.IntervalSeconds != *that1.IntervalSeconds { + return false + } + } else if this.IntervalSeconds != nil { + return false + } else if that1.IntervalSeconds != nil { + return false + } + if this.TimeoutSeconds != nil && that1.TimeoutSeconds != nil { + if *this.TimeoutSeconds != *that1.TimeoutSeconds { + return false + } + } else if this.TimeoutSeconds != nil { + return false + } else if that1.TimeoutSeconds != nil { + return false + } + return true +} +func (this *CheckInfo_Command) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CheckInfo_Command) + if !ok { + that2, ok := that.(CheckInfo_Command) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CheckInfo_Command") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CheckInfo_Command but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CheckInfo_Command but is not nil && this == nil") + } + if !this.Command.Equal(&that1.Command) { + return fmt.Errorf("Command this(%v) Not Equal that(%v)", this.Command, that1.Command) + } + return nil +} +func (this *CheckInfo_Command) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CheckInfo_Command) + if !ok { + that2, ok := that.(CheckInfo_Command) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Command.Equal(&that1.Command) { + return false + } + return true +} +func (this *CheckInfo_Http) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CheckInfo_Http) + if !ok { + that2, ok := that.(CheckInfo_Http) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CheckInfo_Http") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CheckInfo_Http but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CheckInfo_Http but is not nil && this == nil") + } + if this.Port != that1.Port { + return fmt.Errorf("Port this(%v) Not Equal that(%v)", this.Port, that1.Port) + } + if this.Path != nil && that1.Path != nil { + if *this.Path != *that1.Path { + return fmt.Errorf("Path this(%v) Not Equal that(%v)", *this.Path, *that1.Path) + } + } else if this.Path != nil { + return fmt.Errorf("this.Path == nil && that.Path != nil") + } else if that1.Path != nil { + return fmt.Errorf("Path this(%v) Not Equal that(%v)", this.Path, that1.Path) + } + return nil +} +func (this *CheckInfo_Http) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CheckInfo_Http) + if !ok { + that2, ok := that.(CheckInfo_Http) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Port != that1.Port { + return false + } + if this.Path != nil && that1.Path != nil { + if *this.Path != *that1.Path { + return false + } + } else if this.Path != nil { + return false + } else if that1.Path != nil { + return false + } + return true +} +func (this *CheckInfo_Tcp) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CheckInfo_Tcp) + if !ok { + that2, ok := that.(CheckInfo_Tcp) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CheckInfo_Tcp") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CheckInfo_Tcp but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CheckInfo_Tcp but is not nil && this == nil") + } + if this.Port != that1.Port { + return fmt.Errorf("Port this(%v) Not Equal that(%v)", this.Port, that1.Port) + } + return nil +} +func (this *CheckInfo_Tcp) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CheckInfo_Tcp) + if !ok { + that2, ok := that.(CheckInfo_Tcp) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Port != that1.Port { + return false + } + return true +} +func (this *HealthCheck) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*HealthCheck) + if !ok { + that2, ok := that.(HealthCheck) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *HealthCheck") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *HealthCheck but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *HealthCheck but is not nil && this == nil") + } + if this.DelaySeconds != nil && that1.DelaySeconds != nil { + if *this.DelaySeconds != *that1.DelaySeconds { + return fmt.Errorf("DelaySeconds this(%v) Not Equal that(%v)", *this.DelaySeconds, *that1.DelaySeconds) + } + } else if this.DelaySeconds != nil { + return fmt.Errorf("this.DelaySeconds == nil && that.DelaySeconds != nil") + } else if that1.DelaySeconds != nil { + return fmt.Errorf("DelaySeconds this(%v) Not Equal that(%v)", this.DelaySeconds, that1.DelaySeconds) + } + if this.IntervalSeconds != nil && that1.IntervalSeconds != nil { + if *this.IntervalSeconds != *that1.IntervalSeconds { + return fmt.Errorf("IntervalSeconds this(%v) Not Equal that(%v)", *this.IntervalSeconds, *that1.IntervalSeconds) + } + } else if this.IntervalSeconds != nil { + return fmt.Errorf("this.IntervalSeconds == nil && that.IntervalSeconds != nil") + } else if that1.IntervalSeconds != nil { + return fmt.Errorf("IntervalSeconds this(%v) Not Equal that(%v)", this.IntervalSeconds, that1.IntervalSeconds) + } + if this.TimeoutSeconds != nil && that1.TimeoutSeconds != nil { + if *this.TimeoutSeconds != *that1.TimeoutSeconds { + return fmt.Errorf("TimeoutSeconds this(%v) Not Equal that(%v)", *this.TimeoutSeconds, *that1.TimeoutSeconds) + } + } else if this.TimeoutSeconds != nil { + return fmt.Errorf("this.TimeoutSeconds == nil && that.TimeoutSeconds != nil") + } else if that1.TimeoutSeconds != nil { + return fmt.Errorf("TimeoutSeconds this(%v) Not Equal that(%v)", this.TimeoutSeconds, that1.TimeoutSeconds) + } + if this.ConsecutiveFailures != nil && that1.ConsecutiveFailures != nil { + if *this.ConsecutiveFailures != *that1.ConsecutiveFailures { + return fmt.Errorf("ConsecutiveFailures this(%v) Not Equal that(%v)", *this.ConsecutiveFailures, *that1.ConsecutiveFailures) + } + } else if this.ConsecutiveFailures != nil { + return fmt.Errorf("this.ConsecutiveFailures == nil && that.ConsecutiveFailures != nil") + } else if that1.ConsecutiveFailures != nil { + return fmt.Errorf("ConsecutiveFailures this(%v) Not Equal that(%v)", this.ConsecutiveFailures, that1.ConsecutiveFailures) + } + if this.GracePeriodSeconds != nil && that1.GracePeriodSeconds != nil { + if *this.GracePeriodSeconds != *that1.GracePeriodSeconds { + return fmt.Errorf("GracePeriodSeconds this(%v) Not Equal that(%v)", *this.GracePeriodSeconds, *that1.GracePeriodSeconds) + } + } else if this.GracePeriodSeconds != nil { + return fmt.Errorf("this.GracePeriodSeconds == nil && that.GracePeriodSeconds != nil") + } else if that1.GracePeriodSeconds != nil { + return fmt.Errorf("GracePeriodSeconds this(%v) Not Equal that(%v)", this.GracePeriodSeconds, that1.GracePeriodSeconds) + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.Command.Equal(that1.Command) { + return fmt.Errorf("Command this(%v) Not Equal that(%v)", this.Command, that1.Command) + } + if !this.HTTP.Equal(that1.HTTP) { + return fmt.Errorf("HTTP this(%v) Not Equal that(%v)", this.HTTP, that1.HTTP) + } + if !this.TCP.Equal(that1.TCP) { + return fmt.Errorf("TCP this(%v) Not Equal that(%v)", this.TCP, that1.TCP) + } + return nil +} +func (this *HealthCheck) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*HealthCheck) + if !ok { + that2, ok := that.(HealthCheck) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.DelaySeconds != nil && that1.DelaySeconds != nil { + if *this.DelaySeconds != *that1.DelaySeconds { + return false + } + } else if this.DelaySeconds != nil { + return false + } else if that1.DelaySeconds != nil { + return false + } + if this.IntervalSeconds != nil && that1.IntervalSeconds != nil { + if *this.IntervalSeconds != *that1.IntervalSeconds { + return false + } + } else if this.IntervalSeconds != nil { + return false + } else if that1.IntervalSeconds != nil { + return false + } + if this.TimeoutSeconds != nil && that1.TimeoutSeconds != nil { + if *this.TimeoutSeconds != *that1.TimeoutSeconds { + return false + } + } else if this.TimeoutSeconds != nil { + return false + } else if that1.TimeoutSeconds != nil { + return false + } + if this.ConsecutiveFailures != nil && that1.ConsecutiveFailures != nil { + if *this.ConsecutiveFailures != *that1.ConsecutiveFailures { + return false + } + } else if this.ConsecutiveFailures != nil { + return false + } else if that1.ConsecutiveFailures != nil { + return false + } + if this.GracePeriodSeconds != nil && that1.GracePeriodSeconds != nil { + if *this.GracePeriodSeconds != *that1.GracePeriodSeconds { + return false + } + } else if this.GracePeriodSeconds != nil { + return false + } else if that1.GracePeriodSeconds != nil { + return false + } + if this.Type != that1.Type { + return false + } + if !this.Command.Equal(that1.Command) { + return false + } + if !this.HTTP.Equal(that1.HTTP) { + return false + } + if !this.TCP.Equal(that1.TCP) { + return false + } + return true +} +func (this *HealthCheck_HTTPCheckInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*HealthCheck_HTTPCheckInfo) + if !ok { + that2, ok := that.(HealthCheck_HTTPCheckInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *HealthCheck_HTTPCheckInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *HealthCheck_HTTPCheckInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *HealthCheck_HTTPCheckInfo but is not nil && this == nil") + } + if this.Protocol != nil && that1.Protocol != nil { + if *this.Protocol != *that1.Protocol { + return fmt.Errorf("Protocol this(%v) Not Equal that(%v)", *this.Protocol, *that1.Protocol) + } + } else if this.Protocol != nil { + return fmt.Errorf("this.Protocol == nil && that.Protocol != nil") + } else if that1.Protocol != nil { + return fmt.Errorf("Protocol this(%v) Not Equal that(%v)", this.Protocol, that1.Protocol) + } + if this.Scheme != nil && that1.Scheme != nil { + if *this.Scheme != *that1.Scheme { + return fmt.Errorf("Scheme this(%v) Not Equal that(%v)", *this.Scheme, *that1.Scheme) + } + } else if this.Scheme != nil { + return fmt.Errorf("this.Scheme == nil && that.Scheme != nil") + } else if that1.Scheme != nil { + return fmt.Errorf("Scheme this(%v) Not Equal that(%v)", this.Scheme, that1.Scheme) + } + if this.Port != that1.Port { + return fmt.Errorf("Port this(%v) Not Equal that(%v)", this.Port, that1.Port) + } + if this.Path != nil && that1.Path != nil { + if *this.Path != *that1.Path { + return fmt.Errorf("Path this(%v) Not Equal that(%v)", *this.Path, *that1.Path) + } + } else if this.Path != nil { + return fmt.Errorf("this.Path == nil && that.Path != nil") + } else if that1.Path != nil { + return fmt.Errorf("Path this(%v) Not Equal that(%v)", this.Path, that1.Path) + } + if len(this.Statuses) != len(that1.Statuses) { + return fmt.Errorf("Statuses this(%v) Not Equal that(%v)", len(this.Statuses), len(that1.Statuses)) + } + for i := range this.Statuses { + if this.Statuses[i] != that1.Statuses[i] { + return fmt.Errorf("Statuses this[%v](%v) Not Equal that[%v](%v)", i, this.Statuses[i], i, that1.Statuses[i]) + } + } + return nil +} +func (this *HealthCheck_HTTPCheckInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*HealthCheck_HTTPCheckInfo) + if !ok { + that2, ok := that.(HealthCheck_HTTPCheckInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Protocol != nil && that1.Protocol != nil { + if *this.Protocol != *that1.Protocol { + return false + } + } else if this.Protocol != nil { + return false + } else if that1.Protocol != nil { + return false + } + if this.Scheme != nil && that1.Scheme != nil { + if *this.Scheme != *that1.Scheme { + return false + } + } else if this.Scheme != nil { + return false + } else if that1.Scheme != nil { + return false + } + if this.Port != that1.Port { + return false + } + if this.Path != nil && that1.Path != nil { + if *this.Path != *that1.Path { + return false + } + } else if this.Path != nil { + return false + } else if that1.Path != nil { + return false + } + if len(this.Statuses) != len(that1.Statuses) { + return false + } + for i := range this.Statuses { + if this.Statuses[i] != that1.Statuses[i] { + return false + } + } + return true +} +func (this *HealthCheck_TCPCheckInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*HealthCheck_TCPCheckInfo) + if !ok { + that2, ok := that.(HealthCheck_TCPCheckInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *HealthCheck_TCPCheckInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *HealthCheck_TCPCheckInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *HealthCheck_TCPCheckInfo but is not nil && this == nil") + } + if this.Protocol != nil && that1.Protocol != nil { + if *this.Protocol != *that1.Protocol { + return fmt.Errorf("Protocol this(%v) Not Equal that(%v)", *this.Protocol, *that1.Protocol) + } + } else if this.Protocol != nil { + return fmt.Errorf("this.Protocol == nil && that.Protocol != nil") + } else if that1.Protocol != nil { + return fmt.Errorf("Protocol this(%v) Not Equal that(%v)", this.Protocol, that1.Protocol) + } + if this.Port != that1.Port { + return fmt.Errorf("Port this(%v) Not Equal that(%v)", this.Port, that1.Port) + } + return nil +} +func (this *HealthCheck_TCPCheckInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*HealthCheck_TCPCheckInfo) + if !ok { + that2, ok := that.(HealthCheck_TCPCheckInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Protocol != nil && that1.Protocol != nil { + if *this.Protocol != *that1.Protocol { + return false + } + } else if this.Protocol != nil { + return false + } else if that1.Protocol != nil { + return false + } + if this.Port != that1.Port { + return false + } + return true +} +func (this *KillPolicy) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*KillPolicy) + if !ok { + that2, ok := that.(KillPolicy) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *KillPolicy") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *KillPolicy but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *KillPolicy but is not nil && this == nil") + } + if !this.GracePeriod.Equal(that1.GracePeriod) { + return fmt.Errorf("GracePeriod this(%v) Not Equal that(%v)", this.GracePeriod, that1.GracePeriod) + } + return nil +} +func (this *KillPolicy) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*KillPolicy) + if !ok { + that2, ok := that.(KillPolicy) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.GracePeriod.Equal(that1.GracePeriod) { + return false + } + return true +} +func (this *CommandInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CommandInfo) + if !ok { + that2, ok := that.(CommandInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CommandInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CommandInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CommandInfo but is not nil && this == nil") + } + if len(this.URIs) != len(that1.URIs) { + return fmt.Errorf("URIs this(%v) Not Equal that(%v)", len(this.URIs), len(that1.URIs)) + } + for i := range this.URIs { + if !this.URIs[i].Equal(&that1.URIs[i]) { + return fmt.Errorf("URIs this[%v](%v) Not Equal that[%v](%v)", i, this.URIs[i], i, that1.URIs[i]) + } + } + if !this.Environment.Equal(that1.Environment) { + return fmt.Errorf("Environment this(%v) Not Equal that(%v)", this.Environment, that1.Environment) + } + if this.Shell != nil && that1.Shell != nil { + if *this.Shell != *that1.Shell { + return fmt.Errorf("Shell this(%v) Not Equal that(%v)", *this.Shell, *that1.Shell) + } + } else if this.Shell != nil { + return fmt.Errorf("this.Shell == nil && that.Shell != nil") + } else if that1.Shell != nil { + return fmt.Errorf("Shell this(%v) Not Equal that(%v)", this.Shell, that1.Shell) + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) + } + } else if this.Value != nil { + return fmt.Errorf("this.Value == nil && that.Value != nil") + } else if that1.Value != nil { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if len(this.Arguments) != len(that1.Arguments) { + return fmt.Errorf("Arguments this(%v) Not Equal that(%v)", len(this.Arguments), len(that1.Arguments)) + } + for i := range this.Arguments { + if this.Arguments[i] != that1.Arguments[i] { + return fmt.Errorf("Arguments this[%v](%v) Not Equal that[%v](%v)", i, this.Arguments[i], i, that1.Arguments[i]) + } + } + if this.User != nil && that1.User != nil { + if *this.User != *that1.User { + return fmt.Errorf("User this(%v) Not Equal that(%v)", *this.User, *that1.User) + } + } else if this.User != nil { + return fmt.Errorf("this.User == nil && that.User != nil") + } else if that1.User != nil { + return fmt.Errorf("User this(%v) Not Equal that(%v)", this.User, that1.User) + } + return nil +} +func (this *CommandInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CommandInfo) + if !ok { + that2, ok := that.(CommandInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.URIs) != len(that1.URIs) { + return false + } + for i := range this.URIs { + if !this.URIs[i].Equal(&that1.URIs[i]) { + return false + } + } + if !this.Environment.Equal(that1.Environment) { + return false + } + if this.Shell != nil && that1.Shell != nil { + if *this.Shell != *that1.Shell { + return false + } + } else if this.Shell != nil { + return false + } else if that1.Shell != nil { + return false + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return false + } + } else if this.Value != nil { + return false + } else if that1.Value != nil { + return false + } + if len(this.Arguments) != len(that1.Arguments) { + return false + } + for i := range this.Arguments { + if this.Arguments[i] != that1.Arguments[i] { + return false + } + } + if this.User != nil && that1.User != nil { + if *this.User != *that1.User { + return false + } + } else if this.User != nil { + return false + } else if that1.User != nil { + return false + } + return true +} +func (this *CommandInfo_URI) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CommandInfo_URI) + if !ok { + that2, ok := that.(CommandInfo_URI) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CommandInfo_URI") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CommandInfo_URI but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CommandInfo_URI but is not nil && this == nil") + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if this.Executable != nil && that1.Executable != nil { + if *this.Executable != *that1.Executable { + return fmt.Errorf("Executable this(%v) Not Equal that(%v)", *this.Executable, *that1.Executable) + } + } else if this.Executable != nil { + return fmt.Errorf("this.Executable == nil && that.Executable != nil") + } else if that1.Executable != nil { + return fmt.Errorf("Executable this(%v) Not Equal that(%v)", this.Executable, that1.Executable) + } + if this.Extract != nil && that1.Extract != nil { + if *this.Extract != *that1.Extract { + return fmt.Errorf("Extract this(%v) Not Equal that(%v)", *this.Extract, *that1.Extract) + } + } else if this.Extract != nil { + return fmt.Errorf("this.Extract == nil && that.Extract != nil") + } else if that1.Extract != nil { + return fmt.Errorf("Extract this(%v) Not Equal that(%v)", this.Extract, that1.Extract) + } + if this.Cache != nil && that1.Cache != nil { + if *this.Cache != *that1.Cache { + return fmt.Errorf("Cache this(%v) Not Equal that(%v)", *this.Cache, *that1.Cache) + } + } else if this.Cache != nil { + return fmt.Errorf("this.Cache == nil && that.Cache != nil") + } else if that1.Cache != nil { + return fmt.Errorf("Cache this(%v) Not Equal that(%v)", this.Cache, that1.Cache) + } + if this.OutputFile != nil && that1.OutputFile != nil { + if *this.OutputFile != *that1.OutputFile { + return fmt.Errorf("OutputFile this(%v) Not Equal that(%v)", *this.OutputFile, *that1.OutputFile) + } + } else if this.OutputFile != nil { + return fmt.Errorf("this.OutputFile == nil && that.OutputFile != nil") + } else if that1.OutputFile != nil { + return fmt.Errorf("OutputFile this(%v) Not Equal that(%v)", this.OutputFile, that1.OutputFile) + } + return nil +} +func (this *CommandInfo_URI) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CommandInfo_URI) + if !ok { + that2, ok := that.(CommandInfo_URI) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + if this.Executable != nil && that1.Executable != nil { + if *this.Executable != *that1.Executable { + return false + } + } else if this.Executable != nil { + return false + } else if that1.Executable != nil { + return false + } + if this.Extract != nil && that1.Extract != nil { + if *this.Extract != *that1.Extract { + return false + } + } else if this.Extract != nil { + return false + } else if that1.Extract != nil { + return false + } + if this.Cache != nil && that1.Cache != nil { + if *this.Cache != *that1.Cache { + return false + } + } else if this.Cache != nil { + return false + } else if that1.Cache != nil { + return false + } + if this.OutputFile != nil && that1.OutputFile != nil { + if *this.OutputFile != *that1.OutputFile { + return false + } + } else if this.OutputFile != nil { + return false + } else if that1.OutputFile != nil { + return false + } + return true +} +func (this *ExecutorInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ExecutorInfo) + if !ok { + that2, ok := that.(ExecutorInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ExecutorInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ExecutorInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ExecutorInfo but is not nil && this == nil") + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.ExecutorID.Equal(&that1.ExecutorID) { + return fmt.Errorf("ExecutorID this(%v) Not Equal that(%v)", this.ExecutorID, that1.ExecutorID) + } + if !this.FrameworkID.Equal(that1.FrameworkID) { + return fmt.Errorf("FrameworkID this(%v) Not Equal that(%v)", this.FrameworkID, that1.FrameworkID) + } + if !this.Command.Equal(that1.Command) { + return fmt.Errorf("Command this(%v) Not Equal that(%v)", this.Command, that1.Command) + } + if !this.Container.Equal(that1.Container) { + return fmt.Errorf("Container this(%v) Not Equal that(%v)", this.Container, that1.Container) + } + if len(this.Resources) != len(that1.Resources) { + return fmt.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return fmt.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) + } + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) + } + } else if this.Name != nil { + return fmt.Errorf("this.Name == nil && that.Name != nil") + } else if that1.Name != nil { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Source != nil && that1.Source != nil { + if *this.Source != *that1.Source { + return fmt.Errorf("Source this(%v) Not Equal that(%v)", *this.Source, *that1.Source) + } + } else if this.Source != nil { + return fmt.Errorf("this.Source == nil && that.Source != nil") + } else if that1.Source != nil { + return fmt.Errorf("Source this(%v) Not Equal that(%v)", this.Source, that1.Source) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if !this.Discovery.Equal(that1.Discovery) { + return fmt.Errorf("Discovery this(%v) Not Equal that(%v)", this.Discovery, that1.Discovery) + } + if !this.ShutdownGracePeriod.Equal(that1.ShutdownGracePeriod) { + return fmt.Errorf("ShutdownGracePeriod this(%v) Not Equal that(%v)", this.ShutdownGracePeriod, that1.ShutdownGracePeriod) + } + if !this.Labels.Equal(that1.Labels) { + return fmt.Errorf("Labels this(%v) Not Equal that(%v)", this.Labels, that1.Labels) + } + return nil +} +func (this *ExecutorInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ExecutorInfo) + if !ok { + that2, ok := that.(ExecutorInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + if !this.ExecutorID.Equal(&that1.ExecutorID) { + return false + } + if !this.FrameworkID.Equal(that1.FrameworkID) { + return false + } + if !this.Command.Equal(that1.Command) { + return false + } + if !this.Container.Equal(that1.Container) { + return false + } + if len(this.Resources) != len(that1.Resources) { + return false + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return false + } + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return false + } + } else if this.Name != nil { + return false + } else if that1.Name != nil { + return false + } + if this.Source != nil && that1.Source != nil { + if *this.Source != *that1.Source { + return false + } + } else if this.Source != nil { + return false + } else if that1.Source != nil { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if !this.Discovery.Equal(that1.Discovery) { + return false + } + if !this.ShutdownGracePeriod.Equal(that1.ShutdownGracePeriod) { + return false + } + if !this.Labels.Equal(that1.Labels) { + return false + } + return true +} +func (this *DomainInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DomainInfo) + if !ok { + that2, ok := that.(DomainInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DomainInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DomainInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DomainInfo but is not nil && this == nil") + } + if !this.FaultDomain.Equal(that1.FaultDomain) { + return fmt.Errorf("FaultDomain this(%v) Not Equal that(%v)", this.FaultDomain, that1.FaultDomain) + } + return nil +} +func (this *DomainInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DomainInfo) + if !ok { + that2, ok := that.(DomainInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.FaultDomain.Equal(that1.FaultDomain) { + return false + } + return true +} +func (this *DomainInfo_FaultDomain) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DomainInfo_FaultDomain) + if !ok { + that2, ok := that.(DomainInfo_FaultDomain) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DomainInfo_FaultDomain") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DomainInfo_FaultDomain but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DomainInfo_FaultDomain but is not nil && this == nil") + } + if !this.Region.Equal(&that1.Region) { + return fmt.Errorf("Region this(%v) Not Equal that(%v)", this.Region, that1.Region) + } + if !this.Zone.Equal(&that1.Zone) { + return fmt.Errorf("Zone this(%v) Not Equal that(%v)", this.Zone, that1.Zone) + } + return nil +} +func (this *DomainInfo_FaultDomain) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DomainInfo_FaultDomain) + if !ok { + that2, ok := that.(DomainInfo_FaultDomain) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Region.Equal(&that1.Region) { + return false + } + if !this.Zone.Equal(&that1.Zone) { + return false + } + return true +} +func (this *DomainInfo_FaultDomain_RegionInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DomainInfo_FaultDomain_RegionInfo) + if !ok { + that2, ok := that.(DomainInfo_FaultDomain_RegionInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DomainInfo_FaultDomain_RegionInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DomainInfo_FaultDomain_RegionInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DomainInfo_FaultDomain_RegionInfo but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + return nil +} +func (this *DomainInfo_FaultDomain_RegionInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DomainInfo_FaultDomain_RegionInfo) + if !ok { + that2, ok := that.(DomainInfo_FaultDomain_RegionInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + return true +} +func (this *DomainInfo_FaultDomain_ZoneInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DomainInfo_FaultDomain_ZoneInfo) + if !ok { + that2, ok := that.(DomainInfo_FaultDomain_ZoneInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DomainInfo_FaultDomain_ZoneInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DomainInfo_FaultDomain_ZoneInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DomainInfo_FaultDomain_ZoneInfo but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + return nil +} +func (this *DomainInfo_FaultDomain_ZoneInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DomainInfo_FaultDomain_ZoneInfo) + if !ok { + that2, ok := that.(DomainInfo_FaultDomain_ZoneInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + return true +} +func (this *MasterInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MasterInfo) + if !ok { + that2, ok := that.(MasterInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MasterInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MasterInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MasterInfo but is not nil && this == nil") + } + if this.ID != that1.ID { + return fmt.Errorf("ID this(%v) Not Equal that(%v)", this.ID, that1.ID) + } + if this.IP != that1.IP { + return fmt.Errorf("IP this(%v) Not Equal that(%v)", this.IP, that1.IP) + } + if this.Port != nil && that1.Port != nil { + if *this.Port != *that1.Port { + return fmt.Errorf("Port this(%v) Not Equal that(%v)", *this.Port, *that1.Port) + } + } else if this.Port != nil { + return fmt.Errorf("this.Port == nil && that.Port != nil") + } else if that1.Port != nil { + return fmt.Errorf("Port this(%v) Not Equal that(%v)", this.Port, that1.Port) + } + if this.PID != nil && that1.PID != nil { + if *this.PID != *that1.PID { + return fmt.Errorf("PID this(%v) Not Equal that(%v)", *this.PID, *that1.PID) + } + } else if this.PID != nil { + return fmt.Errorf("this.PID == nil && that.PID != nil") + } else if that1.PID != nil { + return fmt.Errorf("PID this(%v) Not Equal that(%v)", this.PID, that1.PID) + } + if this.Hostname != nil && that1.Hostname != nil { + if *this.Hostname != *that1.Hostname { + return fmt.Errorf("Hostname this(%v) Not Equal that(%v)", *this.Hostname, *that1.Hostname) + } + } else if this.Hostname != nil { + return fmt.Errorf("this.Hostname == nil && that.Hostname != nil") + } else if that1.Hostname != nil { + return fmt.Errorf("Hostname this(%v) Not Equal that(%v)", this.Hostname, that1.Hostname) + } + if this.Version != nil && that1.Version != nil { + if *this.Version != *that1.Version { + return fmt.Errorf("Version this(%v) Not Equal that(%v)", *this.Version, *that1.Version) + } + } else if this.Version != nil { + return fmt.Errorf("this.Version == nil && that.Version != nil") + } else if that1.Version != nil { + return fmt.Errorf("Version this(%v) Not Equal that(%v)", this.Version, that1.Version) + } + if !this.Address.Equal(that1.Address) { + return fmt.Errorf("Address this(%v) Not Equal that(%v)", this.Address, that1.Address) + } + if !this.Domain.Equal(that1.Domain) { + return fmt.Errorf("Domain this(%v) Not Equal that(%v)", this.Domain, that1.Domain) + } + if len(this.Capabilities) != len(that1.Capabilities) { + return fmt.Errorf("Capabilities this(%v) Not Equal that(%v)", len(this.Capabilities), len(that1.Capabilities)) + } + for i := range this.Capabilities { + if !this.Capabilities[i].Equal(&that1.Capabilities[i]) { + return fmt.Errorf("Capabilities this[%v](%v) Not Equal that[%v](%v)", i, this.Capabilities[i], i, that1.Capabilities[i]) + } + } + return nil +} +func (this *MasterInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MasterInfo) + if !ok { + that2, ok := that.(MasterInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.ID != that1.ID { + return false + } + if this.IP != that1.IP { + return false + } + if this.Port != nil && that1.Port != nil { + if *this.Port != *that1.Port { + return false + } + } else if this.Port != nil { + return false + } else if that1.Port != nil { + return false + } + if this.PID != nil && that1.PID != nil { + if *this.PID != *that1.PID { + return false + } + } else if this.PID != nil { + return false + } else if that1.PID != nil { + return false + } + if this.Hostname != nil && that1.Hostname != nil { + if *this.Hostname != *that1.Hostname { + return false + } + } else if this.Hostname != nil { + return false + } else if that1.Hostname != nil { + return false + } + if this.Version != nil && that1.Version != nil { + if *this.Version != *that1.Version { + return false + } + } else if this.Version != nil { + return false + } else if that1.Version != nil { + return false + } + if !this.Address.Equal(that1.Address) { + return false + } + if !this.Domain.Equal(that1.Domain) { + return false + } + if len(this.Capabilities) != len(that1.Capabilities) { + return false + } + for i := range this.Capabilities { + if !this.Capabilities[i].Equal(&that1.Capabilities[i]) { + return false + } + } + return true +} +func (this *MasterInfo_Capability) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MasterInfo_Capability) + if !ok { + that2, ok := that.(MasterInfo_Capability) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MasterInfo_Capability") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MasterInfo_Capability but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MasterInfo_Capability but is not nil && this == nil") + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + return nil +} +func (this *MasterInfo_Capability) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MasterInfo_Capability) + if !ok { + that2, ok := that.(MasterInfo_Capability) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + return true +} +func (this *AgentInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AgentInfo) + if !ok { + that2, ok := that.(AgentInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AgentInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AgentInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AgentInfo but is not nil && this == nil") + } + if this.Hostname != that1.Hostname { + return fmt.Errorf("Hostname this(%v) Not Equal that(%v)", this.Hostname, that1.Hostname) + } + if this.Port != nil && that1.Port != nil { + if *this.Port != *that1.Port { + return fmt.Errorf("Port this(%v) Not Equal that(%v)", *this.Port, *that1.Port) + } + } else if this.Port != nil { + return fmt.Errorf("this.Port == nil && that.Port != nil") + } else if that1.Port != nil { + return fmt.Errorf("Port this(%v) Not Equal that(%v)", this.Port, that1.Port) + } + if len(this.Resources) != len(that1.Resources) { + return fmt.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return fmt.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) + } + } + if len(this.Attributes) != len(that1.Attributes) { + return fmt.Errorf("Attributes this(%v) Not Equal that(%v)", len(this.Attributes), len(that1.Attributes)) + } + for i := range this.Attributes { + if !this.Attributes[i].Equal(&that1.Attributes[i]) { + return fmt.Errorf("Attributes this[%v](%v) Not Equal that[%v](%v)", i, this.Attributes[i], i, that1.Attributes[i]) + } + } + if !this.ID.Equal(that1.ID) { + return fmt.Errorf("ID this(%v) Not Equal that(%v)", this.ID, that1.ID) + } + if !this.Domain.Equal(that1.Domain) { + return fmt.Errorf("Domain this(%v) Not Equal that(%v)", this.Domain, that1.Domain) + } + return nil +} +func (this *AgentInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AgentInfo) + if !ok { + that2, ok := that.(AgentInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Hostname != that1.Hostname { + return false + } + if this.Port != nil && that1.Port != nil { + if *this.Port != *that1.Port { + return false + } + } else if this.Port != nil { + return false + } else if that1.Port != nil { + return false + } + if len(this.Resources) != len(that1.Resources) { + return false + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return false + } + } + if len(this.Attributes) != len(that1.Attributes) { + return false + } + for i := range this.Attributes { + if !this.Attributes[i].Equal(&that1.Attributes[i]) { + return false + } + } + if !this.ID.Equal(that1.ID) { + return false + } + if !this.Domain.Equal(that1.Domain) { + return false + } + return true +} +func (this *AgentInfo_Capability) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*AgentInfo_Capability) + if !ok { + that2, ok := that.(AgentInfo_Capability) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *AgentInfo_Capability") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *AgentInfo_Capability but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *AgentInfo_Capability but is not nil && this == nil") + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + return nil +} +func (this *AgentInfo_Capability) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*AgentInfo_Capability) + if !ok { + that2, ok := that.(AgentInfo_Capability) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + return true +} +func (this *CSIPluginContainerInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CSIPluginContainerInfo) + if !ok { + that2, ok := that.(CSIPluginContainerInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CSIPluginContainerInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CSIPluginContainerInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CSIPluginContainerInfo but is not nil && this == nil") + } + if len(this.Services) != len(that1.Services) { + return fmt.Errorf("Services this(%v) Not Equal that(%v)", len(this.Services), len(that1.Services)) + } + for i := range this.Services { + if this.Services[i] != that1.Services[i] { + return fmt.Errorf("Services this[%v](%v) Not Equal that[%v](%v)", i, this.Services[i], i, that1.Services[i]) + } + } + if !this.Command.Equal(that1.Command) { + return fmt.Errorf("Command this(%v) Not Equal that(%v)", this.Command, that1.Command) + } + if len(this.Resources) != len(that1.Resources) { + return fmt.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return fmt.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) + } + } + if !this.Container.Equal(that1.Container) { + return fmt.Errorf("Container this(%v) Not Equal that(%v)", this.Container, that1.Container) + } + return nil +} +func (this *CSIPluginContainerInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CSIPluginContainerInfo) + if !ok { + that2, ok := that.(CSIPluginContainerInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Services) != len(that1.Services) { + return false + } + for i := range this.Services { + if this.Services[i] != that1.Services[i] { + return false + } + } + if !this.Command.Equal(that1.Command) { + return false + } + if len(this.Resources) != len(that1.Resources) { + return false + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return false + } + } + if !this.Container.Equal(that1.Container) { + return false + } + return true +} +func (this *CSIPluginInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CSIPluginInfo) + if !ok { + that2, ok := that.(CSIPluginInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CSIPluginInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CSIPluginInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CSIPluginInfo but is not nil && this == nil") + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if len(this.Containers) != len(that1.Containers) { + return fmt.Errorf("Containers this(%v) Not Equal that(%v)", len(this.Containers), len(that1.Containers)) + } + for i := range this.Containers { + if !this.Containers[i].Equal(&that1.Containers[i]) { + return fmt.Errorf("Containers this[%v](%v) Not Equal that[%v](%v)", i, this.Containers[i], i, that1.Containers[i]) + } + } + return nil +} +func (this *CSIPluginInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CSIPluginInfo) + if !ok { + that2, ok := that.(CSIPluginInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + if this.Name != that1.Name { + return false + } + if len(this.Containers) != len(that1.Containers) { + return false + } + for i := range this.Containers { + if !this.Containers[i].Equal(&that1.Containers[i]) { + return false + } + } + return true +} +func (this *ResourceProviderInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ResourceProviderInfo) + if !ok { + that2, ok := that.(ResourceProviderInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ResourceProviderInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ResourceProviderInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ResourceProviderInfo but is not nil && this == nil") + } + if !this.ID.Equal(that1.ID) { + return fmt.Errorf("ID this(%v) Not Equal that(%v)", this.ID, that1.ID) + } + if len(this.Attributes) != len(that1.Attributes) { + return fmt.Errorf("Attributes this(%v) Not Equal that(%v)", len(this.Attributes), len(that1.Attributes)) + } + for i := range this.Attributes { + if !this.Attributes[i].Equal(&that1.Attributes[i]) { + return fmt.Errorf("Attributes this[%v](%v) Not Equal that[%v](%v)", i, this.Attributes[i], i, that1.Attributes[i]) + } + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if len(this.DefaultReservations) != len(that1.DefaultReservations) { + return fmt.Errorf("DefaultReservations this(%v) Not Equal that(%v)", len(this.DefaultReservations), len(that1.DefaultReservations)) + } + for i := range this.DefaultReservations { + if !this.DefaultReservations[i].Equal(&that1.DefaultReservations[i]) { + return fmt.Errorf("DefaultReservations this[%v](%v) Not Equal that[%v](%v)", i, this.DefaultReservations[i], i, that1.DefaultReservations[i]) + } + } + if !this.Storage.Equal(that1.Storage) { + return fmt.Errorf("Storage this(%v) Not Equal that(%v)", this.Storage, that1.Storage) + } + return nil +} +func (this *ResourceProviderInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ResourceProviderInfo) + if !ok { + that2, ok := that.(ResourceProviderInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.ID.Equal(that1.ID) { + return false + } + if len(this.Attributes) != len(that1.Attributes) { + return false + } + for i := range this.Attributes { + if !this.Attributes[i].Equal(&that1.Attributes[i]) { + return false + } + } + if this.Type != that1.Type { + return false + } + if this.Name != that1.Name { + return false + } + if len(this.DefaultReservations) != len(that1.DefaultReservations) { + return false + } + for i := range this.DefaultReservations { + if !this.DefaultReservations[i].Equal(&that1.DefaultReservations[i]) { + return false + } + } + if !this.Storage.Equal(that1.Storage) { + return false + } + return true +} +func (this *ResourceProviderInfo_Storage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ResourceProviderInfo_Storage) + if !ok { + that2, ok := that.(ResourceProviderInfo_Storage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ResourceProviderInfo_Storage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ResourceProviderInfo_Storage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ResourceProviderInfo_Storage but is not nil && this == nil") + } + if !this.Plugin.Equal(&that1.Plugin) { + return fmt.Errorf("Plugin this(%v) Not Equal that(%v)", this.Plugin, that1.Plugin) + } + return nil +} +func (this *ResourceProviderInfo_Storage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ResourceProviderInfo_Storage) + if !ok { + that2, ok := that.(ResourceProviderInfo_Storage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Plugin.Equal(&that1.Plugin) { + return false + } + return true +} +func (this *Value) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Value) + if !ok { + that2, ok := that.(Value) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Value") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Value but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Value but is not nil && this == nil") + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.Scalar.Equal(that1.Scalar) { + return fmt.Errorf("Scalar this(%v) Not Equal that(%v)", this.Scalar, that1.Scalar) + } + if !this.Ranges.Equal(that1.Ranges) { + return fmt.Errorf("Ranges this(%v) Not Equal that(%v)", this.Ranges, that1.Ranges) + } + if !this.Set.Equal(that1.Set) { + return fmt.Errorf("Set this(%v) Not Equal that(%v)", this.Set, that1.Set) + } + if !this.Text.Equal(that1.Text) { + return fmt.Errorf("Text this(%v) Not Equal that(%v)", this.Text, that1.Text) + } + return nil +} +func (this *Value) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Value) + if !ok { + that2, ok := that.(Value) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + if !this.Scalar.Equal(that1.Scalar) { + return false + } + if !this.Ranges.Equal(that1.Ranges) { + return false + } + if !this.Set.Equal(that1.Set) { + return false + } + if !this.Text.Equal(that1.Text) { + return false + } + return true +} +func (this *Value_Scalar) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Value_Scalar) + if !ok { + that2, ok := that.(Value_Scalar) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Value_Scalar") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Value_Scalar but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Value_Scalar but is not nil && this == nil") + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + return nil +} +func (this *Value_Scalar) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Value_Scalar) + if !ok { + that2, ok := that.(Value_Scalar) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + return true +} +func (this *Value_Range) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Value_Range) + if !ok { + that2, ok := that.(Value_Range) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Value_Range") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Value_Range but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Value_Range but is not nil && this == nil") + } + if this.Begin != that1.Begin { + return fmt.Errorf("Begin this(%v) Not Equal that(%v)", this.Begin, that1.Begin) + } + if this.End != that1.End { + return fmt.Errorf("End this(%v) Not Equal that(%v)", this.End, that1.End) + } + return nil +} +func (this *Value_Range) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Value_Range) + if !ok { + that2, ok := that.(Value_Range) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Begin != that1.Begin { + return false + } + if this.End != that1.End { + return false + } + return true +} +func (this *Value_Ranges) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Value_Ranges) + if !ok { + that2, ok := that.(Value_Ranges) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Value_Ranges") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Value_Ranges but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Value_Ranges but is not nil && this == nil") + } + if len(this.Range) != len(that1.Range) { + return fmt.Errorf("Range this(%v) Not Equal that(%v)", len(this.Range), len(that1.Range)) + } + for i := range this.Range { + if !this.Range[i].Equal(&that1.Range[i]) { + return fmt.Errorf("Range this[%v](%v) Not Equal that[%v](%v)", i, this.Range[i], i, that1.Range[i]) + } + } + return nil +} +func (this *Value_Ranges) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Value_Ranges) + if !ok { + that2, ok := that.(Value_Ranges) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Range) != len(that1.Range) { + return false + } + for i := range this.Range { + if !this.Range[i].Equal(&that1.Range[i]) { + return false + } + } + return true +} +func (this *Value_Set) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Value_Set) + if !ok { + that2, ok := that.(Value_Set) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Value_Set") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Value_Set but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Value_Set but is not nil && this == nil") + } + if len(this.Item) != len(that1.Item) { + return fmt.Errorf("Item this(%v) Not Equal that(%v)", len(this.Item), len(that1.Item)) + } + for i := range this.Item { + if this.Item[i] != that1.Item[i] { + return fmt.Errorf("Item this[%v](%v) Not Equal that[%v](%v)", i, this.Item[i], i, that1.Item[i]) + } + } + return nil +} +func (this *Value_Set) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Value_Set) + if !ok { + that2, ok := that.(Value_Set) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Item) != len(that1.Item) { + return false + } + for i := range this.Item { + if this.Item[i] != that1.Item[i] { + return false + } + } + return true +} +func (this *Value_Text) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Value_Text) + if !ok { + that2, ok := that.(Value_Text) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Value_Text") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Value_Text but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Value_Text but is not nil && this == nil") + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + return nil +} +func (this *Value_Text) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Value_Text) + if !ok { + that2, ok := that.(Value_Text) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Value != that1.Value { + return false + } + return true +} +func (this *Attribute) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Attribute) + if !ok { + that2, ok := that.(Attribute) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Attribute") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Attribute but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Attribute but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.Scalar.Equal(that1.Scalar) { + return fmt.Errorf("Scalar this(%v) Not Equal that(%v)", this.Scalar, that1.Scalar) + } + if !this.Ranges.Equal(that1.Ranges) { + return fmt.Errorf("Ranges this(%v) Not Equal that(%v)", this.Ranges, that1.Ranges) + } + if !this.Set.Equal(that1.Set) { + return fmt.Errorf("Set this(%v) Not Equal that(%v)", this.Set, that1.Set) + } + if !this.Text.Equal(that1.Text) { + return fmt.Errorf("Text this(%v) Not Equal that(%v)", this.Text, that1.Text) + } + return nil +} +func (this *Attribute) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Attribute) + if !ok { + that2, ok := that.(Attribute) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Type != that1.Type { + return false + } + if !this.Scalar.Equal(that1.Scalar) { + return false + } + if !this.Ranges.Equal(that1.Ranges) { + return false + } + if !this.Set.Equal(that1.Set) { + return false + } + if !this.Text.Equal(that1.Text) { + return false + } + return true +} +func (this *Resource) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Resource) + if !ok { + that2, ok := that.(Resource) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Resource") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Resource but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Resource but is not nil && this == nil") + } + if !this.ProviderID.Equal(that1.ProviderID) { + return fmt.Errorf("ProviderID this(%v) Not Equal that(%v)", this.ProviderID, that1.ProviderID) + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) + } + } else if this.Type != nil { + return fmt.Errorf("this.Type == nil && that.Type != nil") + } else if that1.Type != nil { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.Scalar.Equal(that1.Scalar) { + return fmt.Errorf("Scalar this(%v) Not Equal that(%v)", this.Scalar, that1.Scalar) + } + if !this.Ranges.Equal(that1.Ranges) { + return fmt.Errorf("Ranges this(%v) Not Equal that(%v)", this.Ranges, that1.Ranges) + } + if !this.Set.Equal(that1.Set) { + return fmt.Errorf("Set this(%v) Not Equal that(%v)", this.Set, that1.Set) + } + if this.Role != nil && that1.Role != nil { + if *this.Role != *that1.Role { + return fmt.Errorf("Role this(%v) Not Equal that(%v)", *this.Role, *that1.Role) + } + } else if this.Role != nil { + return fmt.Errorf("this.Role == nil && that.Role != nil") + } else if that1.Role != nil { + return fmt.Errorf("Role this(%v) Not Equal that(%v)", this.Role, that1.Role) + } + if !this.AllocationInfo.Equal(that1.AllocationInfo) { + return fmt.Errorf("AllocationInfo this(%v) Not Equal that(%v)", this.AllocationInfo, that1.AllocationInfo) + } + if !this.Reservation.Equal(that1.Reservation) { + return fmt.Errorf("Reservation this(%v) Not Equal that(%v)", this.Reservation, that1.Reservation) + } + if len(this.Reservations) != len(that1.Reservations) { + return fmt.Errorf("Reservations this(%v) Not Equal that(%v)", len(this.Reservations), len(that1.Reservations)) + } + for i := range this.Reservations { + if !this.Reservations[i].Equal(&that1.Reservations[i]) { + return fmt.Errorf("Reservations this[%v](%v) Not Equal that[%v](%v)", i, this.Reservations[i], i, that1.Reservations[i]) + } + } + if !this.Disk.Equal(that1.Disk) { + return fmt.Errorf("Disk this(%v) Not Equal that(%v)", this.Disk, that1.Disk) + } + if !this.Revocable.Equal(that1.Revocable) { + return fmt.Errorf("Revocable this(%v) Not Equal that(%v)", this.Revocable, that1.Revocable) + } + if !this.Shared.Equal(that1.Shared) { + return fmt.Errorf("Shared this(%v) Not Equal that(%v)", this.Shared, that1.Shared) + } + return nil +} +func (this *Resource) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Resource) + if !ok { + that2, ok := that.(Resource) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.ProviderID.Equal(that1.ProviderID) { + return false + } + if this.Name != that1.Name { + return false + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return false + } + } else if this.Type != nil { + return false + } else if that1.Type != nil { + return false + } + if !this.Scalar.Equal(that1.Scalar) { + return false + } + if !this.Ranges.Equal(that1.Ranges) { + return false + } + if !this.Set.Equal(that1.Set) { + return false + } + if this.Role != nil && that1.Role != nil { + if *this.Role != *that1.Role { + return false + } + } else if this.Role != nil { + return false + } else if that1.Role != nil { + return false + } + if !this.AllocationInfo.Equal(that1.AllocationInfo) { + return false + } + if !this.Reservation.Equal(that1.Reservation) { + return false + } + if len(this.Reservations) != len(that1.Reservations) { + return false + } + for i := range this.Reservations { + if !this.Reservations[i].Equal(&that1.Reservations[i]) { + return false + } + } + if !this.Disk.Equal(that1.Disk) { + return false + } + if !this.Revocable.Equal(that1.Revocable) { + return false + } + if !this.Shared.Equal(that1.Shared) { + return false + } + return true +} +func (this *Resource_AllocationInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Resource_AllocationInfo) + if !ok { + that2, ok := that.(Resource_AllocationInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Resource_AllocationInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Resource_AllocationInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Resource_AllocationInfo but is not nil && this == nil") + } + if this.Role != nil && that1.Role != nil { + if *this.Role != *that1.Role { + return fmt.Errorf("Role this(%v) Not Equal that(%v)", *this.Role, *that1.Role) + } + } else if this.Role != nil { + return fmt.Errorf("this.Role == nil && that.Role != nil") + } else if that1.Role != nil { + return fmt.Errorf("Role this(%v) Not Equal that(%v)", this.Role, that1.Role) + } + return nil +} +func (this *Resource_AllocationInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Resource_AllocationInfo) + if !ok { + that2, ok := that.(Resource_AllocationInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Role != nil && that1.Role != nil { + if *this.Role != *that1.Role { + return false + } + } else if this.Role != nil { + return false + } else if that1.Role != nil { + return false + } + return true +} +func (this *Resource_ReservationInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Resource_ReservationInfo) + if !ok { + that2, ok := that.(Resource_ReservationInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Resource_ReservationInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Resource_ReservationInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Resource_ReservationInfo but is not nil && this == nil") + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) + } + } else if this.Type != nil { + return fmt.Errorf("this.Type == nil && that.Type != nil") + } else if that1.Type != nil { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if this.Role != nil && that1.Role != nil { + if *this.Role != *that1.Role { + return fmt.Errorf("Role this(%v) Not Equal that(%v)", *this.Role, *that1.Role) + } + } else if this.Role != nil { + return fmt.Errorf("this.Role == nil && that.Role != nil") + } else if that1.Role != nil { + return fmt.Errorf("Role this(%v) Not Equal that(%v)", this.Role, that1.Role) + } + if this.Principal != nil && that1.Principal != nil { + if *this.Principal != *that1.Principal { + return fmt.Errorf("Principal this(%v) Not Equal that(%v)", *this.Principal, *that1.Principal) + } + } else if this.Principal != nil { + return fmt.Errorf("this.Principal == nil && that.Principal != nil") + } else if that1.Principal != nil { + return fmt.Errorf("Principal this(%v) Not Equal that(%v)", this.Principal, that1.Principal) + } + if !this.Labels.Equal(that1.Labels) { + return fmt.Errorf("Labels this(%v) Not Equal that(%v)", this.Labels, that1.Labels) + } + return nil +} +func (this *Resource_ReservationInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Resource_ReservationInfo) + if !ok { + that2, ok := that.(Resource_ReservationInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return false + } + } else if this.Type != nil { + return false + } else if that1.Type != nil { + return false + } + if this.Role != nil && that1.Role != nil { + if *this.Role != *that1.Role { + return false + } + } else if this.Role != nil { + return false + } else if that1.Role != nil { + return false + } + if this.Principal != nil && that1.Principal != nil { + if *this.Principal != *that1.Principal { + return false + } + } else if this.Principal != nil { + return false + } else if that1.Principal != nil { + return false + } + if !this.Labels.Equal(that1.Labels) { + return false + } + return true +} +func (this *Resource_DiskInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Resource_DiskInfo) + if !ok { + that2, ok := that.(Resource_DiskInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Resource_DiskInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Resource_DiskInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Resource_DiskInfo but is not nil && this == nil") + } + if !this.Persistence.Equal(that1.Persistence) { + return fmt.Errorf("Persistence this(%v) Not Equal that(%v)", this.Persistence, that1.Persistence) + } + if !this.Volume.Equal(that1.Volume) { + return fmt.Errorf("Volume this(%v) Not Equal that(%v)", this.Volume, that1.Volume) + } + if !this.Source.Equal(that1.Source) { + return fmt.Errorf("Source this(%v) Not Equal that(%v)", this.Source, that1.Source) + } + return nil +} +func (this *Resource_DiskInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Resource_DiskInfo) + if !ok { + that2, ok := that.(Resource_DiskInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Persistence.Equal(that1.Persistence) { + return false + } + if !this.Volume.Equal(that1.Volume) { + return false + } + if !this.Source.Equal(that1.Source) { + return false + } + return true +} +func (this *Resource_DiskInfo_Persistence) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Resource_DiskInfo_Persistence) + if !ok { + that2, ok := that.(Resource_DiskInfo_Persistence) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Resource_DiskInfo_Persistence") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Resource_DiskInfo_Persistence but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Resource_DiskInfo_Persistence but is not nil && this == nil") + } + if this.ID != that1.ID { + return fmt.Errorf("ID this(%v) Not Equal that(%v)", this.ID, that1.ID) + } + if this.Principal != nil && that1.Principal != nil { + if *this.Principal != *that1.Principal { + return fmt.Errorf("Principal this(%v) Not Equal that(%v)", *this.Principal, *that1.Principal) + } + } else if this.Principal != nil { + return fmt.Errorf("this.Principal == nil && that.Principal != nil") + } else if that1.Principal != nil { + return fmt.Errorf("Principal this(%v) Not Equal that(%v)", this.Principal, that1.Principal) + } + return nil +} +func (this *Resource_DiskInfo_Persistence) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Resource_DiskInfo_Persistence) + if !ok { + that2, ok := that.(Resource_DiskInfo_Persistence) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.ID != that1.ID { + return false + } + if this.Principal != nil && that1.Principal != nil { + if *this.Principal != *that1.Principal { + return false + } + } else if this.Principal != nil { + return false + } else if that1.Principal != nil { + return false + } + return true +} +func (this *Resource_DiskInfo_Source) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Resource_DiskInfo_Source) + if !ok { + that2, ok := that.(Resource_DiskInfo_Source) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Resource_DiskInfo_Source") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Resource_DiskInfo_Source but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Resource_DiskInfo_Source but is not nil && this == nil") + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.Path.Equal(that1.Path) { + return fmt.Errorf("Path this(%v) Not Equal that(%v)", this.Path, that1.Path) + } + if !this.Mount.Equal(that1.Mount) { + return fmt.Errorf("Mount this(%v) Not Equal that(%v)", this.Mount, that1.Mount) + } + if this.ID != nil && that1.ID != nil { + if *this.ID != *that1.ID { + return fmt.Errorf("ID this(%v) Not Equal that(%v)", *this.ID, *that1.ID) + } + } else if this.ID != nil { + return fmt.Errorf("this.ID == nil && that.ID != nil") + } else if that1.ID != nil { + return fmt.Errorf("ID this(%v) Not Equal that(%v)", this.ID, that1.ID) + } + if !this.Metadata.Equal(that1.Metadata) { + return fmt.Errorf("Metadata this(%v) Not Equal that(%v)", this.Metadata, that1.Metadata) + } + if this.Profile != nil && that1.Profile != nil { + if *this.Profile != *that1.Profile { + return fmt.Errorf("Profile this(%v) Not Equal that(%v)", *this.Profile, *that1.Profile) + } + } else if this.Profile != nil { + return fmt.Errorf("this.Profile == nil && that.Profile != nil") + } else if that1.Profile != nil { + return fmt.Errorf("Profile this(%v) Not Equal that(%v)", this.Profile, that1.Profile) + } + return nil +} +func (this *Resource_DiskInfo_Source) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Resource_DiskInfo_Source) + if !ok { + that2, ok := that.(Resource_DiskInfo_Source) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + if !this.Path.Equal(that1.Path) { + return false + } + if !this.Mount.Equal(that1.Mount) { + return false + } + if this.ID != nil && that1.ID != nil { + if *this.ID != *that1.ID { + return false + } + } else if this.ID != nil { + return false + } else if that1.ID != nil { + return false + } + if !this.Metadata.Equal(that1.Metadata) { + return false + } + if this.Profile != nil && that1.Profile != nil { + if *this.Profile != *that1.Profile { + return false + } + } else if this.Profile != nil { + return false + } else if that1.Profile != nil { + return false + } + return true +} +func (this *Resource_DiskInfo_Source_Path) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Resource_DiskInfo_Source_Path) + if !ok { + that2, ok := that.(Resource_DiskInfo_Source_Path) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Resource_DiskInfo_Source_Path") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Resource_DiskInfo_Source_Path but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Resource_DiskInfo_Source_Path but is not nil && this == nil") + } + if this.Root != nil && that1.Root != nil { + if *this.Root != *that1.Root { + return fmt.Errorf("Root this(%v) Not Equal that(%v)", *this.Root, *that1.Root) + } + } else if this.Root != nil { + return fmt.Errorf("this.Root == nil && that.Root != nil") + } else if that1.Root != nil { + return fmt.Errorf("Root this(%v) Not Equal that(%v)", this.Root, that1.Root) + } + return nil +} +func (this *Resource_DiskInfo_Source_Path) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Resource_DiskInfo_Source_Path) + if !ok { + that2, ok := that.(Resource_DiskInfo_Source_Path) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Root != nil && that1.Root != nil { + if *this.Root != *that1.Root { + return false + } + } else if this.Root != nil { + return false + } else if that1.Root != nil { + return false + } + return true +} +func (this *Resource_DiskInfo_Source_Mount) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Resource_DiskInfo_Source_Mount) + if !ok { + that2, ok := that.(Resource_DiskInfo_Source_Mount) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Resource_DiskInfo_Source_Mount") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Resource_DiskInfo_Source_Mount but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Resource_DiskInfo_Source_Mount but is not nil && this == nil") + } + if this.Root != nil && that1.Root != nil { + if *this.Root != *that1.Root { + return fmt.Errorf("Root this(%v) Not Equal that(%v)", *this.Root, *that1.Root) + } + } else if this.Root != nil { + return fmt.Errorf("this.Root == nil && that.Root != nil") + } else if that1.Root != nil { + return fmt.Errorf("Root this(%v) Not Equal that(%v)", this.Root, that1.Root) + } + return nil +} +func (this *Resource_DiskInfo_Source_Mount) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Resource_DiskInfo_Source_Mount) + if !ok { + that2, ok := that.(Resource_DiskInfo_Source_Mount) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Root != nil && that1.Root != nil { + if *this.Root != *that1.Root { + return false + } + } else if this.Root != nil { + return false + } else if that1.Root != nil { + return false + } + return true +} +func (this *Resource_RevocableInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Resource_RevocableInfo) + if !ok { + that2, ok := that.(Resource_RevocableInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Resource_RevocableInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Resource_RevocableInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Resource_RevocableInfo but is not nil && this == nil") + } + return nil +} +func (this *Resource_RevocableInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Resource_RevocableInfo) + if !ok { + that2, ok := that.(Resource_RevocableInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + return true +} +func (this *Resource_SharedInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Resource_SharedInfo) + if !ok { + that2, ok := that.(Resource_SharedInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Resource_SharedInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Resource_SharedInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Resource_SharedInfo but is not nil && this == nil") + } + return nil +} +func (this *Resource_SharedInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Resource_SharedInfo) + if !ok { + that2, ok := that.(Resource_SharedInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + return true +} +func (this *TrafficControlStatistics) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TrafficControlStatistics) + if !ok { + that2, ok := that.(TrafficControlStatistics) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TrafficControlStatistics") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TrafficControlStatistics but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TrafficControlStatistics but is not nil && this == nil") + } + if this.ID != that1.ID { + return fmt.Errorf("ID this(%v) Not Equal that(%v)", this.ID, that1.ID) + } + if this.Backlog != nil && that1.Backlog != nil { + if *this.Backlog != *that1.Backlog { + return fmt.Errorf("Backlog this(%v) Not Equal that(%v)", *this.Backlog, *that1.Backlog) + } + } else if this.Backlog != nil { + return fmt.Errorf("this.Backlog == nil && that.Backlog != nil") + } else if that1.Backlog != nil { + return fmt.Errorf("Backlog this(%v) Not Equal that(%v)", this.Backlog, that1.Backlog) + } + if this.Bytes != nil && that1.Bytes != nil { + if *this.Bytes != *that1.Bytes { + return fmt.Errorf("Bytes this(%v) Not Equal that(%v)", *this.Bytes, *that1.Bytes) + } + } else if this.Bytes != nil { + return fmt.Errorf("this.Bytes == nil && that.Bytes != nil") + } else if that1.Bytes != nil { + return fmt.Errorf("Bytes this(%v) Not Equal that(%v)", this.Bytes, that1.Bytes) + } + if this.Drops != nil && that1.Drops != nil { + if *this.Drops != *that1.Drops { + return fmt.Errorf("Drops this(%v) Not Equal that(%v)", *this.Drops, *that1.Drops) + } + } else if this.Drops != nil { + return fmt.Errorf("this.Drops == nil && that.Drops != nil") + } else if that1.Drops != nil { + return fmt.Errorf("Drops this(%v) Not Equal that(%v)", this.Drops, that1.Drops) + } + if this.Overlimits != nil && that1.Overlimits != nil { + if *this.Overlimits != *that1.Overlimits { + return fmt.Errorf("Overlimits this(%v) Not Equal that(%v)", *this.Overlimits, *that1.Overlimits) + } + } else if this.Overlimits != nil { + return fmt.Errorf("this.Overlimits == nil && that.Overlimits != nil") + } else if that1.Overlimits != nil { + return fmt.Errorf("Overlimits this(%v) Not Equal that(%v)", this.Overlimits, that1.Overlimits) + } + if this.Packets != nil && that1.Packets != nil { + if *this.Packets != *that1.Packets { + return fmt.Errorf("Packets this(%v) Not Equal that(%v)", *this.Packets, *that1.Packets) + } + } else if this.Packets != nil { + return fmt.Errorf("this.Packets == nil && that.Packets != nil") + } else if that1.Packets != nil { + return fmt.Errorf("Packets this(%v) Not Equal that(%v)", this.Packets, that1.Packets) + } + if this.Qlen != nil && that1.Qlen != nil { + if *this.Qlen != *that1.Qlen { + return fmt.Errorf("Qlen this(%v) Not Equal that(%v)", *this.Qlen, *that1.Qlen) + } + } else if this.Qlen != nil { + return fmt.Errorf("this.Qlen == nil && that.Qlen != nil") + } else if that1.Qlen != nil { + return fmt.Errorf("Qlen this(%v) Not Equal that(%v)", this.Qlen, that1.Qlen) + } + if this.RateBPS != nil && that1.RateBPS != nil { + if *this.RateBPS != *that1.RateBPS { + return fmt.Errorf("RateBPS this(%v) Not Equal that(%v)", *this.RateBPS, *that1.RateBPS) + } + } else if this.RateBPS != nil { + return fmt.Errorf("this.RateBPS == nil && that.RateBPS != nil") + } else if that1.RateBPS != nil { + return fmt.Errorf("RateBPS this(%v) Not Equal that(%v)", this.RateBPS, that1.RateBPS) + } + if this.RatePPS != nil && that1.RatePPS != nil { + if *this.RatePPS != *that1.RatePPS { + return fmt.Errorf("RatePPS this(%v) Not Equal that(%v)", *this.RatePPS, *that1.RatePPS) + } + } else if this.RatePPS != nil { + return fmt.Errorf("this.RatePPS == nil && that.RatePPS != nil") + } else if that1.RatePPS != nil { + return fmt.Errorf("RatePPS this(%v) Not Equal that(%v)", this.RatePPS, that1.RatePPS) + } + if this.Requeues != nil && that1.Requeues != nil { + if *this.Requeues != *that1.Requeues { + return fmt.Errorf("Requeues this(%v) Not Equal that(%v)", *this.Requeues, *that1.Requeues) + } + } else if this.Requeues != nil { + return fmt.Errorf("this.Requeues == nil && that.Requeues != nil") + } else if that1.Requeues != nil { + return fmt.Errorf("Requeues this(%v) Not Equal that(%v)", this.Requeues, that1.Requeues) + } + return nil +} +func (this *TrafficControlStatistics) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TrafficControlStatistics) + if !ok { + that2, ok := that.(TrafficControlStatistics) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.ID != that1.ID { + return false + } + if this.Backlog != nil && that1.Backlog != nil { + if *this.Backlog != *that1.Backlog { + return false + } + } else if this.Backlog != nil { + return false + } else if that1.Backlog != nil { + return false + } + if this.Bytes != nil && that1.Bytes != nil { + if *this.Bytes != *that1.Bytes { + return false + } + } else if this.Bytes != nil { + return false + } else if that1.Bytes != nil { + return false + } + if this.Drops != nil && that1.Drops != nil { + if *this.Drops != *that1.Drops { + return false + } + } else if this.Drops != nil { + return false + } else if that1.Drops != nil { + return false + } + if this.Overlimits != nil && that1.Overlimits != nil { + if *this.Overlimits != *that1.Overlimits { + return false + } + } else if this.Overlimits != nil { + return false + } else if that1.Overlimits != nil { + return false + } + if this.Packets != nil && that1.Packets != nil { + if *this.Packets != *that1.Packets { + return false + } + } else if this.Packets != nil { + return false + } else if that1.Packets != nil { + return false + } + if this.Qlen != nil && that1.Qlen != nil { + if *this.Qlen != *that1.Qlen { + return false + } + } else if this.Qlen != nil { + return false + } else if that1.Qlen != nil { + return false + } + if this.RateBPS != nil && that1.RateBPS != nil { + if *this.RateBPS != *that1.RateBPS { + return false + } + } else if this.RateBPS != nil { + return false + } else if that1.RateBPS != nil { + return false + } + if this.RatePPS != nil && that1.RatePPS != nil { + if *this.RatePPS != *that1.RatePPS { + return false + } + } else if this.RatePPS != nil { + return false + } else if that1.RatePPS != nil { + return false + } + if this.Requeues != nil && that1.Requeues != nil { + if *this.Requeues != *that1.Requeues { + return false + } + } else if this.Requeues != nil { + return false + } else if that1.Requeues != nil { + return false + } + return true +} +func (this *IpStatistics) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*IpStatistics) + if !ok { + that2, ok := that.(IpStatistics) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *IpStatistics") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *IpStatistics but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *IpStatistics but is not nil && this == nil") + } + if this.Forwarding != nil && that1.Forwarding != nil { + if *this.Forwarding != *that1.Forwarding { + return fmt.Errorf("Forwarding this(%v) Not Equal that(%v)", *this.Forwarding, *that1.Forwarding) + } + } else if this.Forwarding != nil { + return fmt.Errorf("this.Forwarding == nil && that.Forwarding != nil") + } else if that1.Forwarding != nil { + return fmt.Errorf("Forwarding this(%v) Not Equal that(%v)", this.Forwarding, that1.Forwarding) + } + if this.DefaultTTL != nil && that1.DefaultTTL != nil { + if *this.DefaultTTL != *that1.DefaultTTL { + return fmt.Errorf("DefaultTTL this(%v) Not Equal that(%v)", *this.DefaultTTL, *that1.DefaultTTL) + } + } else if this.DefaultTTL != nil { + return fmt.Errorf("this.DefaultTTL == nil && that.DefaultTTL != nil") + } else if that1.DefaultTTL != nil { + return fmt.Errorf("DefaultTTL this(%v) Not Equal that(%v)", this.DefaultTTL, that1.DefaultTTL) + } + if this.InReceives != nil && that1.InReceives != nil { + if *this.InReceives != *that1.InReceives { + return fmt.Errorf("InReceives this(%v) Not Equal that(%v)", *this.InReceives, *that1.InReceives) + } + } else if this.InReceives != nil { + return fmt.Errorf("this.InReceives == nil && that.InReceives != nil") + } else if that1.InReceives != nil { + return fmt.Errorf("InReceives this(%v) Not Equal that(%v)", this.InReceives, that1.InReceives) + } + if this.InHdrErrors != nil && that1.InHdrErrors != nil { + if *this.InHdrErrors != *that1.InHdrErrors { + return fmt.Errorf("InHdrErrors this(%v) Not Equal that(%v)", *this.InHdrErrors, *that1.InHdrErrors) + } + } else if this.InHdrErrors != nil { + return fmt.Errorf("this.InHdrErrors == nil && that.InHdrErrors != nil") + } else if that1.InHdrErrors != nil { + return fmt.Errorf("InHdrErrors this(%v) Not Equal that(%v)", this.InHdrErrors, that1.InHdrErrors) + } + if this.InAddrErrors != nil && that1.InAddrErrors != nil { + if *this.InAddrErrors != *that1.InAddrErrors { + return fmt.Errorf("InAddrErrors this(%v) Not Equal that(%v)", *this.InAddrErrors, *that1.InAddrErrors) + } + } else if this.InAddrErrors != nil { + return fmt.Errorf("this.InAddrErrors == nil && that.InAddrErrors != nil") + } else if that1.InAddrErrors != nil { + return fmt.Errorf("InAddrErrors this(%v) Not Equal that(%v)", this.InAddrErrors, that1.InAddrErrors) + } + if this.ForwDatagrams != nil && that1.ForwDatagrams != nil { + if *this.ForwDatagrams != *that1.ForwDatagrams { + return fmt.Errorf("ForwDatagrams this(%v) Not Equal that(%v)", *this.ForwDatagrams, *that1.ForwDatagrams) + } + } else if this.ForwDatagrams != nil { + return fmt.Errorf("this.ForwDatagrams == nil && that.ForwDatagrams != nil") + } else if that1.ForwDatagrams != nil { + return fmt.Errorf("ForwDatagrams this(%v) Not Equal that(%v)", this.ForwDatagrams, that1.ForwDatagrams) + } + if this.InUnknownProtos != nil && that1.InUnknownProtos != nil { + if *this.InUnknownProtos != *that1.InUnknownProtos { + return fmt.Errorf("InUnknownProtos this(%v) Not Equal that(%v)", *this.InUnknownProtos, *that1.InUnknownProtos) + } + } else if this.InUnknownProtos != nil { + return fmt.Errorf("this.InUnknownProtos == nil && that.InUnknownProtos != nil") + } else if that1.InUnknownProtos != nil { + return fmt.Errorf("InUnknownProtos this(%v) Not Equal that(%v)", this.InUnknownProtos, that1.InUnknownProtos) + } + if this.InDiscards != nil && that1.InDiscards != nil { + if *this.InDiscards != *that1.InDiscards { + return fmt.Errorf("InDiscards this(%v) Not Equal that(%v)", *this.InDiscards, *that1.InDiscards) + } + } else if this.InDiscards != nil { + return fmt.Errorf("this.InDiscards == nil && that.InDiscards != nil") + } else if that1.InDiscards != nil { + return fmt.Errorf("InDiscards this(%v) Not Equal that(%v)", this.InDiscards, that1.InDiscards) + } + if this.InDelivers != nil && that1.InDelivers != nil { + if *this.InDelivers != *that1.InDelivers { + return fmt.Errorf("InDelivers this(%v) Not Equal that(%v)", *this.InDelivers, *that1.InDelivers) + } + } else if this.InDelivers != nil { + return fmt.Errorf("this.InDelivers == nil && that.InDelivers != nil") + } else if that1.InDelivers != nil { + return fmt.Errorf("InDelivers this(%v) Not Equal that(%v)", this.InDelivers, that1.InDelivers) + } + if this.OutRequests != nil && that1.OutRequests != nil { + if *this.OutRequests != *that1.OutRequests { + return fmt.Errorf("OutRequests this(%v) Not Equal that(%v)", *this.OutRequests, *that1.OutRequests) + } + } else if this.OutRequests != nil { + return fmt.Errorf("this.OutRequests == nil && that.OutRequests != nil") + } else if that1.OutRequests != nil { + return fmt.Errorf("OutRequests this(%v) Not Equal that(%v)", this.OutRequests, that1.OutRequests) + } + if this.OutDiscards != nil && that1.OutDiscards != nil { + if *this.OutDiscards != *that1.OutDiscards { + return fmt.Errorf("OutDiscards this(%v) Not Equal that(%v)", *this.OutDiscards, *that1.OutDiscards) + } + } else if this.OutDiscards != nil { + return fmt.Errorf("this.OutDiscards == nil && that.OutDiscards != nil") + } else if that1.OutDiscards != nil { + return fmt.Errorf("OutDiscards this(%v) Not Equal that(%v)", this.OutDiscards, that1.OutDiscards) + } + if this.OutNoRoutes != nil && that1.OutNoRoutes != nil { + if *this.OutNoRoutes != *that1.OutNoRoutes { + return fmt.Errorf("OutNoRoutes this(%v) Not Equal that(%v)", *this.OutNoRoutes, *that1.OutNoRoutes) + } + } else if this.OutNoRoutes != nil { + return fmt.Errorf("this.OutNoRoutes == nil && that.OutNoRoutes != nil") + } else if that1.OutNoRoutes != nil { + return fmt.Errorf("OutNoRoutes this(%v) Not Equal that(%v)", this.OutNoRoutes, that1.OutNoRoutes) + } + if this.ReasmTimeout != nil && that1.ReasmTimeout != nil { + if *this.ReasmTimeout != *that1.ReasmTimeout { + return fmt.Errorf("ReasmTimeout this(%v) Not Equal that(%v)", *this.ReasmTimeout, *that1.ReasmTimeout) + } + } else if this.ReasmTimeout != nil { + return fmt.Errorf("this.ReasmTimeout == nil && that.ReasmTimeout != nil") + } else if that1.ReasmTimeout != nil { + return fmt.Errorf("ReasmTimeout this(%v) Not Equal that(%v)", this.ReasmTimeout, that1.ReasmTimeout) + } + if this.ReasmReqds != nil && that1.ReasmReqds != nil { + if *this.ReasmReqds != *that1.ReasmReqds { + return fmt.Errorf("ReasmReqds this(%v) Not Equal that(%v)", *this.ReasmReqds, *that1.ReasmReqds) + } + } else if this.ReasmReqds != nil { + return fmt.Errorf("this.ReasmReqds == nil && that.ReasmReqds != nil") + } else if that1.ReasmReqds != nil { + return fmt.Errorf("ReasmReqds this(%v) Not Equal that(%v)", this.ReasmReqds, that1.ReasmReqds) + } + if this.ReasmOKs != nil && that1.ReasmOKs != nil { + if *this.ReasmOKs != *that1.ReasmOKs { + return fmt.Errorf("ReasmOKs this(%v) Not Equal that(%v)", *this.ReasmOKs, *that1.ReasmOKs) + } + } else if this.ReasmOKs != nil { + return fmt.Errorf("this.ReasmOKs == nil && that.ReasmOKs != nil") + } else if that1.ReasmOKs != nil { + return fmt.Errorf("ReasmOKs this(%v) Not Equal that(%v)", this.ReasmOKs, that1.ReasmOKs) + } + if this.ReasmFails != nil && that1.ReasmFails != nil { + if *this.ReasmFails != *that1.ReasmFails { + return fmt.Errorf("ReasmFails this(%v) Not Equal that(%v)", *this.ReasmFails, *that1.ReasmFails) + } + } else if this.ReasmFails != nil { + return fmt.Errorf("this.ReasmFails == nil && that.ReasmFails != nil") + } else if that1.ReasmFails != nil { + return fmt.Errorf("ReasmFails this(%v) Not Equal that(%v)", this.ReasmFails, that1.ReasmFails) + } + if this.FragOKs != nil && that1.FragOKs != nil { + if *this.FragOKs != *that1.FragOKs { + return fmt.Errorf("FragOKs this(%v) Not Equal that(%v)", *this.FragOKs, *that1.FragOKs) + } + } else if this.FragOKs != nil { + return fmt.Errorf("this.FragOKs == nil && that.FragOKs != nil") + } else if that1.FragOKs != nil { + return fmt.Errorf("FragOKs this(%v) Not Equal that(%v)", this.FragOKs, that1.FragOKs) + } + if this.FragFails != nil && that1.FragFails != nil { + if *this.FragFails != *that1.FragFails { + return fmt.Errorf("FragFails this(%v) Not Equal that(%v)", *this.FragFails, *that1.FragFails) + } + } else if this.FragFails != nil { + return fmt.Errorf("this.FragFails == nil && that.FragFails != nil") + } else if that1.FragFails != nil { + return fmt.Errorf("FragFails this(%v) Not Equal that(%v)", this.FragFails, that1.FragFails) + } + if this.FragCreates != nil && that1.FragCreates != nil { + if *this.FragCreates != *that1.FragCreates { + return fmt.Errorf("FragCreates this(%v) Not Equal that(%v)", *this.FragCreates, *that1.FragCreates) + } + } else if this.FragCreates != nil { + return fmt.Errorf("this.FragCreates == nil && that.FragCreates != nil") + } else if that1.FragCreates != nil { + return fmt.Errorf("FragCreates this(%v) Not Equal that(%v)", this.FragCreates, that1.FragCreates) + } + return nil +} +func (this *IpStatistics) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*IpStatistics) + if !ok { + that2, ok := that.(IpStatistics) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Forwarding != nil && that1.Forwarding != nil { + if *this.Forwarding != *that1.Forwarding { + return false + } + } else if this.Forwarding != nil { + return false + } else if that1.Forwarding != nil { + return false + } + if this.DefaultTTL != nil && that1.DefaultTTL != nil { + if *this.DefaultTTL != *that1.DefaultTTL { + return false + } + } else if this.DefaultTTL != nil { + return false + } else if that1.DefaultTTL != nil { + return false + } + if this.InReceives != nil && that1.InReceives != nil { + if *this.InReceives != *that1.InReceives { + return false + } + } else if this.InReceives != nil { + return false + } else if that1.InReceives != nil { + return false + } + if this.InHdrErrors != nil && that1.InHdrErrors != nil { + if *this.InHdrErrors != *that1.InHdrErrors { + return false + } + } else if this.InHdrErrors != nil { + return false + } else if that1.InHdrErrors != nil { + return false + } + if this.InAddrErrors != nil && that1.InAddrErrors != nil { + if *this.InAddrErrors != *that1.InAddrErrors { + return false + } + } else if this.InAddrErrors != nil { + return false + } else if that1.InAddrErrors != nil { + return false + } + if this.ForwDatagrams != nil && that1.ForwDatagrams != nil { + if *this.ForwDatagrams != *that1.ForwDatagrams { + return false + } + } else if this.ForwDatagrams != nil { + return false + } else if that1.ForwDatagrams != nil { + return false + } + if this.InUnknownProtos != nil && that1.InUnknownProtos != nil { + if *this.InUnknownProtos != *that1.InUnknownProtos { + return false + } + } else if this.InUnknownProtos != nil { + return false + } else if that1.InUnknownProtos != nil { + return false + } + if this.InDiscards != nil && that1.InDiscards != nil { + if *this.InDiscards != *that1.InDiscards { + return false + } + } else if this.InDiscards != nil { + return false + } else if that1.InDiscards != nil { + return false + } + if this.InDelivers != nil && that1.InDelivers != nil { + if *this.InDelivers != *that1.InDelivers { + return false + } + } else if this.InDelivers != nil { + return false + } else if that1.InDelivers != nil { + return false + } + if this.OutRequests != nil && that1.OutRequests != nil { + if *this.OutRequests != *that1.OutRequests { + return false + } + } else if this.OutRequests != nil { + return false + } else if that1.OutRequests != nil { + return false + } + if this.OutDiscards != nil && that1.OutDiscards != nil { + if *this.OutDiscards != *that1.OutDiscards { + return false + } + } else if this.OutDiscards != nil { + return false + } else if that1.OutDiscards != nil { + return false + } + if this.OutNoRoutes != nil && that1.OutNoRoutes != nil { + if *this.OutNoRoutes != *that1.OutNoRoutes { + return false + } + } else if this.OutNoRoutes != nil { + return false + } else if that1.OutNoRoutes != nil { + return false + } + if this.ReasmTimeout != nil && that1.ReasmTimeout != nil { + if *this.ReasmTimeout != *that1.ReasmTimeout { + return false + } + } else if this.ReasmTimeout != nil { + return false + } else if that1.ReasmTimeout != nil { + return false + } + if this.ReasmReqds != nil && that1.ReasmReqds != nil { + if *this.ReasmReqds != *that1.ReasmReqds { + return false + } + } else if this.ReasmReqds != nil { + return false + } else if that1.ReasmReqds != nil { + return false + } + if this.ReasmOKs != nil && that1.ReasmOKs != nil { + if *this.ReasmOKs != *that1.ReasmOKs { + return false + } + } else if this.ReasmOKs != nil { + return false + } else if that1.ReasmOKs != nil { + return false + } + if this.ReasmFails != nil && that1.ReasmFails != nil { + if *this.ReasmFails != *that1.ReasmFails { + return false + } + } else if this.ReasmFails != nil { + return false + } else if that1.ReasmFails != nil { + return false + } + if this.FragOKs != nil && that1.FragOKs != nil { + if *this.FragOKs != *that1.FragOKs { + return false + } + } else if this.FragOKs != nil { + return false + } else if that1.FragOKs != nil { + return false + } + if this.FragFails != nil && that1.FragFails != nil { + if *this.FragFails != *that1.FragFails { + return false + } + } else if this.FragFails != nil { + return false + } else if that1.FragFails != nil { + return false + } + if this.FragCreates != nil && that1.FragCreates != nil { + if *this.FragCreates != *that1.FragCreates { + return false + } + } else if this.FragCreates != nil { + return false + } else if that1.FragCreates != nil { + return false + } + return true +} +func (this *IcmpStatistics) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*IcmpStatistics) + if !ok { + that2, ok := that.(IcmpStatistics) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *IcmpStatistics") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *IcmpStatistics but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *IcmpStatistics but is not nil && this == nil") + } + if this.InMsgs != nil && that1.InMsgs != nil { + if *this.InMsgs != *that1.InMsgs { + return fmt.Errorf("InMsgs this(%v) Not Equal that(%v)", *this.InMsgs, *that1.InMsgs) + } + } else if this.InMsgs != nil { + return fmt.Errorf("this.InMsgs == nil && that.InMsgs != nil") + } else if that1.InMsgs != nil { + return fmt.Errorf("InMsgs this(%v) Not Equal that(%v)", this.InMsgs, that1.InMsgs) + } + if this.InErrors != nil && that1.InErrors != nil { + if *this.InErrors != *that1.InErrors { + return fmt.Errorf("InErrors this(%v) Not Equal that(%v)", *this.InErrors, *that1.InErrors) + } + } else if this.InErrors != nil { + return fmt.Errorf("this.InErrors == nil && that.InErrors != nil") + } else if that1.InErrors != nil { + return fmt.Errorf("InErrors this(%v) Not Equal that(%v)", this.InErrors, that1.InErrors) + } + if this.InCsumErrors != nil && that1.InCsumErrors != nil { + if *this.InCsumErrors != *that1.InCsumErrors { + return fmt.Errorf("InCsumErrors this(%v) Not Equal that(%v)", *this.InCsumErrors, *that1.InCsumErrors) + } + } else if this.InCsumErrors != nil { + return fmt.Errorf("this.InCsumErrors == nil && that.InCsumErrors != nil") + } else if that1.InCsumErrors != nil { + return fmt.Errorf("InCsumErrors this(%v) Not Equal that(%v)", this.InCsumErrors, that1.InCsumErrors) + } + if this.InDestUnreachs != nil && that1.InDestUnreachs != nil { + if *this.InDestUnreachs != *that1.InDestUnreachs { + return fmt.Errorf("InDestUnreachs this(%v) Not Equal that(%v)", *this.InDestUnreachs, *that1.InDestUnreachs) + } + } else if this.InDestUnreachs != nil { + return fmt.Errorf("this.InDestUnreachs == nil && that.InDestUnreachs != nil") + } else if that1.InDestUnreachs != nil { + return fmt.Errorf("InDestUnreachs this(%v) Not Equal that(%v)", this.InDestUnreachs, that1.InDestUnreachs) + } + if this.InTimeExcds != nil && that1.InTimeExcds != nil { + if *this.InTimeExcds != *that1.InTimeExcds { + return fmt.Errorf("InTimeExcds this(%v) Not Equal that(%v)", *this.InTimeExcds, *that1.InTimeExcds) + } + } else if this.InTimeExcds != nil { + return fmt.Errorf("this.InTimeExcds == nil && that.InTimeExcds != nil") + } else if that1.InTimeExcds != nil { + return fmt.Errorf("InTimeExcds this(%v) Not Equal that(%v)", this.InTimeExcds, that1.InTimeExcds) + } + if this.InParmProbs != nil && that1.InParmProbs != nil { + if *this.InParmProbs != *that1.InParmProbs { + return fmt.Errorf("InParmProbs this(%v) Not Equal that(%v)", *this.InParmProbs, *that1.InParmProbs) + } + } else if this.InParmProbs != nil { + return fmt.Errorf("this.InParmProbs == nil && that.InParmProbs != nil") + } else if that1.InParmProbs != nil { + return fmt.Errorf("InParmProbs this(%v) Not Equal that(%v)", this.InParmProbs, that1.InParmProbs) + } + if this.InSrcQuenchs != nil && that1.InSrcQuenchs != nil { + if *this.InSrcQuenchs != *that1.InSrcQuenchs { + return fmt.Errorf("InSrcQuenchs this(%v) Not Equal that(%v)", *this.InSrcQuenchs, *that1.InSrcQuenchs) + } + } else if this.InSrcQuenchs != nil { + return fmt.Errorf("this.InSrcQuenchs == nil && that.InSrcQuenchs != nil") + } else if that1.InSrcQuenchs != nil { + return fmt.Errorf("InSrcQuenchs this(%v) Not Equal that(%v)", this.InSrcQuenchs, that1.InSrcQuenchs) + } + if this.InRedirects != nil && that1.InRedirects != nil { + if *this.InRedirects != *that1.InRedirects { + return fmt.Errorf("InRedirects this(%v) Not Equal that(%v)", *this.InRedirects, *that1.InRedirects) + } + } else if this.InRedirects != nil { + return fmt.Errorf("this.InRedirects == nil && that.InRedirects != nil") + } else if that1.InRedirects != nil { + return fmt.Errorf("InRedirects this(%v) Not Equal that(%v)", this.InRedirects, that1.InRedirects) + } + if this.InEchos != nil && that1.InEchos != nil { + if *this.InEchos != *that1.InEchos { + return fmt.Errorf("InEchos this(%v) Not Equal that(%v)", *this.InEchos, *that1.InEchos) + } + } else if this.InEchos != nil { + return fmt.Errorf("this.InEchos == nil && that.InEchos != nil") + } else if that1.InEchos != nil { + return fmt.Errorf("InEchos this(%v) Not Equal that(%v)", this.InEchos, that1.InEchos) + } + if this.InEchoReps != nil && that1.InEchoReps != nil { + if *this.InEchoReps != *that1.InEchoReps { + return fmt.Errorf("InEchoReps this(%v) Not Equal that(%v)", *this.InEchoReps, *that1.InEchoReps) + } + } else if this.InEchoReps != nil { + return fmt.Errorf("this.InEchoReps == nil && that.InEchoReps != nil") + } else if that1.InEchoReps != nil { + return fmt.Errorf("InEchoReps this(%v) Not Equal that(%v)", this.InEchoReps, that1.InEchoReps) + } + if this.InTimestamps != nil && that1.InTimestamps != nil { + if *this.InTimestamps != *that1.InTimestamps { + return fmt.Errorf("InTimestamps this(%v) Not Equal that(%v)", *this.InTimestamps, *that1.InTimestamps) + } + } else if this.InTimestamps != nil { + return fmt.Errorf("this.InTimestamps == nil && that.InTimestamps != nil") + } else if that1.InTimestamps != nil { + return fmt.Errorf("InTimestamps this(%v) Not Equal that(%v)", this.InTimestamps, that1.InTimestamps) + } + if this.InTimestampReps != nil && that1.InTimestampReps != nil { + if *this.InTimestampReps != *that1.InTimestampReps { + return fmt.Errorf("InTimestampReps this(%v) Not Equal that(%v)", *this.InTimestampReps, *that1.InTimestampReps) + } + } else if this.InTimestampReps != nil { + return fmt.Errorf("this.InTimestampReps == nil && that.InTimestampReps != nil") + } else if that1.InTimestampReps != nil { + return fmt.Errorf("InTimestampReps this(%v) Not Equal that(%v)", this.InTimestampReps, that1.InTimestampReps) + } + if this.InAddrMasks != nil && that1.InAddrMasks != nil { + if *this.InAddrMasks != *that1.InAddrMasks { + return fmt.Errorf("InAddrMasks this(%v) Not Equal that(%v)", *this.InAddrMasks, *that1.InAddrMasks) + } + } else if this.InAddrMasks != nil { + return fmt.Errorf("this.InAddrMasks == nil && that.InAddrMasks != nil") + } else if that1.InAddrMasks != nil { + return fmt.Errorf("InAddrMasks this(%v) Not Equal that(%v)", this.InAddrMasks, that1.InAddrMasks) + } + if this.InAddrMaskReps != nil && that1.InAddrMaskReps != nil { + if *this.InAddrMaskReps != *that1.InAddrMaskReps { + return fmt.Errorf("InAddrMaskReps this(%v) Not Equal that(%v)", *this.InAddrMaskReps, *that1.InAddrMaskReps) + } + } else if this.InAddrMaskReps != nil { + return fmt.Errorf("this.InAddrMaskReps == nil && that.InAddrMaskReps != nil") + } else if that1.InAddrMaskReps != nil { + return fmt.Errorf("InAddrMaskReps this(%v) Not Equal that(%v)", this.InAddrMaskReps, that1.InAddrMaskReps) + } + if this.OutMsgs != nil && that1.OutMsgs != nil { + if *this.OutMsgs != *that1.OutMsgs { + return fmt.Errorf("OutMsgs this(%v) Not Equal that(%v)", *this.OutMsgs, *that1.OutMsgs) + } + } else if this.OutMsgs != nil { + return fmt.Errorf("this.OutMsgs == nil && that.OutMsgs != nil") + } else if that1.OutMsgs != nil { + return fmt.Errorf("OutMsgs this(%v) Not Equal that(%v)", this.OutMsgs, that1.OutMsgs) + } + if this.OutErrors != nil && that1.OutErrors != nil { + if *this.OutErrors != *that1.OutErrors { + return fmt.Errorf("OutErrors this(%v) Not Equal that(%v)", *this.OutErrors, *that1.OutErrors) + } + } else if this.OutErrors != nil { + return fmt.Errorf("this.OutErrors == nil && that.OutErrors != nil") + } else if that1.OutErrors != nil { + return fmt.Errorf("OutErrors this(%v) Not Equal that(%v)", this.OutErrors, that1.OutErrors) + } + if this.OutDestUnreachs != nil && that1.OutDestUnreachs != nil { + if *this.OutDestUnreachs != *that1.OutDestUnreachs { + return fmt.Errorf("OutDestUnreachs this(%v) Not Equal that(%v)", *this.OutDestUnreachs, *that1.OutDestUnreachs) + } + } else if this.OutDestUnreachs != nil { + return fmt.Errorf("this.OutDestUnreachs == nil && that.OutDestUnreachs != nil") + } else if that1.OutDestUnreachs != nil { + return fmt.Errorf("OutDestUnreachs this(%v) Not Equal that(%v)", this.OutDestUnreachs, that1.OutDestUnreachs) + } + if this.OutTimeExcds != nil && that1.OutTimeExcds != nil { + if *this.OutTimeExcds != *that1.OutTimeExcds { + return fmt.Errorf("OutTimeExcds this(%v) Not Equal that(%v)", *this.OutTimeExcds, *that1.OutTimeExcds) + } + } else if this.OutTimeExcds != nil { + return fmt.Errorf("this.OutTimeExcds == nil && that.OutTimeExcds != nil") + } else if that1.OutTimeExcds != nil { + return fmt.Errorf("OutTimeExcds this(%v) Not Equal that(%v)", this.OutTimeExcds, that1.OutTimeExcds) + } + if this.OutParmProbs != nil && that1.OutParmProbs != nil { + if *this.OutParmProbs != *that1.OutParmProbs { + return fmt.Errorf("OutParmProbs this(%v) Not Equal that(%v)", *this.OutParmProbs, *that1.OutParmProbs) + } + } else if this.OutParmProbs != nil { + return fmt.Errorf("this.OutParmProbs == nil && that.OutParmProbs != nil") + } else if that1.OutParmProbs != nil { + return fmt.Errorf("OutParmProbs this(%v) Not Equal that(%v)", this.OutParmProbs, that1.OutParmProbs) + } + if this.OutSrcQuenchs != nil && that1.OutSrcQuenchs != nil { + if *this.OutSrcQuenchs != *that1.OutSrcQuenchs { + return fmt.Errorf("OutSrcQuenchs this(%v) Not Equal that(%v)", *this.OutSrcQuenchs, *that1.OutSrcQuenchs) + } + } else if this.OutSrcQuenchs != nil { + return fmt.Errorf("this.OutSrcQuenchs == nil && that.OutSrcQuenchs != nil") + } else if that1.OutSrcQuenchs != nil { + return fmt.Errorf("OutSrcQuenchs this(%v) Not Equal that(%v)", this.OutSrcQuenchs, that1.OutSrcQuenchs) + } + if this.OutRedirects != nil && that1.OutRedirects != nil { + if *this.OutRedirects != *that1.OutRedirects { + return fmt.Errorf("OutRedirects this(%v) Not Equal that(%v)", *this.OutRedirects, *that1.OutRedirects) + } + } else if this.OutRedirects != nil { + return fmt.Errorf("this.OutRedirects == nil && that.OutRedirects != nil") + } else if that1.OutRedirects != nil { + return fmt.Errorf("OutRedirects this(%v) Not Equal that(%v)", this.OutRedirects, that1.OutRedirects) + } + if this.OutEchos != nil && that1.OutEchos != nil { + if *this.OutEchos != *that1.OutEchos { + return fmt.Errorf("OutEchos this(%v) Not Equal that(%v)", *this.OutEchos, *that1.OutEchos) + } + } else if this.OutEchos != nil { + return fmt.Errorf("this.OutEchos == nil && that.OutEchos != nil") + } else if that1.OutEchos != nil { + return fmt.Errorf("OutEchos this(%v) Not Equal that(%v)", this.OutEchos, that1.OutEchos) + } + if this.OutEchoReps != nil && that1.OutEchoReps != nil { + if *this.OutEchoReps != *that1.OutEchoReps { + return fmt.Errorf("OutEchoReps this(%v) Not Equal that(%v)", *this.OutEchoReps, *that1.OutEchoReps) + } + } else if this.OutEchoReps != nil { + return fmt.Errorf("this.OutEchoReps == nil && that.OutEchoReps != nil") + } else if that1.OutEchoReps != nil { + return fmt.Errorf("OutEchoReps this(%v) Not Equal that(%v)", this.OutEchoReps, that1.OutEchoReps) + } + if this.OutTimestamps != nil && that1.OutTimestamps != nil { + if *this.OutTimestamps != *that1.OutTimestamps { + return fmt.Errorf("OutTimestamps this(%v) Not Equal that(%v)", *this.OutTimestamps, *that1.OutTimestamps) + } + } else if this.OutTimestamps != nil { + return fmt.Errorf("this.OutTimestamps == nil && that.OutTimestamps != nil") + } else if that1.OutTimestamps != nil { + return fmt.Errorf("OutTimestamps this(%v) Not Equal that(%v)", this.OutTimestamps, that1.OutTimestamps) + } + if this.OutTimestampReps != nil && that1.OutTimestampReps != nil { + if *this.OutTimestampReps != *that1.OutTimestampReps { + return fmt.Errorf("OutTimestampReps this(%v) Not Equal that(%v)", *this.OutTimestampReps, *that1.OutTimestampReps) + } + } else if this.OutTimestampReps != nil { + return fmt.Errorf("this.OutTimestampReps == nil && that.OutTimestampReps != nil") + } else if that1.OutTimestampReps != nil { + return fmt.Errorf("OutTimestampReps this(%v) Not Equal that(%v)", this.OutTimestampReps, that1.OutTimestampReps) + } + if this.OutAddrMasks != nil && that1.OutAddrMasks != nil { + if *this.OutAddrMasks != *that1.OutAddrMasks { + return fmt.Errorf("OutAddrMasks this(%v) Not Equal that(%v)", *this.OutAddrMasks, *that1.OutAddrMasks) + } + } else if this.OutAddrMasks != nil { + return fmt.Errorf("this.OutAddrMasks == nil && that.OutAddrMasks != nil") + } else if that1.OutAddrMasks != nil { + return fmt.Errorf("OutAddrMasks this(%v) Not Equal that(%v)", this.OutAddrMasks, that1.OutAddrMasks) + } + if this.OutAddrMaskReps != nil && that1.OutAddrMaskReps != nil { + if *this.OutAddrMaskReps != *that1.OutAddrMaskReps { + return fmt.Errorf("OutAddrMaskReps this(%v) Not Equal that(%v)", *this.OutAddrMaskReps, *that1.OutAddrMaskReps) + } + } else if this.OutAddrMaskReps != nil { + return fmt.Errorf("this.OutAddrMaskReps == nil && that.OutAddrMaskReps != nil") + } else if that1.OutAddrMaskReps != nil { + return fmt.Errorf("OutAddrMaskReps this(%v) Not Equal that(%v)", this.OutAddrMaskReps, that1.OutAddrMaskReps) + } + return nil +} +func (this *IcmpStatistics) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*IcmpStatistics) + if !ok { + that2, ok := that.(IcmpStatistics) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.InMsgs != nil && that1.InMsgs != nil { + if *this.InMsgs != *that1.InMsgs { + return false + } + } else if this.InMsgs != nil { + return false + } else if that1.InMsgs != nil { + return false + } + if this.InErrors != nil && that1.InErrors != nil { + if *this.InErrors != *that1.InErrors { + return false + } + } else if this.InErrors != nil { + return false + } else if that1.InErrors != nil { + return false + } + if this.InCsumErrors != nil && that1.InCsumErrors != nil { + if *this.InCsumErrors != *that1.InCsumErrors { + return false + } + } else if this.InCsumErrors != nil { + return false + } else if that1.InCsumErrors != nil { + return false + } + if this.InDestUnreachs != nil && that1.InDestUnreachs != nil { + if *this.InDestUnreachs != *that1.InDestUnreachs { + return false + } + } else if this.InDestUnreachs != nil { + return false + } else if that1.InDestUnreachs != nil { + return false + } + if this.InTimeExcds != nil && that1.InTimeExcds != nil { + if *this.InTimeExcds != *that1.InTimeExcds { + return false + } + } else if this.InTimeExcds != nil { + return false + } else if that1.InTimeExcds != nil { + return false + } + if this.InParmProbs != nil && that1.InParmProbs != nil { + if *this.InParmProbs != *that1.InParmProbs { + return false + } + } else if this.InParmProbs != nil { + return false + } else if that1.InParmProbs != nil { + return false + } + if this.InSrcQuenchs != nil && that1.InSrcQuenchs != nil { + if *this.InSrcQuenchs != *that1.InSrcQuenchs { + return false + } + } else if this.InSrcQuenchs != nil { + return false + } else if that1.InSrcQuenchs != nil { + return false + } + if this.InRedirects != nil && that1.InRedirects != nil { + if *this.InRedirects != *that1.InRedirects { + return false + } + } else if this.InRedirects != nil { + return false + } else if that1.InRedirects != nil { + return false + } + if this.InEchos != nil && that1.InEchos != nil { + if *this.InEchos != *that1.InEchos { + return false + } + } else if this.InEchos != nil { + return false + } else if that1.InEchos != nil { + return false + } + if this.InEchoReps != nil && that1.InEchoReps != nil { + if *this.InEchoReps != *that1.InEchoReps { + return false + } + } else if this.InEchoReps != nil { + return false + } else if that1.InEchoReps != nil { + return false + } + if this.InTimestamps != nil && that1.InTimestamps != nil { + if *this.InTimestamps != *that1.InTimestamps { + return false + } + } else if this.InTimestamps != nil { + return false + } else if that1.InTimestamps != nil { + return false + } + if this.InTimestampReps != nil && that1.InTimestampReps != nil { + if *this.InTimestampReps != *that1.InTimestampReps { + return false + } + } else if this.InTimestampReps != nil { + return false + } else if that1.InTimestampReps != nil { + return false + } + if this.InAddrMasks != nil && that1.InAddrMasks != nil { + if *this.InAddrMasks != *that1.InAddrMasks { + return false + } + } else if this.InAddrMasks != nil { + return false + } else if that1.InAddrMasks != nil { + return false + } + if this.InAddrMaskReps != nil && that1.InAddrMaskReps != nil { + if *this.InAddrMaskReps != *that1.InAddrMaskReps { + return false + } + } else if this.InAddrMaskReps != nil { + return false + } else if that1.InAddrMaskReps != nil { + return false + } + if this.OutMsgs != nil && that1.OutMsgs != nil { + if *this.OutMsgs != *that1.OutMsgs { + return false + } + } else if this.OutMsgs != nil { + return false + } else if that1.OutMsgs != nil { + return false + } + if this.OutErrors != nil && that1.OutErrors != nil { + if *this.OutErrors != *that1.OutErrors { + return false + } + } else if this.OutErrors != nil { + return false + } else if that1.OutErrors != nil { + return false + } + if this.OutDestUnreachs != nil && that1.OutDestUnreachs != nil { + if *this.OutDestUnreachs != *that1.OutDestUnreachs { + return false + } + } else if this.OutDestUnreachs != nil { + return false + } else if that1.OutDestUnreachs != nil { + return false + } + if this.OutTimeExcds != nil && that1.OutTimeExcds != nil { + if *this.OutTimeExcds != *that1.OutTimeExcds { + return false + } + } else if this.OutTimeExcds != nil { + return false + } else if that1.OutTimeExcds != nil { + return false + } + if this.OutParmProbs != nil && that1.OutParmProbs != nil { + if *this.OutParmProbs != *that1.OutParmProbs { + return false + } + } else if this.OutParmProbs != nil { + return false + } else if that1.OutParmProbs != nil { + return false + } + if this.OutSrcQuenchs != nil && that1.OutSrcQuenchs != nil { + if *this.OutSrcQuenchs != *that1.OutSrcQuenchs { + return false + } + } else if this.OutSrcQuenchs != nil { + return false + } else if that1.OutSrcQuenchs != nil { + return false + } + if this.OutRedirects != nil && that1.OutRedirects != nil { + if *this.OutRedirects != *that1.OutRedirects { + return false + } + } else if this.OutRedirects != nil { + return false + } else if that1.OutRedirects != nil { + return false + } + if this.OutEchos != nil && that1.OutEchos != nil { + if *this.OutEchos != *that1.OutEchos { + return false + } + } else if this.OutEchos != nil { + return false + } else if that1.OutEchos != nil { + return false + } + if this.OutEchoReps != nil && that1.OutEchoReps != nil { + if *this.OutEchoReps != *that1.OutEchoReps { + return false + } + } else if this.OutEchoReps != nil { + return false + } else if that1.OutEchoReps != nil { + return false + } + if this.OutTimestamps != nil && that1.OutTimestamps != nil { + if *this.OutTimestamps != *that1.OutTimestamps { + return false + } + } else if this.OutTimestamps != nil { + return false + } else if that1.OutTimestamps != nil { + return false + } + if this.OutTimestampReps != nil && that1.OutTimestampReps != nil { + if *this.OutTimestampReps != *that1.OutTimestampReps { + return false + } + } else if this.OutTimestampReps != nil { + return false + } else if that1.OutTimestampReps != nil { + return false + } + if this.OutAddrMasks != nil && that1.OutAddrMasks != nil { + if *this.OutAddrMasks != *that1.OutAddrMasks { + return false + } + } else if this.OutAddrMasks != nil { + return false + } else if that1.OutAddrMasks != nil { + return false + } + if this.OutAddrMaskReps != nil && that1.OutAddrMaskReps != nil { + if *this.OutAddrMaskReps != *that1.OutAddrMaskReps { + return false + } + } else if this.OutAddrMaskReps != nil { + return false + } else if that1.OutAddrMaskReps != nil { + return false + } + return true +} +func (this *TcpStatistics) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TcpStatistics) + if !ok { + that2, ok := that.(TcpStatistics) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TcpStatistics") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TcpStatistics but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TcpStatistics but is not nil && this == nil") + } + if this.RtoAlgorithm != nil && that1.RtoAlgorithm != nil { + if *this.RtoAlgorithm != *that1.RtoAlgorithm { + return fmt.Errorf("RtoAlgorithm this(%v) Not Equal that(%v)", *this.RtoAlgorithm, *that1.RtoAlgorithm) + } + } else if this.RtoAlgorithm != nil { + return fmt.Errorf("this.RtoAlgorithm == nil && that.RtoAlgorithm != nil") + } else if that1.RtoAlgorithm != nil { + return fmt.Errorf("RtoAlgorithm this(%v) Not Equal that(%v)", this.RtoAlgorithm, that1.RtoAlgorithm) + } + if this.RtoMin != nil && that1.RtoMin != nil { + if *this.RtoMin != *that1.RtoMin { + return fmt.Errorf("RtoMin this(%v) Not Equal that(%v)", *this.RtoMin, *that1.RtoMin) + } + } else if this.RtoMin != nil { + return fmt.Errorf("this.RtoMin == nil && that.RtoMin != nil") + } else if that1.RtoMin != nil { + return fmt.Errorf("RtoMin this(%v) Not Equal that(%v)", this.RtoMin, that1.RtoMin) + } + if this.RtoMax != nil && that1.RtoMax != nil { + if *this.RtoMax != *that1.RtoMax { + return fmt.Errorf("RtoMax this(%v) Not Equal that(%v)", *this.RtoMax, *that1.RtoMax) + } + } else if this.RtoMax != nil { + return fmt.Errorf("this.RtoMax == nil && that.RtoMax != nil") + } else if that1.RtoMax != nil { + return fmt.Errorf("RtoMax this(%v) Not Equal that(%v)", this.RtoMax, that1.RtoMax) + } + if this.MaxConn != nil && that1.MaxConn != nil { + if *this.MaxConn != *that1.MaxConn { + return fmt.Errorf("MaxConn this(%v) Not Equal that(%v)", *this.MaxConn, *that1.MaxConn) + } + } else if this.MaxConn != nil { + return fmt.Errorf("this.MaxConn == nil && that.MaxConn != nil") + } else if that1.MaxConn != nil { + return fmt.Errorf("MaxConn this(%v) Not Equal that(%v)", this.MaxConn, that1.MaxConn) + } + if this.ActiveOpens != nil && that1.ActiveOpens != nil { + if *this.ActiveOpens != *that1.ActiveOpens { + return fmt.Errorf("ActiveOpens this(%v) Not Equal that(%v)", *this.ActiveOpens, *that1.ActiveOpens) + } + } else if this.ActiveOpens != nil { + return fmt.Errorf("this.ActiveOpens == nil && that.ActiveOpens != nil") + } else if that1.ActiveOpens != nil { + return fmt.Errorf("ActiveOpens this(%v) Not Equal that(%v)", this.ActiveOpens, that1.ActiveOpens) + } + if this.PassiveOpens != nil && that1.PassiveOpens != nil { + if *this.PassiveOpens != *that1.PassiveOpens { + return fmt.Errorf("PassiveOpens this(%v) Not Equal that(%v)", *this.PassiveOpens, *that1.PassiveOpens) + } + } else if this.PassiveOpens != nil { + return fmt.Errorf("this.PassiveOpens == nil && that.PassiveOpens != nil") + } else if that1.PassiveOpens != nil { + return fmt.Errorf("PassiveOpens this(%v) Not Equal that(%v)", this.PassiveOpens, that1.PassiveOpens) + } + if this.AttemptFails != nil && that1.AttemptFails != nil { + if *this.AttemptFails != *that1.AttemptFails { + return fmt.Errorf("AttemptFails this(%v) Not Equal that(%v)", *this.AttemptFails, *that1.AttemptFails) + } + } else if this.AttemptFails != nil { + return fmt.Errorf("this.AttemptFails == nil && that.AttemptFails != nil") + } else if that1.AttemptFails != nil { + return fmt.Errorf("AttemptFails this(%v) Not Equal that(%v)", this.AttemptFails, that1.AttemptFails) + } + if this.EstabResets != nil && that1.EstabResets != nil { + if *this.EstabResets != *that1.EstabResets { + return fmt.Errorf("EstabResets this(%v) Not Equal that(%v)", *this.EstabResets, *that1.EstabResets) + } + } else if this.EstabResets != nil { + return fmt.Errorf("this.EstabResets == nil && that.EstabResets != nil") + } else if that1.EstabResets != nil { + return fmt.Errorf("EstabResets this(%v) Not Equal that(%v)", this.EstabResets, that1.EstabResets) + } + if this.CurrEstab != nil && that1.CurrEstab != nil { + if *this.CurrEstab != *that1.CurrEstab { + return fmt.Errorf("CurrEstab this(%v) Not Equal that(%v)", *this.CurrEstab, *that1.CurrEstab) + } + } else if this.CurrEstab != nil { + return fmt.Errorf("this.CurrEstab == nil && that.CurrEstab != nil") + } else if that1.CurrEstab != nil { + return fmt.Errorf("CurrEstab this(%v) Not Equal that(%v)", this.CurrEstab, that1.CurrEstab) + } + if this.InSegs != nil && that1.InSegs != nil { + if *this.InSegs != *that1.InSegs { + return fmt.Errorf("InSegs this(%v) Not Equal that(%v)", *this.InSegs, *that1.InSegs) + } + } else if this.InSegs != nil { + return fmt.Errorf("this.InSegs == nil && that.InSegs != nil") + } else if that1.InSegs != nil { + return fmt.Errorf("InSegs this(%v) Not Equal that(%v)", this.InSegs, that1.InSegs) + } + if this.OutSegs != nil && that1.OutSegs != nil { + if *this.OutSegs != *that1.OutSegs { + return fmt.Errorf("OutSegs this(%v) Not Equal that(%v)", *this.OutSegs, *that1.OutSegs) + } + } else if this.OutSegs != nil { + return fmt.Errorf("this.OutSegs == nil && that.OutSegs != nil") + } else if that1.OutSegs != nil { + return fmt.Errorf("OutSegs this(%v) Not Equal that(%v)", this.OutSegs, that1.OutSegs) + } + if this.RetransSegs != nil && that1.RetransSegs != nil { + if *this.RetransSegs != *that1.RetransSegs { + return fmt.Errorf("RetransSegs this(%v) Not Equal that(%v)", *this.RetransSegs, *that1.RetransSegs) + } + } else if this.RetransSegs != nil { + return fmt.Errorf("this.RetransSegs == nil && that.RetransSegs != nil") + } else if that1.RetransSegs != nil { + return fmt.Errorf("RetransSegs this(%v) Not Equal that(%v)", this.RetransSegs, that1.RetransSegs) + } + if this.InErrs != nil && that1.InErrs != nil { + if *this.InErrs != *that1.InErrs { + return fmt.Errorf("InErrs this(%v) Not Equal that(%v)", *this.InErrs, *that1.InErrs) + } + } else if this.InErrs != nil { + return fmt.Errorf("this.InErrs == nil && that.InErrs != nil") + } else if that1.InErrs != nil { + return fmt.Errorf("InErrs this(%v) Not Equal that(%v)", this.InErrs, that1.InErrs) + } + if this.OutRsts != nil && that1.OutRsts != nil { + if *this.OutRsts != *that1.OutRsts { + return fmt.Errorf("OutRsts this(%v) Not Equal that(%v)", *this.OutRsts, *that1.OutRsts) + } + } else if this.OutRsts != nil { + return fmt.Errorf("this.OutRsts == nil && that.OutRsts != nil") + } else if that1.OutRsts != nil { + return fmt.Errorf("OutRsts this(%v) Not Equal that(%v)", this.OutRsts, that1.OutRsts) + } + if this.InCsumErrors != nil && that1.InCsumErrors != nil { + if *this.InCsumErrors != *that1.InCsumErrors { + return fmt.Errorf("InCsumErrors this(%v) Not Equal that(%v)", *this.InCsumErrors, *that1.InCsumErrors) + } + } else if this.InCsumErrors != nil { + return fmt.Errorf("this.InCsumErrors == nil && that.InCsumErrors != nil") + } else if that1.InCsumErrors != nil { + return fmt.Errorf("InCsumErrors this(%v) Not Equal that(%v)", this.InCsumErrors, that1.InCsumErrors) + } + return nil +} +func (this *TcpStatistics) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TcpStatistics) + if !ok { + that2, ok := that.(TcpStatistics) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.RtoAlgorithm != nil && that1.RtoAlgorithm != nil { + if *this.RtoAlgorithm != *that1.RtoAlgorithm { + return false + } + } else if this.RtoAlgorithm != nil { + return false + } else if that1.RtoAlgorithm != nil { + return false + } + if this.RtoMin != nil && that1.RtoMin != nil { + if *this.RtoMin != *that1.RtoMin { + return false + } + } else if this.RtoMin != nil { + return false + } else if that1.RtoMin != nil { + return false + } + if this.RtoMax != nil && that1.RtoMax != nil { + if *this.RtoMax != *that1.RtoMax { + return false + } + } else if this.RtoMax != nil { + return false + } else if that1.RtoMax != nil { + return false + } + if this.MaxConn != nil && that1.MaxConn != nil { + if *this.MaxConn != *that1.MaxConn { + return false + } + } else if this.MaxConn != nil { + return false + } else if that1.MaxConn != nil { + return false + } + if this.ActiveOpens != nil && that1.ActiveOpens != nil { + if *this.ActiveOpens != *that1.ActiveOpens { + return false + } + } else if this.ActiveOpens != nil { + return false + } else if that1.ActiveOpens != nil { + return false + } + if this.PassiveOpens != nil && that1.PassiveOpens != nil { + if *this.PassiveOpens != *that1.PassiveOpens { + return false + } + } else if this.PassiveOpens != nil { + return false + } else if that1.PassiveOpens != nil { + return false + } + if this.AttemptFails != nil && that1.AttemptFails != nil { + if *this.AttemptFails != *that1.AttemptFails { + return false + } + } else if this.AttemptFails != nil { + return false + } else if that1.AttemptFails != nil { + return false + } + if this.EstabResets != nil && that1.EstabResets != nil { + if *this.EstabResets != *that1.EstabResets { + return false + } + } else if this.EstabResets != nil { + return false + } else if that1.EstabResets != nil { + return false + } + if this.CurrEstab != nil && that1.CurrEstab != nil { + if *this.CurrEstab != *that1.CurrEstab { + return false + } + } else if this.CurrEstab != nil { + return false + } else if that1.CurrEstab != nil { + return false + } + if this.InSegs != nil && that1.InSegs != nil { + if *this.InSegs != *that1.InSegs { + return false + } + } else if this.InSegs != nil { + return false + } else if that1.InSegs != nil { + return false + } + if this.OutSegs != nil && that1.OutSegs != nil { + if *this.OutSegs != *that1.OutSegs { + return false + } + } else if this.OutSegs != nil { + return false + } else if that1.OutSegs != nil { + return false + } + if this.RetransSegs != nil && that1.RetransSegs != nil { + if *this.RetransSegs != *that1.RetransSegs { + return false + } + } else if this.RetransSegs != nil { + return false + } else if that1.RetransSegs != nil { + return false + } + if this.InErrs != nil && that1.InErrs != nil { + if *this.InErrs != *that1.InErrs { + return false + } + } else if this.InErrs != nil { + return false + } else if that1.InErrs != nil { + return false + } + if this.OutRsts != nil && that1.OutRsts != nil { + if *this.OutRsts != *that1.OutRsts { + return false + } + } else if this.OutRsts != nil { + return false + } else if that1.OutRsts != nil { + return false + } + if this.InCsumErrors != nil && that1.InCsumErrors != nil { + if *this.InCsumErrors != *that1.InCsumErrors { + return false + } + } else if this.InCsumErrors != nil { + return false + } else if that1.InCsumErrors != nil { + return false + } + return true +} +func (this *UdpStatistics) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UdpStatistics) + if !ok { + that2, ok := that.(UdpStatistics) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UdpStatistics") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UdpStatistics but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UdpStatistics but is not nil && this == nil") + } + if this.InDatagrams != nil && that1.InDatagrams != nil { + if *this.InDatagrams != *that1.InDatagrams { + return fmt.Errorf("InDatagrams this(%v) Not Equal that(%v)", *this.InDatagrams, *that1.InDatagrams) + } + } else if this.InDatagrams != nil { + return fmt.Errorf("this.InDatagrams == nil && that.InDatagrams != nil") + } else if that1.InDatagrams != nil { + return fmt.Errorf("InDatagrams this(%v) Not Equal that(%v)", this.InDatagrams, that1.InDatagrams) + } + if this.NoPorts != nil && that1.NoPorts != nil { + if *this.NoPorts != *that1.NoPorts { + return fmt.Errorf("NoPorts this(%v) Not Equal that(%v)", *this.NoPorts, *that1.NoPorts) + } + } else if this.NoPorts != nil { + return fmt.Errorf("this.NoPorts == nil && that.NoPorts != nil") + } else if that1.NoPorts != nil { + return fmt.Errorf("NoPorts this(%v) Not Equal that(%v)", this.NoPorts, that1.NoPorts) + } + if this.InErrors != nil && that1.InErrors != nil { + if *this.InErrors != *that1.InErrors { + return fmt.Errorf("InErrors this(%v) Not Equal that(%v)", *this.InErrors, *that1.InErrors) + } + } else if this.InErrors != nil { + return fmt.Errorf("this.InErrors == nil && that.InErrors != nil") + } else if that1.InErrors != nil { + return fmt.Errorf("InErrors this(%v) Not Equal that(%v)", this.InErrors, that1.InErrors) + } + if this.OutDatagrams != nil && that1.OutDatagrams != nil { + if *this.OutDatagrams != *that1.OutDatagrams { + return fmt.Errorf("OutDatagrams this(%v) Not Equal that(%v)", *this.OutDatagrams, *that1.OutDatagrams) + } + } else if this.OutDatagrams != nil { + return fmt.Errorf("this.OutDatagrams == nil && that.OutDatagrams != nil") + } else if that1.OutDatagrams != nil { + return fmt.Errorf("OutDatagrams this(%v) Not Equal that(%v)", this.OutDatagrams, that1.OutDatagrams) + } + if this.RcvbufErrors != nil && that1.RcvbufErrors != nil { + if *this.RcvbufErrors != *that1.RcvbufErrors { + return fmt.Errorf("RcvbufErrors this(%v) Not Equal that(%v)", *this.RcvbufErrors, *that1.RcvbufErrors) + } + } else if this.RcvbufErrors != nil { + return fmt.Errorf("this.RcvbufErrors == nil && that.RcvbufErrors != nil") + } else if that1.RcvbufErrors != nil { + return fmt.Errorf("RcvbufErrors this(%v) Not Equal that(%v)", this.RcvbufErrors, that1.RcvbufErrors) + } + if this.SndbufErrors != nil && that1.SndbufErrors != nil { + if *this.SndbufErrors != *that1.SndbufErrors { + return fmt.Errorf("SndbufErrors this(%v) Not Equal that(%v)", *this.SndbufErrors, *that1.SndbufErrors) + } + } else if this.SndbufErrors != nil { + return fmt.Errorf("this.SndbufErrors == nil && that.SndbufErrors != nil") + } else if that1.SndbufErrors != nil { + return fmt.Errorf("SndbufErrors this(%v) Not Equal that(%v)", this.SndbufErrors, that1.SndbufErrors) + } + if this.InCsumErrors != nil && that1.InCsumErrors != nil { + if *this.InCsumErrors != *that1.InCsumErrors { + return fmt.Errorf("InCsumErrors this(%v) Not Equal that(%v)", *this.InCsumErrors, *that1.InCsumErrors) + } + } else if this.InCsumErrors != nil { + return fmt.Errorf("this.InCsumErrors == nil && that.InCsumErrors != nil") + } else if that1.InCsumErrors != nil { + return fmt.Errorf("InCsumErrors this(%v) Not Equal that(%v)", this.InCsumErrors, that1.InCsumErrors) + } + if this.IgnoredMulti != nil && that1.IgnoredMulti != nil { + if *this.IgnoredMulti != *that1.IgnoredMulti { + return fmt.Errorf("IgnoredMulti this(%v) Not Equal that(%v)", *this.IgnoredMulti, *that1.IgnoredMulti) + } + } else if this.IgnoredMulti != nil { + return fmt.Errorf("this.IgnoredMulti == nil && that.IgnoredMulti != nil") + } else if that1.IgnoredMulti != nil { + return fmt.Errorf("IgnoredMulti this(%v) Not Equal that(%v)", this.IgnoredMulti, that1.IgnoredMulti) + } + return nil +} +func (this *UdpStatistics) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UdpStatistics) + if !ok { + that2, ok := that.(UdpStatistics) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.InDatagrams != nil && that1.InDatagrams != nil { + if *this.InDatagrams != *that1.InDatagrams { + return false + } + } else if this.InDatagrams != nil { + return false + } else if that1.InDatagrams != nil { + return false + } + if this.NoPorts != nil && that1.NoPorts != nil { + if *this.NoPorts != *that1.NoPorts { + return false + } + } else if this.NoPorts != nil { + return false + } else if that1.NoPorts != nil { + return false + } + if this.InErrors != nil && that1.InErrors != nil { + if *this.InErrors != *that1.InErrors { + return false + } + } else if this.InErrors != nil { + return false + } else if that1.InErrors != nil { + return false + } + if this.OutDatagrams != nil && that1.OutDatagrams != nil { + if *this.OutDatagrams != *that1.OutDatagrams { + return false + } + } else if this.OutDatagrams != nil { + return false + } else if that1.OutDatagrams != nil { + return false + } + if this.RcvbufErrors != nil && that1.RcvbufErrors != nil { + if *this.RcvbufErrors != *that1.RcvbufErrors { + return false + } + } else if this.RcvbufErrors != nil { + return false + } else if that1.RcvbufErrors != nil { + return false + } + if this.SndbufErrors != nil && that1.SndbufErrors != nil { + if *this.SndbufErrors != *that1.SndbufErrors { + return false + } + } else if this.SndbufErrors != nil { + return false + } else if that1.SndbufErrors != nil { + return false + } + if this.InCsumErrors != nil && that1.InCsumErrors != nil { + if *this.InCsumErrors != *that1.InCsumErrors { + return false + } + } else if this.InCsumErrors != nil { + return false + } else if that1.InCsumErrors != nil { + return false + } + if this.IgnoredMulti != nil && that1.IgnoredMulti != nil { + if *this.IgnoredMulti != *that1.IgnoredMulti { + return false + } + } else if this.IgnoredMulti != nil { + return false + } else if that1.IgnoredMulti != nil { + return false + } + return true +} +func (this *SNMPStatistics) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*SNMPStatistics) + if !ok { + that2, ok := that.(SNMPStatistics) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *SNMPStatistics") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *SNMPStatistics but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *SNMPStatistics but is not nil && this == nil") + } + if !this.IPStats.Equal(that1.IPStats) { + return fmt.Errorf("IPStats this(%v) Not Equal that(%v)", this.IPStats, that1.IPStats) + } + if !this.ICMPStats.Equal(that1.ICMPStats) { + return fmt.Errorf("ICMPStats this(%v) Not Equal that(%v)", this.ICMPStats, that1.ICMPStats) + } + if !this.TCPStats.Equal(that1.TCPStats) { + return fmt.Errorf("TCPStats this(%v) Not Equal that(%v)", this.TCPStats, that1.TCPStats) + } + if !this.UDPStats.Equal(that1.UDPStats) { + return fmt.Errorf("UDPStats this(%v) Not Equal that(%v)", this.UDPStats, that1.UDPStats) + } + return nil +} +func (this *SNMPStatistics) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*SNMPStatistics) + if !ok { + that2, ok := that.(SNMPStatistics) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.IPStats.Equal(that1.IPStats) { + return false + } + if !this.ICMPStats.Equal(that1.ICMPStats) { + return false + } + if !this.TCPStats.Equal(that1.TCPStats) { + return false + } + if !this.UDPStats.Equal(that1.UDPStats) { + return false + } + return true +} +func (this *DiskStatistics) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DiskStatistics) + if !ok { + that2, ok := that.(DiskStatistics) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DiskStatistics") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DiskStatistics but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DiskStatistics but is not nil && this == nil") + } + if !this.Source.Equal(that1.Source) { + return fmt.Errorf("Source this(%v) Not Equal that(%v)", this.Source, that1.Source) + } + if !this.Persistence.Equal(that1.Persistence) { + return fmt.Errorf("Persistence this(%v) Not Equal that(%v)", this.Persistence, that1.Persistence) + } + if this.LimitBytes != nil && that1.LimitBytes != nil { + if *this.LimitBytes != *that1.LimitBytes { + return fmt.Errorf("LimitBytes this(%v) Not Equal that(%v)", *this.LimitBytes, *that1.LimitBytes) + } + } else if this.LimitBytes != nil { + return fmt.Errorf("this.LimitBytes == nil && that.LimitBytes != nil") + } else if that1.LimitBytes != nil { + return fmt.Errorf("LimitBytes this(%v) Not Equal that(%v)", this.LimitBytes, that1.LimitBytes) + } + if this.UsedBytes != nil && that1.UsedBytes != nil { + if *this.UsedBytes != *that1.UsedBytes { + return fmt.Errorf("UsedBytes this(%v) Not Equal that(%v)", *this.UsedBytes, *that1.UsedBytes) + } + } else if this.UsedBytes != nil { + return fmt.Errorf("this.UsedBytes == nil && that.UsedBytes != nil") + } else if that1.UsedBytes != nil { + return fmt.Errorf("UsedBytes this(%v) Not Equal that(%v)", this.UsedBytes, that1.UsedBytes) + } + return nil +} +func (this *DiskStatistics) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DiskStatistics) + if !ok { + that2, ok := that.(DiskStatistics) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Source.Equal(that1.Source) { + return false + } + if !this.Persistence.Equal(that1.Persistence) { + return false + } + if this.LimitBytes != nil && that1.LimitBytes != nil { + if *this.LimitBytes != *that1.LimitBytes { + return false + } + } else if this.LimitBytes != nil { + return false + } else if that1.LimitBytes != nil { + return false + } + if this.UsedBytes != nil && that1.UsedBytes != nil { + if *this.UsedBytes != *that1.UsedBytes { + return false + } + } else if this.UsedBytes != nil { + return false + } else if that1.UsedBytes != nil { + return false + } + return true +} +func (this *ResourceStatistics) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ResourceStatistics) + if !ok { + that2, ok := that.(ResourceStatistics) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ResourceStatistics") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ResourceStatistics but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ResourceStatistics but is not nil && this == nil") + } + if this.Timestamp != that1.Timestamp { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if this.Processes != nil && that1.Processes != nil { + if *this.Processes != *that1.Processes { + return fmt.Errorf("Processes this(%v) Not Equal that(%v)", *this.Processes, *that1.Processes) + } + } else if this.Processes != nil { + return fmt.Errorf("this.Processes == nil && that.Processes != nil") + } else if that1.Processes != nil { + return fmt.Errorf("Processes this(%v) Not Equal that(%v)", this.Processes, that1.Processes) + } + if this.Threads != nil && that1.Threads != nil { + if *this.Threads != *that1.Threads { + return fmt.Errorf("Threads this(%v) Not Equal that(%v)", *this.Threads, *that1.Threads) + } + } else if this.Threads != nil { + return fmt.Errorf("this.Threads == nil && that.Threads != nil") + } else if that1.Threads != nil { + return fmt.Errorf("Threads this(%v) Not Equal that(%v)", this.Threads, that1.Threads) + } + if this.CPUsUserTimeSecs != nil && that1.CPUsUserTimeSecs != nil { + if *this.CPUsUserTimeSecs != *that1.CPUsUserTimeSecs { + return fmt.Errorf("CPUsUserTimeSecs this(%v) Not Equal that(%v)", *this.CPUsUserTimeSecs, *that1.CPUsUserTimeSecs) + } + } else if this.CPUsUserTimeSecs != nil { + return fmt.Errorf("this.CPUsUserTimeSecs == nil && that.CPUsUserTimeSecs != nil") + } else if that1.CPUsUserTimeSecs != nil { + return fmt.Errorf("CPUsUserTimeSecs this(%v) Not Equal that(%v)", this.CPUsUserTimeSecs, that1.CPUsUserTimeSecs) + } + if this.CPUsSystemTimeSecs != nil && that1.CPUsSystemTimeSecs != nil { + if *this.CPUsSystemTimeSecs != *that1.CPUsSystemTimeSecs { + return fmt.Errorf("CPUsSystemTimeSecs this(%v) Not Equal that(%v)", *this.CPUsSystemTimeSecs, *that1.CPUsSystemTimeSecs) + } + } else if this.CPUsSystemTimeSecs != nil { + return fmt.Errorf("this.CPUsSystemTimeSecs == nil && that.CPUsSystemTimeSecs != nil") + } else if that1.CPUsSystemTimeSecs != nil { + return fmt.Errorf("CPUsSystemTimeSecs this(%v) Not Equal that(%v)", this.CPUsSystemTimeSecs, that1.CPUsSystemTimeSecs) + } + if this.CPUsLimit != nil && that1.CPUsLimit != nil { + if *this.CPUsLimit != *that1.CPUsLimit { + return fmt.Errorf("CPUsLimit this(%v) Not Equal that(%v)", *this.CPUsLimit, *that1.CPUsLimit) + } + } else if this.CPUsLimit != nil { + return fmt.Errorf("this.CPUsLimit == nil && that.CPUsLimit != nil") + } else if that1.CPUsLimit != nil { + return fmt.Errorf("CPUsLimit this(%v) Not Equal that(%v)", this.CPUsLimit, that1.CPUsLimit) + } + if this.CPUsNrPeriods != nil && that1.CPUsNrPeriods != nil { + if *this.CPUsNrPeriods != *that1.CPUsNrPeriods { + return fmt.Errorf("CPUsNrPeriods this(%v) Not Equal that(%v)", *this.CPUsNrPeriods, *that1.CPUsNrPeriods) + } + } else if this.CPUsNrPeriods != nil { + return fmt.Errorf("this.CPUsNrPeriods == nil && that.CPUsNrPeriods != nil") + } else if that1.CPUsNrPeriods != nil { + return fmt.Errorf("CPUsNrPeriods this(%v) Not Equal that(%v)", this.CPUsNrPeriods, that1.CPUsNrPeriods) + } + if this.CPUsNrThrottled != nil && that1.CPUsNrThrottled != nil { + if *this.CPUsNrThrottled != *that1.CPUsNrThrottled { + return fmt.Errorf("CPUsNrThrottled this(%v) Not Equal that(%v)", *this.CPUsNrThrottled, *that1.CPUsNrThrottled) + } + } else if this.CPUsNrThrottled != nil { + return fmt.Errorf("this.CPUsNrThrottled == nil && that.CPUsNrThrottled != nil") + } else if that1.CPUsNrThrottled != nil { + return fmt.Errorf("CPUsNrThrottled this(%v) Not Equal that(%v)", this.CPUsNrThrottled, that1.CPUsNrThrottled) + } + if this.CPUsThrottledTimeSecs != nil && that1.CPUsThrottledTimeSecs != nil { + if *this.CPUsThrottledTimeSecs != *that1.CPUsThrottledTimeSecs { + return fmt.Errorf("CPUsThrottledTimeSecs this(%v) Not Equal that(%v)", *this.CPUsThrottledTimeSecs, *that1.CPUsThrottledTimeSecs) + } + } else if this.CPUsThrottledTimeSecs != nil { + return fmt.Errorf("this.CPUsThrottledTimeSecs == nil && that.CPUsThrottledTimeSecs != nil") + } else if that1.CPUsThrottledTimeSecs != nil { + return fmt.Errorf("CPUsThrottledTimeSecs this(%v) Not Equal that(%v)", this.CPUsThrottledTimeSecs, that1.CPUsThrottledTimeSecs) + } + if this.MemTotalBytes != nil && that1.MemTotalBytes != nil { + if *this.MemTotalBytes != *that1.MemTotalBytes { + return fmt.Errorf("MemTotalBytes this(%v) Not Equal that(%v)", *this.MemTotalBytes, *that1.MemTotalBytes) + } + } else if this.MemTotalBytes != nil { + return fmt.Errorf("this.MemTotalBytes == nil && that.MemTotalBytes != nil") + } else if that1.MemTotalBytes != nil { + return fmt.Errorf("MemTotalBytes this(%v) Not Equal that(%v)", this.MemTotalBytes, that1.MemTotalBytes) + } + if this.MemTotalMemswBytes != nil && that1.MemTotalMemswBytes != nil { + if *this.MemTotalMemswBytes != *that1.MemTotalMemswBytes { + return fmt.Errorf("MemTotalMemswBytes this(%v) Not Equal that(%v)", *this.MemTotalMemswBytes, *that1.MemTotalMemswBytes) + } + } else if this.MemTotalMemswBytes != nil { + return fmt.Errorf("this.MemTotalMemswBytes == nil && that.MemTotalMemswBytes != nil") + } else if that1.MemTotalMemswBytes != nil { + return fmt.Errorf("MemTotalMemswBytes this(%v) Not Equal that(%v)", this.MemTotalMemswBytes, that1.MemTotalMemswBytes) + } + if this.MemLimitBytes != nil && that1.MemLimitBytes != nil { + if *this.MemLimitBytes != *that1.MemLimitBytes { + return fmt.Errorf("MemLimitBytes this(%v) Not Equal that(%v)", *this.MemLimitBytes, *that1.MemLimitBytes) + } + } else if this.MemLimitBytes != nil { + return fmt.Errorf("this.MemLimitBytes == nil && that.MemLimitBytes != nil") + } else if that1.MemLimitBytes != nil { + return fmt.Errorf("MemLimitBytes this(%v) Not Equal that(%v)", this.MemLimitBytes, that1.MemLimitBytes) + } + if this.MemSoftLimitBytes != nil && that1.MemSoftLimitBytes != nil { + if *this.MemSoftLimitBytes != *that1.MemSoftLimitBytes { + return fmt.Errorf("MemSoftLimitBytes this(%v) Not Equal that(%v)", *this.MemSoftLimitBytes, *that1.MemSoftLimitBytes) + } + } else if this.MemSoftLimitBytes != nil { + return fmt.Errorf("this.MemSoftLimitBytes == nil && that.MemSoftLimitBytes != nil") + } else if that1.MemSoftLimitBytes != nil { + return fmt.Errorf("MemSoftLimitBytes this(%v) Not Equal that(%v)", this.MemSoftLimitBytes, that1.MemSoftLimitBytes) + } + if this.MemFileBytes != nil && that1.MemFileBytes != nil { + if *this.MemFileBytes != *that1.MemFileBytes { + return fmt.Errorf("MemFileBytes this(%v) Not Equal that(%v)", *this.MemFileBytes, *that1.MemFileBytes) + } + } else if this.MemFileBytes != nil { + return fmt.Errorf("this.MemFileBytes == nil && that.MemFileBytes != nil") + } else if that1.MemFileBytes != nil { + return fmt.Errorf("MemFileBytes this(%v) Not Equal that(%v)", this.MemFileBytes, that1.MemFileBytes) + } + if this.MemAnonBytes != nil && that1.MemAnonBytes != nil { + if *this.MemAnonBytes != *that1.MemAnonBytes { + return fmt.Errorf("MemAnonBytes this(%v) Not Equal that(%v)", *this.MemAnonBytes, *that1.MemAnonBytes) + } + } else if this.MemAnonBytes != nil { + return fmt.Errorf("this.MemAnonBytes == nil && that.MemAnonBytes != nil") + } else if that1.MemAnonBytes != nil { + return fmt.Errorf("MemAnonBytes this(%v) Not Equal that(%v)", this.MemAnonBytes, that1.MemAnonBytes) + } + if this.MemCacheBytes != nil && that1.MemCacheBytes != nil { + if *this.MemCacheBytes != *that1.MemCacheBytes { + return fmt.Errorf("MemCacheBytes this(%v) Not Equal that(%v)", *this.MemCacheBytes, *that1.MemCacheBytes) + } + } else if this.MemCacheBytes != nil { + return fmt.Errorf("this.MemCacheBytes == nil && that.MemCacheBytes != nil") + } else if that1.MemCacheBytes != nil { + return fmt.Errorf("MemCacheBytes this(%v) Not Equal that(%v)", this.MemCacheBytes, that1.MemCacheBytes) + } + if this.MemRSSBytes != nil && that1.MemRSSBytes != nil { + if *this.MemRSSBytes != *that1.MemRSSBytes { + return fmt.Errorf("MemRSSBytes this(%v) Not Equal that(%v)", *this.MemRSSBytes, *that1.MemRSSBytes) + } + } else if this.MemRSSBytes != nil { + return fmt.Errorf("this.MemRSSBytes == nil && that.MemRSSBytes != nil") + } else if that1.MemRSSBytes != nil { + return fmt.Errorf("MemRSSBytes this(%v) Not Equal that(%v)", this.MemRSSBytes, that1.MemRSSBytes) + } + if this.MemMappedFileBytes != nil && that1.MemMappedFileBytes != nil { + if *this.MemMappedFileBytes != *that1.MemMappedFileBytes { + return fmt.Errorf("MemMappedFileBytes this(%v) Not Equal that(%v)", *this.MemMappedFileBytes, *that1.MemMappedFileBytes) + } + } else if this.MemMappedFileBytes != nil { + return fmt.Errorf("this.MemMappedFileBytes == nil && that.MemMappedFileBytes != nil") + } else if that1.MemMappedFileBytes != nil { + return fmt.Errorf("MemMappedFileBytes this(%v) Not Equal that(%v)", this.MemMappedFileBytes, that1.MemMappedFileBytes) + } + if this.MemSwapBytes != nil && that1.MemSwapBytes != nil { + if *this.MemSwapBytes != *that1.MemSwapBytes { + return fmt.Errorf("MemSwapBytes this(%v) Not Equal that(%v)", *this.MemSwapBytes, *that1.MemSwapBytes) + } + } else if this.MemSwapBytes != nil { + return fmt.Errorf("this.MemSwapBytes == nil && that.MemSwapBytes != nil") + } else if that1.MemSwapBytes != nil { + return fmt.Errorf("MemSwapBytes this(%v) Not Equal that(%v)", this.MemSwapBytes, that1.MemSwapBytes) + } + if this.MemUnevictableBytes != nil && that1.MemUnevictableBytes != nil { + if *this.MemUnevictableBytes != *that1.MemUnevictableBytes { + return fmt.Errorf("MemUnevictableBytes this(%v) Not Equal that(%v)", *this.MemUnevictableBytes, *that1.MemUnevictableBytes) + } + } else if this.MemUnevictableBytes != nil { + return fmt.Errorf("this.MemUnevictableBytes == nil && that.MemUnevictableBytes != nil") + } else if that1.MemUnevictableBytes != nil { + return fmt.Errorf("MemUnevictableBytes this(%v) Not Equal that(%v)", this.MemUnevictableBytes, that1.MemUnevictableBytes) + } + if this.MemLowPressureCounter != nil && that1.MemLowPressureCounter != nil { + if *this.MemLowPressureCounter != *that1.MemLowPressureCounter { + return fmt.Errorf("MemLowPressureCounter this(%v) Not Equal that(%v)", *this.MemLowPressureCounter, *that1.MemLowPressureCounter) + } + } else if this.MemLowPressureCounter != nil { + return fmt.Errorf("this.MemLowPressureCounter == nil && that.MemLowPressureCounter != nil") + } else if that1.MemLowPressureCounter != nil { + return fmt.Errorf("MemLowPressureCounter this(%v) Not Equal that(%v)", this.MemLowPressureCounter, that1.MemLowPressureCounter) + } + if this.MemMediumPressureCounter != nil && that1.MemMediumPressureCounter != nil { + if *this.MemMediumPressureCounter != *that1.MemMediumPressureCounter { + return fmt.Errorf("MemMediumPressureCounter this(%v) Not Equal that(%v)", *this.MemMediumPressureCounter, *that1.MemMediumPressureCounter) + } + } else if this.MemMediumPressureCounter != nil { + return fmt.Errorf("this.MemMediumPressureCounter == nil && that.MemMediumPressureCounter != nil") + } else if that1.MemMediumPressureCounter != nil { + return fmt.Errorf("MemMediumPressureCounter this(%v) Not Equal that(%v)", this.MemMediumPressureCounter, that1.MemMediumPressureCounter) + } + if this.MemCriticalPressureCounter != nil && that1.MemCriticalPressureCounter != nil { + if *this.MemCriticalPressureCounter != *that1.MemCriticalPressureCounter { + return fmt.Errorf("MemCriticalPressureCounter this(%v) Not Equal that(%v)", *this.MemCriticalPressureCounter, *that1.MemCriticalPressureCounter) + } + } else if this.MemCriticalPressureCounter != nil { + return fmt.Errorf("this.MemCriticalPressureCounter == nil && that.MemCriticalPressureCounter != nil") + } else if that1.MemCriticalPressureCounter != nil { + return fmt.Errorf("MemCriticalPressureCounter this(%v) Not Equal that(%v)", this.MemCriticalPressureCounter, that1.MemCriticalPressureCounter) + } + if this.DiskLimitBytes != nil && that1.DiskLimitBytes != nil { + if *this.DiskLimitBytes != *that1.DiskLimitBytes { + return fmt.Errorf("DiskLimitBytes this(%v) Not Equal that(%v)", *this.DiskLimitBytes, *that1.DiskLimitBytes) + } + } else if this.DiskLimitBytes != nil { + return fmt.Errorf("this.DiskLimitBytes == nil && that.DiskLimitBytes != nil") + } else if that1.DiskLimitBytes != nil { + return fmt.Errorf("DiskLimitBytes this(%v) Not Equal that(%v)", this.DiskLimitBytes, that1.DiskLimitBytes) + } + if this.DiskUsedBytes != nil && that1.DiskUsedBytes != nil { + if *this.DiskUsedBytes != *that1.DiskUsedBytes { + return fmt.Errorf("DiskUsedBytes this(%v) Not Equal that(%v)", *this.DiskUsedBytes, *that1.DiskUsedBytes) + } + } else if this.DiskUsedBytes != nil { + return fmt.Errorf("this.DiskUsedBytes == nil && that.DiskUsedBytes != nil") + } else if that1.DiskUsedBytes != nil { + return fmt.Errorf("DiskUsedBytes this(%v) Not Equal that(%v)", this.DiskUsedBytes, that1.DiskUsedBytes) + } + if len(this.DiskStatistics) != len(that1.DiskStatistics) { + return fmt.Errorf("DiskStatistics this(%v) Not Equal that(%v)", len(this.DiskStatistics), len(that1.DiskStatistics)) + } + for i := range this.DiskStatistics { + if !this.DiskStatistics[i].Equal(&that1.DiskStatistics[i]) { + return fmt.Errorf("DiskStatistics this[%v](%v) Not Equal that[%v](%v)", i, this.DiskStatistics[i], i, that1.DiskStatistics[i]) + } + } + if !this.BlkioStatistics.Equal(that1.BlkioStatistics) { + return fmt.Errorf("BlkioStatistics this(%v) Not Equal that(%v)", this.BlkioStatistics, that1.BlkioStatistics) + } + if !this.Perf.Equal(that1.Perf) { + return fmt.Errorf("Perf this(%v) Not Equal that(%v)", this.Perf, that1.Perf) + } + if this.NetRxPackets != nil && that1.NetRxPackets != nil { + if *this.NetRxPackets != *that1.NetRxPackets { + return fmt.Errorf("NetRxPackets this(%v) Not Equal that(%v)", *this.NetRxPackets, *that1.NetRxPackets) + } + } else if this.NetRxPackets != nil { + return fmt.Errorf("this.NetRxPackets == nil && that.NetRxPackets != nil") + } else if that1.NetRxPackets != nil { + return fmt.Errorf("NetRxPackets this(%v) Not Equal that(%v)", this.NetRxPackets, that1.NetRxPackets) + } + if this.NetRxBytes != nil && that1.NetRxBytes != nil { + if *this.NetRxBytes != *that1.NetRxBytes { + return fmt.Errorf("NetRxBytes this(%v) Not Equal that(%v)", *this.NetRxBytes, *that1.NetRxBytes) + } + } else if this.NetRxBytes != nil { + return fmt.Errorf("this.NetRxBytes == nil && that.NetRxBytes != nil") + } else if that1.NetRxBytes != nil { + return fmt.Errorf("NetRxBytes this(%v) Not Equal that(%v)", this.NetRxBytes, that1.NetRxBytes) + } + if this.NetRxErrors != nil && that1.NetRxErrors != nil { + if *this.NetRxErrors != *that1.NetRxErrors { + return fmt.Errorf("NetRxErrors this(%v) Not Equal that(%v)", *this.NetRxErrors, *that1.NetRxErrors) + } + } else if this.NetRxErrors != nil { + return fmt.Errorf("this.NetRxErrors == nil && that.NetRxErrors != nil") + } else if that1.NetRxErrors != nil { + return fmt.Errorf("NetRxErrors this(%v) Not Equal that(%v)", this.NetRxErrors, that1.NetRxErrors) + } + if this.NetRxDropped != nil && that1.NetRxDropped != nil { + if *this.NetRxDropped != *that1.NetRxDropped { + return fmt.Errorf("NetRxDropped this(%v) Not Equal that(%v)", *this.NetRxDropped, *that1.NetRxDropped) + } + } else if this.NetRxDropped != nil { + return fmt.Errorf("this.NetRxDropped == nil && that.NetRxDropped != nil") + } else if that1.NetRxDropped != nil { + return fmt.Errorf("NetRxDropped this(%v) Not Equal that(%v)", this.NetRxDropped, that1.NetRxDropped) + } + if this.NetTxPackets != nil && that1.NetTxPackets != nil { + if *this.NetTxPackets != *that1.NetTxPackets { + return fmt.Errorf("NetTxPackets this(%v) Not Equal that(%v)", *this.NetTxPackets, *that1.NetTxPackets) + } + } else if this.NetTxPackets != nil { + return fmt.Errorf("this.NetTxPackets == nil && that.NetTxPackets != nil") + } else if that1.NetTxPackets != nil { + return fmt.Errorf("NetTxPackets this(%v) Not Equal that(%v)", this.NetTxPackets, that1.NetTxPackets) + } + if this.NetTxBytes != nil && that1.NetTxBytes != nil { + if *this.NetTxBytes != *that1.NetTxBytes { + return fmt.Errorf("NetTxBytes this(%v) Not Equal that(%v)", *this.NetTxBytes, *that1.NetTxBytes) + } + } else if this.NetTxBytes != nil { + return fmt.Errorf("this.NetTxBytes == nil && that.NetTxBytes != nil") + } else if that1.NetTxBytes != nil { + return fmt.Errorf("NetTxBytes this(%v) Not Equal that(%v)", this.NetTxBytes, that1.NetTxBytes) + } + if this.NetTxErrors != nil && that1.NetTxErrors != nil { + if *this.NetTxErrors != *that1.NetTxErrors { + return fmt.Errorf("NetTxErrors this(%v) Not Equal that(%v)", *this.NetTxErrors, *that1.NetTxErrors) + } + } else if this.NetTxErrors != nil { + return fmt.Errorf("this.NetTxErrors == nil && that.NetTxErrors != nil") + } else if that1.NetTxErrors != nil { + return fmt.Errorf("NetTxErrors this(%v) Not Equal that(%v)", this.NetTxErrors, that1.NetTxErrors) + } + if this.NetTxDropped != nil && that1.NetTxDropped != nil { + if *this.NetTxDropped != *that1.NetTxDropped { + return fmt.Errorf("NetTxDropped this(%v) Not Equal that(%v)", *this.NetTxDropped, *that1.NetTxDropped) + } + } else if this.NetTxDropped != nil { + return fmt.Errorf("this.NetTxDropped == nil && that.NetTxDropped != nil") + } else if that1.NetTxDropped != nil { + return fmt.Errorf("NetTxDropped this(%v) Not Equal that(%v)", this.NetTxDropped, that1.NetTxDropped) + } + if this.NetTCPRttMicrosecsP50 != nil && that1.NetTCPRttMicrosecsP50 != nil { + if *this.NetTCPRttMicrosecsP50 != *that1.NetTCPRttMicrosecsP50 { + return fmt.Errorf("NetTCPRttMicrosecsP50 this(%v) Not Equal that(%v)", *this.NetTCPRttMicrosecsP50, *that1.NetTCPRttMicrosecsP50) + } + } else if this.NetTCPRttMicrosecsP50 != nil { + return fmt.Errorf("this.NetTCPRttMicrosecsP50 == nil && that.NetTCPRttMicrosecsP50 != nil") + } else if that1.NetTCPRttMicrosecsP50 != nil { + return fmt.Errorf("NetTCPRttMicrosecsP50 this(%v) Not Equal that(%v)", this.NetTCPRttMicrosecsP50, that1.NetTCPRttMicrosecsP50) + } + if this.NetTCPRttMicrosecsP90 != nil && that1.NetTCPRttMicrosecsP90 != nil { + if *this.NetTCPRttMicrosecsP90 != *that1.NetTCPRttMicrosecsP90 { + return fmt.Errorf("NetTCPRttMicrosecsP90 this(%v) Not Equal that(%v)", *this.NetTCPRttMicrosecsP90, *that1.NetTCPRttMicrosecsP90) + } + } else if this.NetTCPRttMicrosecsP90 != nil { + return fmt.Errorf("this.NetTCPRttMicrosecsP90 == nil && that.NetTCPRttMicrosecsP90 != nil") + } else if that1.NetTCPRttMicrosecsP90 != nil { + return fmt.Errorf("NetTCPRttMicrosecsP90 this(%v) Not Equal that(%v)", this.NetTCPRttMicrosecsP90, that1.NetTCPRttMicrosecsP90) + } + if this.NetTCPRttMicrosecsP95 != nil && that1.NetTCPRttMicrosecsP95 != nil { + if *this.NetTCPRttMicrosecsP95 != *that1.NetTCPRttMicrosecsP95 { + return fmt.Errorf("NetTCPRttMicrosecsP95 this(%v) Not Equal that(%v)", *this.NetTCPRttMicrosecsP95, *that1.NetTCPRttMicrosecsP95) + } + } else if this.NetTCPRttMicrosecsP95 != nil { + return fmt.Errorf("this.NetTCPRttMicrosecsP95 == nil && that.NetTCPRttMicrosecsP95 != nil") + } else if that1.NetTCPRttMicrosecsP95 != nil { + return fmt.Errorf("NetTCPRttMicrosecsP95 this(%v) Not Equal that(%v)", this.NetTCPRttMicrosecsP95, that1.NetTCPRttMicrosecsP95) + } + if this.NetTCPRttMicrosecsP99 != nil && that1.NetTCPRttMicrosecsP99 != nil { + if *this.NetTCPRttMicrosecsP99 != *that1.NetTCPRttMicrosecsP99 { + return fmt.Errorf("NetTCPRttMicrosecsP99 this(%v) Not Equal that(%v)", *this.NetTCPRttMicrosecsP99, *that1.NetTCPRttMicrosecsP99) + } + } else if this.NetTCPRttMicrosecsP99 != nil { + return fmt.Errorf("this.NetTCPRttMicrosecsP99 == nil && that.NetTCPRttMicrosecsP99 != nil") + } else if that1.NetTCPRttMicrosecsP99 != nil { + return fmt.Errorf("NetTCPRttMicrosecsP99 this(%v) Not Equal that(%v)", this.NetTCPRttMicrosecsP99, that1.NetTCPRttMicrosecsP99) + } + if this.NetTCPActiveConnections != nil && that1.NetTCPActiveConnections != nil { + if *this.NetTCPActiveConnections != *that1.NetTCPActiveConnections { + return fmt.Errorf("NetTCPActiveConnections this(%v) Not Equal that(%v)", *this.NetTCPActiveConnections, *that1.NetTCPActiveConnections) + } + } else if this.NetTCPActiveConnections != nil { + return fmt.Errorf("this.NetTCPActiveConnections == nil && that.NetTCPActiveConnections != nil") + } else if that1.NetTCPActiveConnections != nil { + return fmt.Errorf("NetTCPActiveConnections this(%v) Not Equal that(%v)", this.NetTCPActiveConnections, that1.NetTCPActiveConnections) + } + if this.NetTCPTimeWaitConnections != nil && that1.NetTCPTimeWaitConnections != nil { + if *this.NetTCPTimeWaitConnections != *that1.NetTCPTimeWaitConnections { + return fmt.Errorf("NetTCPTimeWaitConnections this(%v) Not Equal that(%v)", *this.NetTCPTimeWaitConnections, *that1.NetTCPTimeWaitConnections) + } + } else if this.NetTCPTimeWaitConnections != nil { + return fmt.Errorf("this.NetTCPTimeWaitConnections == nil && that.NetTCPTimeWaitConnections != nil") + } else if that1.NetTCPTimeWaitConnections != nil { + return fmt.Errorf("NetTCPTimeWaitConnections this(%v) Not Equal that(%v)", this.NetTCPTimeWaitConnections, that1.NetTCPTimeWaitConnections) + } + if len(this.NetTrafficControlStatistics) != len(that1.NetTrafficControlStatistics) { + return fmt.Errorf("NetTrafficControlStatistics this(%v) Not Equal that(%v)", len(this.NetTrafficControlStatistics), len(that1.NetTrafficControlStatistics)) + } + for i := range this.NetTrafficControlStatistics { + if !this.NetTrafficControlStatistics[i].Equal(&that1.NetTrafficControlStatistics[i]) { + return fmt.Errorf("NetTrafficControlStatistics this[%v](%v) Not Equal that[%v](%v)", i, this.NetTrafficControlStatistics[i], i, that1.NetTrafficControlStatistics[i]) + } + } + if !this.NetSNMPStatistics.Equal(that1.NetSNMPStatistics) { + return fmt.Errorf("NetSNMPStatistics this(%v) Not Equal that(%v)", this.NetSNMPStatistics, that1.NetSNMPStatistics) + } + return nil +} +func (this *ResourceStatistics) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ResourceStatistics) + if !ok { + that2, ok := that.(ResourceStatistics) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Timestamp != that1.Timestamp { + return false + } + if this.Processes != nil && that1.Processes != nil { + if *this.Processes != *that1.Processes { + return false + } + } else if this.Processes != nil { + return false + } else if that1.Processes != nil { + return false + } + if this.Threads != nil && that1.Threads != nil { + if *this.Threads != *that1.Threads { + return false + } + } else if this.Threads != nil { + return false + } else if that1.Threads != nil { + return false + } + if this.CPUsUserTimeSecs != nil && that1.CPUsUserTimeSecs != nil { + if *this.CPUsUserTimeSecs != *that1.CPUsUserTimeSecs { + return false + } + } else if this.CPUsUserTimeSecs != nil { + return false + } else if that1.CPUsUserTimeSecs != nil { + return false + } + if this.CPUsSystemTimeSecs != nil && that1.CPUsSystemTimeSecs != nil { + if *this.CPUsSystemTimeSecs != *that1.CPUsSystemTimeSecs { + return false + } + } else if this.CPUsSystemTimeSecs != nil { + return false + } else if that1.CPUsSystemTimeSecs != nil { + return false + } + if this.CPUsLimit != nil && that1.CPUsLimit != nil { + if *this.CPUsLimit != *that1.CPUsLimit { + return false + } + } else if this.CPUsLimit != nil { + return false + } else if that1.CPUsLimit != nil { + return false + } + if this.CPUsNrPeriods != nil && that1.CPUsNrPeriods != nil { + if *this.CPUsNrPeriods != *that1.CPUsNrPeriods { + return false + } + } else if this.CPUsNrPeriods != nil { + return false + } else if that1.CPUsNrPeriods != nil { + return false + } + if this.CPUsNrThrottled != nil && that1.CPUsNrThrottled != nil { + if *this.CPUsNrThrottled != *that1.CPUsNrThrottled { + return false + } + } else if this.CPUsNrThrottled != nil { + return false + } else if that1.CPUsNrThrottled != nil { + return false + } + if this.CPUsThrottledTimeSecs != nil && that1.CPUsThrottledTimeSecs != nil { + if *this.CPUsThrottledTimeSecs != *that1.CPUsThrottledTimeSecs { + return false + } + } else if this.CPUsThrottledTimeSecs != nil { + return false + } else if that1.CPUsThrottledTimeSecs != nil { + return false + } + if this.MemTotalBytes != nil && that1.MemTotalBytes != nil { + if *this.MemTotalBytes != *that1.MemTotalBytes { + return false + } + } else if this.MemTotalBytes != nil { + return false + } else if that1.MemTotalBytes != nil { + return false + } + if this.MemTotalMemswBytes != nil && that1.MemTotalMemswBytes != nil { + if *this.MemTotalMemswBytes != *that1.MemTotalMemswBytes { + return false + } + } else if this.MemTotalMemswBytes != nil { + return false + } else if that1.MemTotalMemswBytes != nil { + return false + } + if this.MemLimitBytes != nil && that1.MemLimitBytes != nil { + if *this.MemLimitBytes != *that1.MemLimitBytes { + return false + } + } else if this.MemLimitBytes != nil { + return false + } else if that1.MemLimitBytes != nil { + return false + } + if this.MemSoftLimitBytes != nil && that1.MemSoftLimitBytes != nil { + if *this.MemSoftLimitBytes != *that1.MemSoftLimitBytes { + return false + } + } else if this.MemSoftLimitBytes != nil { + return false + } else if that1.MemSoftLimitBytes != nil { + return false + } + if this.MemFileBytes != nil && that1.MemFileBytes != nil { + if *this.MemFileBytes != *that1.MemFileBytes { + return false + } + } else if this.MemFileBytes != nil { + return false + } else if that1.MemFileBytes != nil { + return false + } + if this.MemAnonBytes != nil && that1.MemAnonBytes != nil { + if *this.MemAnonBytes != *that1.MemAnonBytes { + return false + } + } else if this.MemAnonBytes != nil { + return false + } else if that1.MemAnonBytes != nil { + return false + } + if this.MemCacheBytes != nil && that1.MemCacheBytes != nil { + if *this.MemCacheBytes != *that1.MemCacheBytes { + return false + } + } else if this.MemCacheBytes != nil { + return false + } else if that1.MemCacheBytes != nil { + return false + } + if this.MemRSSBytes != nil && that1.MemRSSBytes != nil { + if *this.MemRSSBytes != *that1.MemRSSBytes { + return false + } + } else if this.MemRSSBytes != nil { + return false + } else if that1.MemRSSBytes != nil { + return false + } + if this.MemMappedFileBytes != nil && that1.MemMappedFileBytes != nil { + if *this.MemMappedFileBytes != *that1.MemMappedFileBytes { + return false + } + } else if this.MemMappedFileBytes != nil { + return false + } else if that1.MemMappedFileBytes != nil { + return false + } + if this.MemSwapBytes != nil && that1.MemSwapBytes != nil { + if *this.MemSwapBytes != *that1.MemSwapBytes { + return false + } + } else if this.MemSwapBytes != nil { + return false + } else if that1.MemSwapBytes != nil { + return false + } + if this.MemUnevictableBytes != nil && that1.MemUnevictableBytes != nil { + if *this.MemUnevictableBytes != *that1.MemUnevictableBytes { + return false + } + } else if this.MemUnevictableBytes != nil { + return false + } else if that1.MemUnevictableBytes != nil { + return false + } + if this.MemLowPressureCounter != nil && that1.MemLowPressureCounter != nil { + if *this.MemLowPressureCounter != *that1.MemLowPressureCounter { + return false + } + } else if this.MemLowPressureCounter != nil { + return false + } else if that1.MemLowPressureCounter != nil { + return false + } + if this.MemMediumPressureCounter != nil && that1.MemMediumPressureCounter != nil { + if *this.MemMediumPressureCounter != *that1.MemMediumPressureCounter { + return false + } + } else if this.MemMediumPressureCounter != nil { + return false + } else if that1.MemMediumPressureCounter != nil { + return false + } + if this.MemCriticalPressureCounter != nil && that1.MemCriticalPressureCounter != nil { + if *this.MemCriticalPressureCounter != *that1.MemCriticalPressureCounter { + return false + } + } else if this.MemCriticalPressureCounter != nil { + return false + } else if that1.MemCriticalPressureCounter != nil { + return false + } + if this.DiskLimitBytes != nil && that1.DiskLimitBytes != nil { + if *this.DiskLimitBytes != *that1.DiskLimitBytes { + return false + } + } else if this.DiskLimitBytes != nil { + return false + } else if that1.DiskLimitBytes != nil { + return false + } + if this.DiskUsedBytes != nil && that1.DiskUsedBytes != nil { + if *this.DiskUsedBytes != *that1.DiskUsedBytes { + return false + } + } else if this.DiskUsedBytes != nil { + return false + } else if that1.DiskUsedBytes != nil { + return false + } + if len(this.DiskStatistics) != len(that1.DiskStatistics) { + return false + } + for i := range this.DiskStatistics { + if !this.DiskStatistics[i].Equal(&that1.DiskStatistics[i]) { + return false + } + } + if !this.BlkioStatistics.Equal(that1.BlkioStatistics) { + return false + } + if !this.Perf.Equal(that1.Perf) { + return false + } + if this.NetRxPackets != nil && that1.NetRxPackets != nil { + if *this.NetRxPackets != *that1.NetRxPackets { + return false + } + } else if this.NetRxPackets != nil { + return false + } else if that1.NetRxPackets != nil { + return false + } + if this.NetRxBytes != nil && that1.NetRxBytes != nil { + if *this.NetRxBytes != *that1.NetRxBytes { + return false + } + } else if this.NetRxBytes != nil { + return false + } else if that1.NetRxBytes != nil { + return false + } + if this.NetRxErrors != nil && that1.NetRxErrors != nil { + if *this.NetRxErrors != *that1.NetRxErrors { + return false + } + } else if this.NetRxErrors != nil { + return false + } else if that1.NetRxErrors != nil { + return false + } + if this.NetRxDropped != nil && that1.NetRxDropped != nil { + if *this.NetRxDropped != *that1.NetRxDropped { + return false + } + } else if this.NetRxDropped != nil { + return false + } else if that1.NetRxDropped != nil { + return false + } + if this.NetTxPackets != nil && that1.NetTxPackets != nil { + if *this.NetTxPackets != *that1.NetTxPackets { + return false + } + } else if this.NetTxPackets != nil { + return false + } else if that1.NetTxPackets != nil { + return false + } + if this.NetTxBytes != nil && that1.NetTxBytes != nil { + if *this.NetTxBytes != *that1.NetTxBytes { + return false + } + } else if this.NetTxBytes != nil { + return false + } else if that1.NetTxBytes != nil { + return false + } + if this.NetTxErrors != nil && that1.NetTxErrors != nil { + if *this.NetTxErrors != *that1.NetTxErrors { + return false + } + } else if this.NetTxErrors != nil { + return false + } else if that1.NetTxErrors != nil { + return false + } + if this.NetTxDropped != nil && that1.NetTxDropped != nil { + if *this.NetTxDropped != *that1.NetTxDropped { + return false + } + } else if this.NetTxDropped != nil { + return false + } else if that1.NetTxDropped != nil { + return false + } + if this.NetTCPRttMicrosecsP50 != nil && that1.NetTCPRttMicrosecsP50 != nil { + if *this.NetTCPRttMicrosecsP50 != *that1.NetTCPRttMicrosecsP50 { + return false + } + } else if this.NetTCPRttMicrosecsP50 != nil { + return false + } else if that1.NetTCPRttMicrosecsP50 != nil { + return false + } + if this.NetTCPRttMicrosecsP90 != nil && that1.NetTCPRttMicrosecsP90 != nil { + if *this.NetTCPRttMicrosecsP90 != *that1.NetTCPRttMicrosecsP90 { + return false + } + } else if this.NetTCPRttMicrosecsP90 != nil { + return false + } else if that1.NetTCPRttMicrosecsP90 != nil { + return false + } + if this.NetTCPRttMicrosecsP95 != nil && that1.NetTCPRttMicrosecsP95 != nil { + if *this.NetTCPRttMicrosecsP95 != *that1.NetTCPRttMicrosecsP95 { + return false + } + } else if this.NetTCPRttMicrosecsP95 != nil { + return false + } else if that1.NetTCPRttMicrosecsP95 != nil { + return false + } + if this.NetTCPRttMicrosecsP99 != nil && that1.NetTCPRttMicrosecsP99 != nil { + if *this.NetTCPRttMicrosecsP99 != *that1.NetTCPRttMicrosecsP99 { + return false + } + } else if this.NetTCPRttMicrosecsP99 != nil { + return false + } else if that1.NetTCPRttMicrosecsP99 != nil { + return false + } + if this.NetTCPActiveConnections != nil && that1.NetTCPActiveConnections != nil { + if *this.NetTCPActiveConnections != *that1.NetTCPActiveConnections { + return false + } + } else if this.NetTCPActiveConnections != nil { + return false + } else if that1.NetTCPActiveConnections != nil { + return false + } + if this.NetTCPTimeWaitConnections != nil && that1.NetTCPTimeWaitConnections != nil { + if *this.NetTCPTimeWaitConnections != *that1.NetTCPTimeWaitConnections { + return false + } + } else if this.NetTCPTimeWaitConnections != nil { + return false + } else if that1.NetTCPTimeWaitConnections != nil { + return false + } + if len(this.NetTrafficControlStatistics) != len(that1.NetTrafficControlStatistics) { + return false + } + for i := range this.NetTrafficControlStatistics { + if !this.NetTrafficControlStatistics[i].Equal(&that1.NetTrafficControlStatistics[i]) { + return false + } + } + if !this.NetSNMPStatistics.Equal(that1.NetSNMPStatistics) { + return false + } + return true +} +func (this *ResourceUsage) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ResourceUsage) + if !ok { + that2, ok := that.(ResourceUsage) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ResourceUsage") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ResourceUsage but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ResourceUsage but is not nil && this == nil") + } + if len(this.Executors) != len(that1.Executors) { + return fmt.Errorf("Executors this(%v) Not Equal that(%v)", len(this.Executors), len(that1.Executors)) + } + for i := range this.Executors { + if !this.Executors[i].Equal(&that1.Executors[i]) { + return fmt.Errorf("Executors this[%v](%v) Not Equal that[%v](%v)", i, this.Executors[i], i, that1.Executors[i]) + } + } + if len(this.Total) != len(that1.Total) { + return fmt.Errorf("Total this(%v) Not Equal that(%v)", len(this.Total), len(that1.Total)) + } + for i := range this.Total { + if !this.Total[i].Equal(&that1.Total[i]) { + return fmt.Errorf("Total this[%v](%v) Not Equal that[%v](%v)", i, this.Total[i], i, that1.Total[i]) + } + } + return nil +} +func (this *ResourceUsage) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ResourceUsage) + if !ok { + that2, ok := that.(ResourceUsage) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Executors) != len(that1.Executors) { + return false + } + for i := range this.Executors { + if !this.Executors[i].Equal(&that1.Executors[i]) { + return false + } + } + if len(this.Total) != len(that1.Total) { + return false + } + for i := range this.Total { + if !this.Total[i].Equal(&that1.Total[i]) { + return false + } + } + return true +} +func (this *ResourceUsage_Executor) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ResourceUsage_Executor) + if !ok { + that2, ok := that.(ResourceUsage_Executor) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ResourceUsage_Executor") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ResourceUsage_Executor but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ResourceUsage_Executor but is not nil && this == nil") + } + if !this.ExecutorInfo.Equal(&that1.ExecutorInfo) { + return fmt.Errorf("ExecutorInfo this(%v) Not Equal that(%v)", this.ExecutorInfo, that1.ExecutorInfo) + } + if len(this.Allocated) != len(that1.Allocated) { + return fmt.Errorf("Allocated this(%v) Not Equal that(%v)", len(this.Allocated), len(that1.Allocated)) + } + for i := range this.Allocated { + if !this.Allocated[i].Equal(&that1.Allocated[i]) { + return fmt.Errorf("Allocated this[%v](%v) Not Equal that[%v](%v)", i, this.Allocated[i], i, that1.Allocated[i]) + } + } + if !this.Statistics.Equal(that1.Statistics) { + return fmt.Errorf("Statistics this(%v) Not Equal that(%v)", this.Statistics, that1.Statistics) + } + if !this.ContainerID.Equal(&that1.ContainerID) { + return fmt.Errorf("ContainerID this(%v) Not Equal that(%v)", this.ContainerID, that1.ContainerID) + } + if len(this.Tasks) != len(that1.Tasks) { + return fmt.Errorf("Tasks this(%v) Not Equal that(%v)", len(this.Tasks), len(that1.Tasks)) + } + for i := range this.Tasks { + if !this.Tasks[i].Equal(&that1.Tasks[i]) { + return fmt.Errorf("Tasks this[%v](%v) Not Equal that[%v](%v)", i, this.Tasks[i], i, that1.Tasks[i]) + } + } + return nil +} +func (this *ResourceUsage_Executor) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ResourceUsage_Executor) + if !ok { + that2, ok := that.(ResourceUsage_Executor) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.ExecutorInfo.Equal(&that1.ExecutorInfo) { + return false + } + if len(this.Allocated) != len(that1.Allocated) { + return false + } + for i := range this.Allocated { + if !this.Allocated[i].Equal(&that1.Allocated[i]) { + return false + } + } + if !this.Statistics.Equal(that1.Statistics) { + return false + } + if !this.ContainerID.Equal(&that1.ContainerID) { + return false + } + if len(this.Tasks) != len(that1.Tasks) { + return false + } + for i := range this.Tasks { + if !this.Tasks[i].Equal(&that1.Tasks[i]) { + return false + } + } + return true +} +func (this *ResourceUsage_Executor_Task) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ResourceUsage_Executor_Task) + if !ok { + that2, ok := that.(ResourceUsage_Executor_Task) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ResourceUsage_Executor_Task") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ResourceUsage_Executor_Task but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ResourceUsage_Executor_Task but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if !this.ID.Equal(&that1.ID) { + return fmt.Errorf("ID this(%v) Not Equal that(%v)", this.ID, that1.ID) + } + if len(this.Resources) != len(that1.Resources) { + return fmt.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return fmt.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) + } + } + if !this.Labels.Equal(that1.Labels) { + return fmt.Errorf("Labels this(%v) Not Equal that(%v)", this.Labels, that1.Labels) + } + return nil +} +func (this *ResourceUsage_Executor_Task) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ResourceUsage_Executor_Task) + if !ok { + that2, ok := that.(ResourceUsage_Executor_Task) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if !this.ID.Equal(&that1.ID) { + return false + } + if len(this.Resources) != len(that1.Resources) { + return false + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return false + } + } + if !this.Labels.Equal(that1.Labels) { + return false + } + return true +} +func (this *PerfStatistics) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*PerfStatistics) + if !ok { + that2, ok := that.(PerfStatistics) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *PerfStatistics") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *PerfStatistics but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *PerfStatistics but is not nil && this == nil") + } + if this.Timestamp != that1.Timestamp { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if this.Duration != that1.Duration { + return fmt.Errorf("Duration this(%v) Not Equal that(%v)", this.Duration, that1.Duration) + } + if this.Cycles != nil && that1.Cycles != nil { + if *this.Cycles != *that1.Cycles { + return fmt.Errorf("Cycles this(%v) Not Equal that(%v)", *this.Cycles, *that1.Cycles) + } + } else if this.Cycles != nil { + return fmt.Errorf("this.Cycles == nil && that.Cycles != nil") + } else if that1.Cycles != nil { + return fmt.Errorf("Cycles this(%v) Not Equal that(%v)", this.Cycles, that1.Cycles) + } + if this.StalledCyclesFrontend != nil && that1.StalledCyclesFrontend != nil { + if *this.StalledCyclesFrontend != *that1.StalledCyclesFrontend { + return fmt.Errorf("StalledCyclesFrontend this(%v) Not Equal that(%v)", *this.StalledCyclesFrontend, *that1.StalledCyclesFrontend) + } + } else if this.StalledCyclesFrontend != nil { + return fmt.Errorf("this.StalledCyclesFrontend == nil && that.StalledCyclesFrontend != nil") + } else if that1.StalledCyclesFrontend != nil { + return fmt.Errorf("StalledCyclesFrontend this(%v) Not Equal that(%v)", this.StalledCyclesFrontend, that1.StalledCyclesFrontend) + } + if this.StalledCyclesBackend != nil && that1.StalledCyclesBackend != nil { + if *this.StalledCyclesBackend != *that1.StalledCyclesBackend { + return fmt.Errorf("StalledCyclesBackend this(%v) Not Equal that(%v)", *this.StalledCyclesBackend, *that1.StalledCyclesBackend) + } + } else if this.StalledCyclesBackend != nil { + return fmt.Errorf("this.StalledCyclesBackend == nil && that.StalledCyclesBackend != nil") + } else if that1.StalledCyclesBackend != nil { + return fmt.Errorf("StalledCyclesBackend this(%v) Not Equal that(%v)", this.StalledCyclesBackend, that1.StalledCyclesBackend) + } + if this.Instructions != nil && that1.Instructions != nil { + if *this.Instructions != *that1.Instructions { + return fmt.Errorf("Instructions this(%v) Not Equal that(%v)", *this.Instructions, *that1.Instructions) + } + } else if this.Instructions != nil { + return fmt.Errorf("this.Instructions == nil && that.Instructions != nil") + } else if that1.Instructions != nil { + return fmt.Errorf("Instructions this(%v) Not Equal that(%v)", this.Instructions, that1.Instructions) + } + if this.CacheReferences != nil && that1.CacheReferences != nil { + if *this.CacheReferences != *that1.CacheReferences { + return fmt.Errorf("CacheReferences this(%v) Not Equal that(%v)", *this.CacheReferences, *that1.CacheReferences) + } + } else if this.CacheReferences != nil { + return fmt.Errorf("this.CacheReferences == nil && that.CacheReferences != nil") + } else if that1.CacheReferences != nil { + return fmt.Errorf("CacheReferences this(%v) Not Equal that(%v)", this.CacheReferences, that1.CacheReferences) + } + if this.CacheMisses != nil && that1.CacheMisses != nil { + if *this.CacheMisses != *that1.CacheMisses { + return fmt.Errorf("CacheMisses this(%v) Not Equal that(%v)", *this.CacheMisses, *that1.CacheMisses) + } + } else if this.CacheMisses != nil { + return fmt.Errorf("this.CacheMisses == nil && that.CacheMisses != nil") + } else if that1.CacheMisses != nil { + return fmt.Errorf("CacheMisses this(%v) Not Equal that(%v)", this.CacheMisses, that1.CacheMisses) + } + if this.Branches != nil && that1.Branches != nil { + if *this.Branches != *that1.Branches { + return fmt.Errorf("Branches this(%v) Not Equal that(%v)", *this.Branches, *that1.Branches) + } + } else if this.Branches != nil { + return fmt.Errorf("this.Branches == nil && that.Branches != nil") + } else if that1.Branches != nil { + return fmt.Errorf("Branches this(%v) Not Equal that(%v)", this.Branches, that1.Branches) + } + if this.BranchMisses != nil && that1.BranchMisses != nil { + if *this.BranchMisses != *that1.BranchMisses { + return fmt.Errorf("BranchMisses this(%v) Not Equal that(%v)", *this.BranchMisses, *that1.BranchMisses) + } + } else if this.BranchMisses != nil { + return fmt.Errorf("this.BranchMisses == nil && that.BranchMisses != nil") + } else if that1.BranchMisses != nil { + return fmt.Errorf("BranchMisses this(%v) Not Equal that(%v)", this.BranchMisses, that1.BranchMisses) + } + if this.BusCycles != nil && that1.BusCycles != nil { + if *this.BusCycles != *that1.BusCycles { + return fmt.Errorf("BusCycles this(%v) Not Equal that(%v)", *this.BusCycles, *that1.BusCycles) + } + } else if this.BusCycles != nil { + return fmt.Errorf("this.BusCycles == nil && that.BusCycles != nil") + } else if that1.BusCycles != nil { + return fmt.Errorf("BusCycles this(%v) Not Equal that(%v)", this.BusCycles, that1.BusCycles) + } + if this.RefCycles != nil && that1.RefCycles != nil { + if *this.RefCycles != *that1.RefCycles { + return fmt.Errorf("RefCycles this(%v) Not Equal that(%v)", *this.RefCycles, *that1.RefCycles) + } + } else if this.RefCycles != nil { + return fmt.Errorf("this.RefCycles == nil && that.RefCycles != nil") + } else if that1.RefCycles != nil { + return fmt.Errorf("RefCycles this(%v) Not Equal that(%v)", this.RefCycles, that1.RefCycles) + } + if this.CPUClock != nil && that1.CPUClock != nil { + if *this.CPUClock != *that1.CPUClock { + return fmt.Errorf("CPUClock this(%v) Not Equal that(%v)", *this.CPUClock, *that1.CPUClock) + } + } else if this.CPUClock != nil { + return fmt.Errorf("this.CPUClock == nil && that.CPUClock != nil") + } else if that1.CPUClock != nil { + return fmt.Errorf("CPUClock this(%v) Not Equal that(%v)", this.CPUClock, that1.CPUClock) + } + if this.TaskClock != nil && that1.TaskClock != nil { + if *this.TaskClock != *that1.TaskClock { + return fmt.Errorf("TaskClock this(%v) Not Equal that(%v)", *this.TaskClock, *that1.TaskClock) + } + } else if this.TaskClock != nil { + return fmt.Errorf("this.TaskClock == nil && that.TaskClock != nil") + } else if that1.TaskClock != nil { + return fmt.Errorf("TaskClock this(%v) Not Equal that(%v)", this.TaskClock, that1.TaskClock) + } + if this.PageFaults != nil && that1.PageFaults != nil { + if *this.PageFaults != *that1.PageFaults { + return fmt.Errorf("PageFaults this(%v) Not Equal that(%v)", *this.PageFaults, *that1.PageFaults) + } + } else if this.PageFaults != nil { + return fmt.Errorf("this.PageFaults == nil && that.PageFaults != nil") + } else if that1.PageFaults != nil { + return fmt.Errorf("PageFaults this(%v) Not Equal that(%v)", this.PageFaults, that1.PageFaults) + } + if this.MinorFaults != nil && that1.MinorFaults != nil { + if *this.MinorFaults != *that1.MinorFaults { + return fmt.Errorf("MinorFaults this(%v) Not Equal that(%v)", *this.MinorFaults, *that1.MinorFaults) + } + } else if this.MinorFaults != nil { + return fmt.Errorf("this.MinorFaults == nil && that.MinorFaults != nil") + } else if that1.MinorFaults != nil { + return fmt.Errorf("MinorFaults this(%v) Not Equal that(%v)", this.MinorFaults, that1.MinorFaults) + } + if this.MajorFaults != nil && that1.MajorFaults != nil { + if *this.MajorFaults != *that1.MajorFaults { + return fmt.Errorf("MajorFaults this(%v) Not Equal that(%v)", *this.MajorFaults, *that1.MajorFaults) + } + } else if this.MajorFaults != nil { + return fmt.Errorf("this.MajorFaults == nil && that.MajorFaults != nil") + } else if that1.MajorFaults != nil { + return fmt.Errorf("MajorFaults this(%v) Not Equal that(%v)", this.MajorFaults, that1.MajorFaults) + } + if this.ContextSwitches != nil && that1.ContextSwitches != nil { + if *this.ContextSwitches != *that1.ContextSwitches { + return fmt.Errorf("ContextSwitches this(%v) Not Equal that(%v)", *this.ContextSwitches, *that1.ContextSwitches) + } + } else if this.ContextSwitches != nil { + return fmt.Errorf("this.ContextSwitches == nil && that.ContextSwitches != nil") + } else if that1.ContextSwitches != nil { + return fmt.Errorf("ContextSwitches this(%v) Not Equal that(%v)", this.ContextSwitches, that1.ContextSwitches) + } + if this.CPUMigrations != nil && that1.CPUMigrations != nil { + if *this.CPUMigrations != *that1.CPUMigrations { + return fmt.Errorf("CPUMigrations this(%v) Not Equal that(%v)", *this.CPUMigrations, *that1.CPUMigrations) + } + } else if this.CPUMigrations != nil { + return fmt.Errorf("this.CPUMigrations == nil && that.CPUMigrations != nil") + } else if that1.CPUMigrations != nil { + return fmt.Errorf("CPUMigrations this(%v) Not Equal that(%v)", this.CPUMigrations, that1.CPUMigrations) + } + if this.AlignmentFaults != nil && that1.AlignmentFaults != nil { + if *this.AlignmentFaults != *that1.AlignmentFaults { + return fmt.Errorf("AlignmentFaults this(%v) Not Equal that(%v)", *this.AlignmentFaults, *that1.AlignmentFaults) + } + } else if this.AlignmentFaults != nil { + return fmt.Errorf("this.AlignmentFaults == nil && that.AlignmentFaults != nil") + } else if that1.AlignmentFaults != nil { + return fmt.Errorf("AlignmentFaults this(%v) Not Equal that(%v)", this.AlignmentFaults, that1.AlignmentFaults) + } + if this.EmulationFaults != nil && that1.EmulationFaults != nil { + if *this.EmulationFaults != *that1.EmulationFaults { + return fmt.Errorf("EmulationFaults this(%v) Not Equal that(%v)", *this.EmulationFaults, *that1.EmulationFaults) + } + } else if this.EmulationFaults != nil { + return fmt.Errorf("this.EmulationFaults == nil && that.EmulationFaults != nil") + } else if that1.EmulationFaults != nil { + return fmt.Errorf("EmulationFaults this(%v) Not Equal that(%v)", this.EmulationFaults, that1.EmulationFaults) + } + if this.L1DcacheLoads != nil && that1.L1DcacheLoads != nil { + if *this.L1DcacheLoads != *that1.L1DcacheLoads { + return fmt.Errorf("L1DcacheLoads this(%v) Not Equal that(%v)", *this.L1DcacheLoads, *that1.L1DcacheLoads) + } + } else if this.L1DcacheLoads != nil { + return fmt.Errorf("this.L1DcacheLoads == nil && that.L1DcacheLoads != nil") + } else if that1.L1DcacheLoads != nil { + return fmt.Errorf("L1DcacheLoads this(%v) Not Equal that(%v)", this.L1DcacheLoads, that1.L1DcacheLoads) + } + if this.L1DcacheLoadMisses != nil && that1.L1DcacheLoadMisses != nil { + if *this.L1DcacheLoadMisses != *that1.L1DcacheLoadMisses { + return fmt.Errorf("L1DcacheLoadMisses this(%v) Not Equal that(%v)", *this.L1DcacheLoadMisses, *that1.L1DcacheLoadMisses) + } + } else if this.L1DcacheLoadMisses != nil { + return fmt.Errorf("this.L1DcacheLoadMisses == nil && that.L1DcacheLoadMisses != nil") + } else if that1.L1DcacheLoadMisses != nil { + return fmt.Errorf("L1DcacheLoadMisses this(%v) Not Equal that(%v)", this.L1DcacheLoadMisses, that1.L1DcacheLoadMisses) + } + if this.L1DcacheStores != nil && that1.L1DcacheStores != nil { + if *this.L1DcacheStores != *that1.L1DcacheStores { + return fmt.Errorf("L1DcacheStores this(%v) Not Equal that(%v)", *this.L1DcacheStores, *that1.L1DcacheStores) + } + } else if this.L1DcacheStores != nil { + return fmt.Errorf("this.L1DcacheStores == nil && that.L1DcacheStores != nil") + } else if that1.L1DcacheStores != nil { + return fmt.Errorf("L1DcacheStores this(%v) Not Equal that(%v)", this.L1DcacheStores, that1.L1DcacheStores) + } + if this.L1DcacheStoreMisses != nil && that1.L1DcacheStoreMisses != nil { + if *this.L1DcacheStoreMisses != *that1.L1DcacheStoreMisses { + return fmt.Errorf("L1DcacheStoreMisses this(%v) Not Equal that(%v)", *this.L1DcacheStoreMisses, *that1.L1DcacheStoreMisses) + } + } else if this.L1DcacheStoreMisses != nil { + return fmt.Errorf("this.L1DcacheStoreMisses == nil && that.L1DcacheStoreMisses != nil") + } else if that1.L1DcacheStoreMisses != nil { + return fmt.Errorf("L1DcacheStoreMisses this(%v) Not Equal that(%v)", this.L1DcacheStoreMisses, that1.L1DcacheStoreMisses) + } + if this.L1DcachePrefetches != nil && that1.L1DcachePrefetches != nil { + if *this.L1DcachePrefetches != *that1.L1DcachePrefetches { + return fmt.Errorf("L1DcachePrefetches this(%v) Not Equal that(%v)", *this.L1DcachePrefetches, *that1.L1DcachePrefetches) + } + } else if this.L1DcachePrefetches != nil { + return fmt.Errorf("this.L1DcachePrefetches == nil && that.L1DcachePrefetches != nil") + } else if that1.L1DcachePrefetches != nil { + return fmt.Errorf("L1DcachePrefetches this(%v) Not Equal that(%v)", this.L1DcachePrefetches, that1.L1DcachePrefetches) + } + if this.L1DcachePrefetchMisses != nil && that1.L1DcachePrefetchMisses != nil { + if *this.L1DcachePrefetchMisses != *that1.L1DcachePrefetchMisses { + return fmt.Errorf("L1DcachePrefetchMisses this(%v) Not Equal that(%v)", *this.L1DcachePrefetchMisses, *that1.L1DcachePrefetchMisses) + } + } else if this.L1DcachePrefetchMisses != nil { + return fmt.Errorf("this.L1DcachePrefetchMisses == nil && that.L1DcachePrefetchMisses != nil") + } else if that1.L1DcachePrefetchMisses != nil { + return fmt.Errorf("L1DcachePrefetchMisses this(%v) Not Equal that(%v)", this.L1DcachePrefetchMisses, that1.L1DcachePrefetchMisses) + } + if this.L1IcacheLoads != nil && that1.L1IcacheLoads != nil { + if *this.L1IcacheLoads != *that1.L1IcacheLoads { + return fmt.Errorf("L1IcacheLoads this(%v) Not Equal that(%v)", *this.L1IcacheLoads, *that1.L1IcacheLoads) + } + } else if this.L1IcacheLoads != nil { + return fmt.Errorf("this.L1IcacheLoads == nil && that.L1IcacheLoads != nil") + } else if that1.L1IcacheLoads != nil { + return fmt.Errorf("L1IcacheLoads this(%v) Not Equal that(%v)", this.L1IcacheLoads, that1.L1IcacheLoads) + } + if this.L1IcacheLoadMisses != nil && that1.L1IcacheLoadMisses != nil { + if *this.L1IcacheLoadMisses != *that1.L1IcacheLoadMisses { + return fmt.Errorf("L1IcacheLoadMisses this(%v) Not Equal that(%v)", *this.L1IcacheLoadMisses, *that1.L1IcacheLoadMisses) + } + } else if this.L1IcacheLoadMisses != nil { + return fmt.Errorf("this.L1IcacheLoadMisses == nil && that.L1IcacheLoadMisses != nil") + } else if that1.L1IcacheLoadMisses != nil { + return fmt.Errorf("L1IcacheLoadMisses this(%v) Not Equal that(%v)", this.L1IcacheLoadMisses, that1.L1IcacheLoadMisses) + } + if this.L1IcachePrefetches != nil && that1.L1IcachePrefetches != nil { + if *this.L1IcachePrefetches != *that1.L1IcachePrefetches { + return fmt.Errorf("L1IcachePrefetches this(%v) Not Equal that(%v)", *this.L1IcachePrefetches, *that1.L1IcachePrefetches) + } + } else if this.L1IcachePrefetches != nil { + return fmt.Errorf("this.L1IcachePrefetches == nil && that.L1IcachePrefetches != nil") + } else if that1.L1IcachePrefetches != nil { + return fmt.Errorf("L1IcachePrefetches this(%v) Not Equal that(%v)", this.L1IcachePrefetches, that1.L1IcachePrefetches) + } + if this.L1IcachePrefetchMisses != nil && that1.L1IcachePrefetchMisses != nil { + if *this.L1IcachePrefetchMisses != *that1.L1IcachePrefetchMisses { + return fmt.Errorf("L1IcachePrefetchMisses this(%v) Not Equal that(%v)", *this.L1IcachePrefetchMisses, *that1.L1IcachePrefetchMisses) + } + } else if this.L1IcachePrefetchMisses != nil { + return fmt.Errorf("this.L1IcachePrefetchMisses == nil && that.L1IcachePrefetchMisses != nil") + } else if that1.L1IcachePrefetchMisses != nil { + return fmt.Errorf("L1IcachePrefetchMisses this(%v) Not Equal that(%v)", this.L1IcachePrefetchMisses, that1.L1IcachePrefetchMisses) + } + if this.LLCLoads != nil && that1.LLCLoads != nil { + if *this.LLCLoads != *that1.LLCLoads { + return fmt.Errorf("LLCLoads this(%v) Not Equal that(%v)", *this.LLCLoads, *that1.LLCLoads) + } + } else if this.LLCLoads != nil { + return fmt.Errorf("this.LLCLoads == nil && that.LLCLoads != nil") + } else if that1.LLCLoads != nil { + return fmt.Errorf("LLCLoads this(%v) Not Equal that(%v)", this.LLCLoads, that1.LLCLoads) + } + if this.LLCLoadMisses != nil && that1.LLCLoadMisses != nil { + if *this.LLCLoadMisses != *that1.LLCLoadMisses { + return fmt.Errorf("LLCLoadMisses this(%v) Not Equal that(%v)", *this.LLCLoadMisses, *that1.LLCLoadMisses) + } + } else if this.LLCLoadMisses != nil { + return fmt.Errorf("this.LLCLoadMisses == nil && that.LLCLoadMisses != nil") + } else if that1.LLCLoadMisses != nil { + return fmt.Errorf("LLCLoadMisses this(%v) Not Equal that(%v)", this.LLCLoadMisses, that1.LLCLoadMisses) + } + if this.LLCStores != nil && that1.LLCStores != nil { + if *this.LLCStores != *that1.LLCStores { + return fmt.Errorf("LLCStores this(%v) Not Equal that(%v)", *this.LLCStores, *that1.LLCStores) + } + } else if this.LLCStores != nil { + return fmt.Errorf("this.LLCStores == nil && that.LLCStores != nil") + } else if that1.LLCStores != nil { + return fmt.Errorf("LLCStores this(%v) Not Equal that(%v)", this.LLCStores, that1.LLCStores) + } + if this.LLCStoreMisses != nil && that1.LLCStoreMisses != nil { + if *this.LLCStoreMisses != *that1.LLCStoreMisses { + return fmt.Errorf("LLCStoreMisses this(%v) Not Equal that(%v)", *this.LLCStoreMisses, *that1.LLCStoreMisses) + } + } else if this.LLCStoreMisses != nil { + return fmt.Errorf("this.LLCStoreMisses == nil && that.LLCStoreMisses != nil") + } else if that1.LLCStoreMisses != nil { + return fmt.Errorf("LLCStoreMisses this(%v) Not Equal that(%v)", this.LLCStoreMisses, that1.LLCStoreMisses) + } + if this.LLCPrefetches != nil && that1.LLCPrefetches != nil { + if *this.LLCPrefetches != *that1.LLCPrefetches { + return fmt.Errorf("LLCPrefetches this(%v) Not Equal that(%v)", *this.LLCPrefetches, *that1.LLCPrefetches) + } + } else if this.LLCPrefetches != nil { + return fmt.Errorf("this.LLCPrefetches == nil && that.LLCPrefetches != nil") + } else if that1.LLCPrefetches != nil { + return fmt.Errorf("LLCPrefetches this(%v) Not Equal that(%v)", this.LLCPrefetches, that1.LLCPrefetches) + } + if this.LLCPrefetchMisses != nil && that1.LLCPrefetchMisses != nil { + if *this.LLCPrefetchMisses != *that1.LLCPrefetchMisses { + return fmt.Errorf("LLCPrefetchMisses this(%v) Not Equal that(%v)", *this.LLCPrefetchMisses, *that1.LLCPrefetchMisses) + } + } else if this.LLCPrefetchMisses != nil { + return fmt.Errorf("this.LLCPrefetchMisses == nil && that.LLCPrefetchMisses != nil") + } else if that1.LLCPrefetchMisses != nil { + return fmt.Errorf("LLCPrefetchMisses this(%v) Not Equal that(%v)", this.LLCPrefetchMisses, that1.LLCPrefetchMisses) + } + if this.DTLBLoads != nil && that1.DTLBLoads != nil { + if *this.DTLBLoads != *that1.DTLBLoads { + return fmt.Errorf("DTLBLoads this(%v) Not Equal that(%v)", *this.DTLBLoads, *that1.DTLBLoads) + } + } else if this.DTLBLoads != nil { + return fmt.Errorf("this.DTLBLoads == nil && that.DTLBLoads != nil") + } else if that1.DTLBLoads != nil { + return fmt.Errorf("DTLBLoads this(%v) Not Equal that(%v)", this.DTLBLoads, that1.DTLBLoads) + } + if this.DTLBLoadMisses != nil && that1.DTLBLoadMisses != nil { + if *this.DTLBLoadMisses != *that1.DTLBLoadMisses { + return fmt.Errorf("DTLBLoadMisses this(%v) Not Equal that(%v)", *this.DTLBLoadMisses, *that1.DTLBLoadMisses) + } + } else if this.DTLBLoadMisses != nil { + return fmt.Errorf("this.DTLBLoadMisses == nil && that.DTLBLoadMisses != nil") + } else if that1.DTLBLoadMisses != nil { + return fmt.Errorf("DTLBLoadMisses this(%v) Not Equal that(%v)", this.DTLBLoadMisses, that1.DTLBLoadMisses) + } + if this.DTLBStores != nil && that1.DTLBStores != nil { + if *this.DTLBStores != *that1.DTLBStores { + return fmt.Errorf("DTLBStores this(%v) Not Equal that(%v)", *this.DTLBStores, *that1.DTLBStores) + } + } else if this.DTLBStores != nil { + return fmt.Errorf("this.DTLBStores == nil && that.DTLBStores != nil") + } else if that1.DTLBStores != nil { + return fmt.Errorf("DTLBStores this(%v) Not Equal that(%v)", this.DTLBStores, that1.DTLBStores) + } + if this.DTLBStoreMisses != nil && that1.DTLBStoreMisses != nil { + if *this.DTLBStoreMisses != *that1.DTLBStoreMisses { + return fmt.Errorf("DTLBStoreMisses this(%v) Not Equal that(%v)", *this.DTLBStoreMisses, *that1.DTLBStoreMisses) + } + } else if this.DTLBStoreMisses != nil { + return fmt.Errorf("this.DTLBStoreMisses == nil && that.DTLBStoreMisses != nil") + } else if that1.DTLBStoreMisses != nil { + return fmt.Errorf("DTLBStoreMisses this(%v) Not Equal that(%v)", this.DTLBStoreMisses, that1.DTLBStoreMisses) + } + if this.DTLBPrefetches != nil && that1.DTLBPrefetches != nil { + if *this.DTLBPrefetches != *that1.DTLBPrefetches { + return fmt.Errorf("DTLBPrefetches this(%v) Not Equal that(%v)", *this.DTLBPrefetches, *that1.DTLBPrefetches) + } + } else if this.DTLBPrefetches != nil { + return fmt.Errorf("this.DTLBPrefetches == nil && that.DTLBPrefetches != nil") + } else if that1.DTLBPrefetches != nil { + return fmt.Errorf("DTLBPrefetches this(%v) Not Equal that(%v)", this.DTLBPrefetches, that1.DTLBPrefetches) + } + if this.DTLBPrefetchMisses != nil && that1.DTLBPrefetchMisses != nil { + if *this.DTLBPrefetchMisses != *that1.DTLBPrefetchMisses { + return fmt.Errorf("DTLBPrefetchMisses this(%v) Not Equal that(%v)", *this.DTLBPrefetchMisses, *that1.DTLBPrefetchMisses) + } + } else if this.DTLBPrefetchMisses != nil { + return fmt.Errorf("this.DTLBPrefetchMisses == nil && that.DTLBPrefetchMisses != nil") + } else if that1.DTLBPrefetchMisses != nil { + return fmt.Errorf("DTLBPrefetchMisses this(%v) Not Equal that(%v)", this.DTLBPrefetchMisses, that1.DTLBPrefetchMisses) + } + if this.ITLBLoads != nil && that1.ITLBLoads != nil { + if *this.ITLBLoads != *that1.ITLBLoads { + return fmt.Errorf("ITLBLoads this(%v) Not Equal that(%v)", *this.ITLBLoads, *that1.ITLBLoads) + } + } else if this.ITLBLoads != nil { + return fmt.Errorf("this.ITLBLoads == nil && that.ITLBLoads != nil") + } else if that1.ITLBLoads != nil { + return fmt.Errorf("ITLBLoads this(%v) Not Equal that(%v)", this.ITLBLoads, that1.ITLBLoads) + } + if this.ITLBLoadMisses != nil && that1.ITLBLoadMisses != nil { + if *this.ITLBLoadMisses != *that1.ITLBLoadMisses { + return fmt.Errorf("ITLBLoadMisses this(%v) Not Equal that(%v)", *this.ITLBLoadMisses, *that1.ITLBLoadMisses) + } + } else if this.ITLBLoadMisses != nil { + return fmt.Errorf("this.ITLBLoadMisses == nil && that.ITLBLoadMisses != nil") + } else if that1.ITLBLoadMisses != nil { + return fmt.Errorf("ITLBLoadMisses this(%v) Not Equal that(%v)", this.ITLBLoadMisses, that1.ITLBLoadMisses) + } + if this.BranchLoads != nil && that1.BranchLoads != nil { + if *this.BranchLoads != *that1.BranchLoads { + return fmt.Errorf("BranchLoads this(%v) Not Equal that(%v)", *this.BranchLoads, *that1.BranchLoads) + } + } else if this.BranchLoads != nil { + return fmt.Errorf("this.BranchLoads == nil && that.BranchLoads != nil") + } else if that1.BranchLoads != nil { + return fmt.Errorf("BranchLoads this(%v) Not Equal that(%v)", this.BranchLoads, that1.BranchLoads) + } + if this.BranchLoadMisses != nil && that1.BranchLoadMisses != nil { + if *this.BranchLoadMisses != *that1.BranchLoadMisses { + return fmt.Errorf("BranchLoadMisses this(%v) Not Equal that(%v)", *this.BranchLoadMisses, *that1.BranchLoadMisses) + } + } else if this.BranchLoadMisses != nil { + return fmt.Errorf("this.BranchLoadMisses == nil && that.BranchLoadMisses != nil") + } else if that1.BranchLoadMisses != nil { + return fmt.Errorf("BranchLoadMisses this(%v) Not Equal that(%v)", this.BranchLoadMisses, that1.BranchLoadMisses) + } + if this.NodeLoads != nil && that1.NodeLoads != nil { + if *this.NodeLoads != *that1.NodeLoads { + return fmt.Errorf("NodeLoads this(%v) Not Equal that(%v)", *this.NodeLoads, *that1.NodeLoads) + } + } else if this.NodeLoads != nil { + return fmt.Errorf("this.NodeLoads == nil && that.NodeLoads != nil") + } else if that1.NodeLoads != nil { + return fmt.Errorf("NodeLoads this(%v) Not Equal that(%v)", this.NodeLoads, that1.NodeLoads) + } + if this.NodeLoadMisses != nil && that1.NodeLoadMisses != nil { + if *this.NodeLoadMisses != *that1.NodeLoadMisses { + return fmt.Errorf("NodeLoadMisses this(%v) Not Equal that(%v)", *this.NodeLoadMisses, *that1.NodeLoadMisses) + } + } else if this.NodeLoadMisses != nil { + return fmt.Errorf("this.NodeLoadMisses == nil && that.NodeLoadMisses != nil") + } else if that1.NodeLoadMisses != nil { + return fmt.Errorf("NodeLoadMisses this(%v) Not Equal that(%v)", this.NodeLoadMisses, that1.NodeLoadMisses) + } + if this.NodeStores != nil && that1.NodeStores != nil { + if *this.NodeStores != *that1.NodeStores { + return fmt.Errorf("NodeStores this(%v) Not Equal that(%v)", *this.NodeStores, *that1.NodeStores) + } + } else if this.NodeStores != nil { + return fmt.Errorf("this.NodeStores == nil && that.NodeStores != nil") + } else if that1.NodeStores != nil { + return fmt.Errorf("NodeStores this(%v) Not Equal that(%v)", this.NodeStores, that1.NodeStores) + } + if this.NodeStoreMisses != nil && that1.NodeStoreMisses != nil { + if *this.NodeStoreMisses != *that1.NodeStoreMisses { + return fmt.Errorf("NodeStoreMisses this(%v) Not Equal that(%v)", *this.NodeStoreMisses, *that1.NodeStoreMisses) + } + } else if this.NodeStoreMisses != nil { + return fmt.Errorf("this.NodeStoreMisses == nil && that.NodeStoreMisses != nil") + } else if that1.NodeStoreMisses != nil { + return fmt.Errorf("NodeStoreMisses this(%v) Not Equal that(%v)", this.NodeStoreMisses, that1.NodeStoreMisses) + } + if this.NodePrefetches != nil && that1.NodePrefetches != nil { + if *this.NodePrefetches != *that1.NodePrefetches { + return fmt.Errorf("NodePrefetches this(%v) Not Equal that(%v)", *this.NodePrefetches, *that1.NodePrefetches) + } + } else if this.NodePrefetches != nil { + return fmt.Errorf("this.NodePrefetches == nil && that.NodePrefetches != nil") + } else if that1.NodePrefetches != nil { + return fmt.Errorf("NodePrefetches this(%v) Not Equal that(%v)", this.NodePrefetches, that1.NodePrefetches) + } + if this.NodePrefetchMisses != nil && that1.NodePrefetchMisses != nil { + if *this.NodePrefetchMisses != *that1.NodePrefetchMisses { + return fmt.Errorf("NodePrefetchMisses this(%v) Not Equal that(%v)", *this.NodePrefetchMisses, *that1.NodePrefetchMisses) + } + } else if this.NodePrefetchMisses != nil { + return fmt.Errorf("this.NodePrefetchMisses == nil && that.NodePrefetchMisses != nil") + } else if that1.NodePrefetchMisses != nil { + return fmt.Errorf("NodePrefetchMisses this(%v) Not Equal that(%v)", this.NodePrefetchMisses, that1.NodePrefetchMisses) + } + return nil +} +func (this *PerfStatistics) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*PerfStatistics) + if !ok { + that2, ok := that.(PerfStatistics) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Timestamp != that1.Timestamp { + return false + } + if this.Duration != that1.Duration { + return false + } + if this.Cycles != nil && that1.Cycles != nil { + if *this.Cycles != *that1.Cycles { + return false + } + } else if this.Cycles != nil { + return false + } else if that1.Cycles != nil { + return false + } + if this.StalledCyclesFrontend != nil && that1.StalledCyclesFrontend != nil { + if *this.StalledCyclesFrontend != *that1.StalledCyclesFrontend { + return false + } + } else if this.StalledCyclesFrontend != nil { + return false + } else if that1.StalledCyclesFrontend != nil { + return false + } + if this.StalledCyclesBackend != nil && that1.StalledCyclesBackend != nil { + if *this.StalledCyclesBackend != *that1.StalledCyclesBackend { + return false + } + } else if this.StalledCyclesBackend != nil { + return false + } else if that1.StalledCyclesBackend != nil { + return false + } + if this.Instructions != nil && that1.Instructions != nil { + if *this.Instructions != *that1.Instructions { + return false + } + } else if this.Instructions != nil { + return false + } else if that1.Instructions != nil { + return false + } + if this.CacheReferences != nil && that1.CacheReferences != nil { + if *this.CacheReferences != *that1.CacheReferences { + return false + } + } else if this.CacheReferences != nil { + return false + } else if that1.CacheReferences != nil { + return false + } + if this.CacheMisses != nil && that1.CacheMisses != nil { + if *this.CacheMisses != *that1.CacheMisses { + return false + } + } else if this.CacheMisses != nil { + return false + } else if that1.CacheMisses != nil { + return false + } + if this.Branches != nil && that1.Branches != nil { + if *this.Branches != *that1.Branches { + return false + } + } else if this.Branches != nil { + return false + } else if that1.Branches != nil { + return false + } + if this.BranchMisses != nil && that1.BranchMisses != nil { + if *this.BranchMisses != *that1.BranchMisses { + return false + } + } else if this.BranchMisses != nil { + return false + } else if that1.BranchMisses != nil { + return false + } + if this.BusCycles != nil && that1.BusCycles != nil { + if *this.BusCycles != *that1.BusCycles { + return false + } + } else if this.BusCycles != nil { + return false + } else if that1.BusCycles != nil { + return false + } + if this.RefCycles != nil && that1.RefCycles != nil { + if *this.RefCycles != *that1.RefCycles { + return false + } + } else if this.RefCycles != nil { + return false + } else if that1.RefCycles != nil { + return false + } + if this.CPUClock != nil && that1.CPUClock != nil { + if *this.CPUClock != *that1.CPUClock { + return false + } + } else if this.CPUClock != nil { + return false + } else if that1.CPUClock != nil { + return false + } + if this.TaskClock != nil && that1.TaskClock != nil { + if *this.TaskClock != *that1.TaskClock { + return false + } + } else if this.TaskClock != nil { + return false + } else if that1.TaskClock != nil { + return false + } + if this.PageFaults != nil && that1.PageFaults != nil { + if *this.PageFaults != *that1.PageFaults { + return false + } + } else if this.PageFaults != nil { + return false + } else if that1.PageFaults != nil { + return false + } + if this.MinorFaults != nil && that1.MinorFaults != nil { + if *this.MinorFaults != *that1.MinorFaults { + return false + } + } else if this.MinorFaults != nil { + return false + } else if that1.MinorFaults != nil { + return false + } + if this.MajorFaults != nil && that1.MajorFaults != nil { + if *this.MajorFaults != *that1.MajorFaults { + return false + } + } else if this.MajorFaults != nil { + return false + } else if that1.MajorFaults != nil { + return false + } + if this.ContextSwitches != nil && that1.ContextSwitches != nil { + if *this.ContextSwitches != *that1.ContextSwitches { + return false + } + } else if this.ContextSwitches != nil { + return false + } else if that1.ContextSwitches != nil { + return false + } + if this.CPUMigrations != nil && that1.CPUMigrations != nil { + if *this.CPUMigrations != *that1.CPUMigrations { + return false + } + } else if this.CPUMigrations != nil { + return false + } else if that1.CPUMigrations != nil { + return false + } + if this.AlignmentFaults != nil && that1.AlignmentFaults != nil { + if *this.AlignmentFaults != *that1.AlignmentFaults { + return false + } + } else if this.AlignmentFaults != nil { + return false + } else if that1.AlignmentFaults != nil { + return false + } + if this.EmulationFaults != nil && that1.EmulationFaults != nil { + if *this.EmulationFaults != *that1.EmulationFaults { + return false + } + } else if this.EmulationFaults != nil { + return false + } else if that1.EmulationFaults != nil { + return false + } + if this.L1DcacheLoads != nil && that1.L1DcacheLoads != nil { + if *this.L1DcacheLoads != *that1.L1DcacheLoads { + return false + } + } else if this.L1DcacheLoads != nil { + return false + } else if that1.L1DcacheLoads != nil { + return false + } + if this.L1DcacheLoadMisses != nil && that1.L1DcacheLoadMisses != nil { + if *this.L1DcacheLoadMisses != *that1.L1DcacheLoadMisses { + return false + } + } else if this.L1DcacheLoadMisses != nil { + return false + } else if that1.L1DcacheLoadMisses != nil { + return false + } + if this.L1DcacheStores != nil && that1.L1DcacheStores != nil { + if *this.L1DcacheStores != *that1.L1DcacheStores { + return false + } + } else if this.L1DcacheStores != nil { + return false + } else if that1.L1DcacheStores != nil { + return false + } + if this.L1DcacheStoreMisses != nil && that1.L1DcacheStoreMisses != nil { + if *this.L1DcacheStoreMisses != *that1.L1DcacheStoreMisses { + return false + } + } else if this.L1DcacheStoreMisses != nil { + return false + } else if that1.L1DcacheStoreMisses != nil { + return false + } + if this.L1DcachePrefetches != nil && that1.L1DcachePrefetches != nil { + if *this.L1DcachePrefetches != *that1.L1DcachePrefetches { + return false + } + } else if this.L1DcachePrefetches != nil { + return false + } else if that1.L1DcachePrefetches != nil { + return false + } + if this.L1DcachePrefetchMisses != nil && that1.L1DcachePrefetchMisses != nil { + if *this.L1DcachePrefetchMisses != *that1.L1DcachePrefetchMisses { + return false + } + } else if this.L1DcachePrefetchMisses != nil { + return false + } else if that1.L1DcachePrefetchMisses != nil { + return false + } + if this.L1IcacheLoads != nil && that1.L1IcacheLoads != nil { + if *this.L1IcacheLoads != *that1.L1IcacheLoads { + return false + } + } else if this.L1IcacheLoads != nil { + return false + } else if that1.L1IcacheLoads != nil { + return false + } + if this.L1IcacheLoadMisses != nil && that1.L1IcacheLoadMisses != nil { + if *this.L1IcacheLoadMisses != *that1.L1IcacheLoadMisses { + return false + } + } else if this.L1IcacheLoadMisses != nil { + return false + } else if that1.L1IcacheLoadMisses != nil { + return false + } + if this.L1IcachePrefetches != nil && that1.L1IcachePrefetches != nil { + if *this.L1IcachePrefetches != *that1.L1IcachePrefetches { + return false + } + } else if this.L1IcachePrefetches != nil { + return false + } else if that1.L1IcachePrefetches != nil { + return false + } + if this.L1IcachePrefetchMisses != nil && that1.L1IcachePrefetchMisses != nil { + if *this.L1IcachePrefetchMisses != *that1.L1IcachePrefetchMisses { + return false + } + } else if this.L1IcachePrefetchMisses != nil { + return false + } else if that1.L1IcachePrefetchMisses != nil { + return false + } + if this.LLCLoads != nil && that1.LLCLoads != nil { + if *this.LLCLoads != *that1.LLCLoads { + return false + } + } else if this.LLCLoads != nil { + return false + } else if that1.LLCLoads != nil { + return false + } + if this.LLCLoadMisses != nil && that1.LLCLoadMisses != nil { + if *this.LLCLoadMisses != *that1.LLCLoadMisses { + return false + } + } else if this.LLCLoadMisses != nil { + return false + } else if that1.LLCLoadMisses != nil { + return false + } + if this.LLCStores != nil && that1.LLCStores != nil { + if *this.LLCStores != *that1.LLCStores { + return false + } + } else if this.LLCStores != nil { + return false + } else if that1.LLCStores != nil { + return false + } + if this.LLCStoreMisses != nil && that1.LLCStoreMisses != nil { + if *this.LLCStoreMisses != *that1.LLCStoreMisses { + return false + } + } else if this.LLCStoreMisses != nil { + return false + } else if that1.LLCStoreMisses != nil { + return false + } + if this.LLCPrefetches != nil && that1.LLCPrefetches != nil { + if *this.LLCPrefetches != *that1.LLCPrefetches { + return false + } + } else if this.LLCPrefetches != nil { + return false + } else if that1.LLCPrefetches != nil { + return false + } + if this.LLCPrefetchMisses != nil && that1.LLCPrefetchMisses != nil { + if *this.LLCPrefetchMisses != *that1.LLCPrefetchMisses { + return false + } + } else if this.LLCPrefetchMisses != nil { + return false + } else if that1.LLCPrefetchMisses != nil { + return false + } + if this.DTLBLoads != nil && that1.DTLBLoads != nil { + if *this.DTLBLoads != *that1.DTLBLoads { + return false + } + } else if this.DTLBLoads != nil { + return false + } else if that1.DTLBLoads != nil { + return false + } + if this.DTLBLoadMisses != nil && that1.DTLBLoadMisses != nil { + if *this.DTLBLoadMisses != *that1.DTLBLoadMisses { + return false + } + } else if this.DTLBLoadMisses != nil { + return false + } else if that1.DTLBLoadMisses != nil { + return false + } + if this.DTLBStores != nil && that1.DTLBStores != nil { + if *this.DTLBStores != *that1.DTLBStores { + return false + } + } else if this.DTLBStores != nil { + return false + } else if that1.DTLBStores != nil { + return false + } + if this.DTLBStoreMisses != nil && that1.DTLBStoreMisses != nil { + if *this.DTLBStoreMisses != *that1.DTLBStoreMisses { + return false + } + } else if this.DTLBStoreMisses != nil { + return false + } else if that1.DTLBStoreMisses != nil { + return false + } + if this.DTLBPrefetches != nil && that1.DTLBPrefetches != nil { + if *this.DTLBPrefetches != *that1.DTLBPrefetches { + return false + } + } else if this.DTLBPrefetches != nil { + return false + } else if that1.DTLBPrefetches != nil { + return false + } + if this.DTLBPrefetchMisses != nil && that1.DTLBPrefetchMisses != nil { + if *this.DTLBPrefetchMisses != *that1.DTLBPrefetchMisses { + return false + } + } else if this.DTLBPrefetchMisses != nil { + return false + } else if that1.DTLBPrefetchMisses != nil { + return false + } + if this.ITLBLoads != nil && that1.ITLBLoads != nil { + if *this.ITLBLoads != *that1.ITLBLoads { + return false + } + } else if this.ITLBLoads != nil { + return false + } else if that1.ITLBLoads != nil { + return false + } + if this.ITLBLoadMisses != nil && that1.ITLBLoadMisses != nil { + if *this.ITLBLoadMisses != *that1.ITLBLoadMisses { + return false + } + } else if this.ITLBLoadMisses != nil { + return false + } else if that1.ITLBLoadMisses != nil { + return false + } + if this.BranchLoads != nil && that1.BranchLoads != nil { + if *this.BranchLoads != *that1.BranchLoads { + return false + } + } else if this.BranchLoads != nil { + return false + } else if that1.BranchLoads != nil { + return false + } + if this.BranchLoadMisses != nil && that1.BranchLoadMisses != nil { + if *this.BranchLoadMisses != *that1.BranchLoadMisses { + return false + } + } else if this.BranchLoadMisses != nil { + return false + } else if that1.BranchLoadMisses != nil { + return false + } + if this.NodeLoads != nil && that1.NodeLoads != nil { + if *this.NodeLoads != *that1.NodeLoads { + return false + } + } else if this.NodeLoads != nil { + return false + } else if that1.NodeLoads != nil { + return false + } + if this.NodeLoadMisses != nil && that1.NodeLoadMisses != nil { + if *this.NodeLoadMisses != *that1.NodeLoadMisses { + return false + } + } else if this.NodeLoadMisses != nil { + return false + } else if that1.NodeLoadMisses != nil { + return false + } + if this.NodeStores != nil && that1.NodeStores != nil { + if *this.NodeStores != *that1.NodeStores { + return false + } + } else if this.NodeStores != nil { + return false + } else if that1.NodeStores != nil { + return false + } + if this.NodeStoreMisses != nil && that1.NodeStoreMisses != nil { + if *this.NodeStoreMisses != *that1.NodeStoreMisses { + return false + } + } else if this.NodeStoreMisses != nil { + return false + } else if that1.NodeStoreMisses != nil { + return false + } + if this.NodePrefetches != nil && that1.NodePrefetches != nil { + if *this.NodePrefetches != *that1.NodePrefetches { + return false + } + } else if this.NodePrefetches != nil { + return false + } else if that1.NodePrefetches != nil { + return false + } + if this.NodePrefetchMisses != nil && that1.NodePrefetchMisses != nil { + if *this.NodePrefetchMisses != *that1.NodePrefetchMisses { + return false + } + } else if this.NodePrefetchMisses != nil { + return false + } else if that1.NodePrefetchMisses != nil { + return false + } + return true +} +func (this *Request) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Request) + if !ok { + that2, ok := that.(Request) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Request") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Request but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Request but is not nil && this == nil") + } + if !this.AgentID.Equal(that1.AgentID) { + return fmt.Errorf("AgentID this(%v) Not Equal that(%v)", this.AgentID, that1.AgentID) + } + if len(this.Resources) != len(that1.Resources) { + return fmt.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return fmt.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) + } + } + return nil +} +func (this *Request) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Request) + if !ok { + that2, ok := that.(Request) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.AgentID.Equal(that1.AgentID) { + return false + } + if len(this.Resources) != len(that1.Resources) { + return false + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return false + } + } + return true +} +func (this *Offer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Offer) + if !ok { + that2, ok := that.(Offer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Offer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Offer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Offer but is not nil && this == nil") + } + if !this.ID.Equal(&that1.ID) { + return fmt.Errorf("ID this(%v) Not Equal that(%v)", this.ID, that1.ID) + } + if !this.FrameworkID.Equal(&that1.FrameworkID) { + return fmt.Errorf("FrameworkID this(%v) Not Equal that(%v)", this.FrameworkID, that1.FrameworkID) + } + if !this.AgentID.Equal(&that1.AgentID) { + return fmt.Errorf("AgentID this(%v) Not Equal that(%v)", this.AgentID, that1.AgentID) + } + if this.Hostname != that1.Hostname { + return fmt.Errorf("Hostname this(%v) Not Equal that(%v)", this.Hostname, that1.Hostname) + } + if !this.URL.Equal(that1.URL) { + return fmt.Errorf("URL this(%v) Not Equal that(%v)", this.URL, that1.URL) + } + if !this.Domain.Equal(that1.Domain) { + return fmt.Errorf("Domain this(%v) Not Equal that(%v)", this.Domain, that1.Domain) + } + if len(this.Resources) != len(that1.Resources) { + return fmt.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return fmt.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) + } + } + if len(this.Attributes) != len(that1.Attributes) { + return fmt.Errorf("Attributes this(%v) Not Equal that(%v)", len(this.Attributes), len(that1.Attributes)) + } + for i := range this.Attributes { + if !this.Attributes[i].Equal(&that1.Attributes[i]) { + return fmt.Errorf("Attributes this[%v](%v) Not Equal that[%v](%v)", i, this.Attributes[i], i, that1.Attributes[i]) + } + } + if len(this.ExecutorIDs) != len(that1.ExecutorIDs) { + return fmt.Errorf("ExecutorIDs this(%v) Not Equal that(%v)", len(this.ExecutorIDs), len(that1.ExecutorIDs)) + } + for i := range this.ExecutorIDs { + if !this.ExecutorIDs[i].Equal(&that1.ExecutorIDs[i]) { + return fmt.Errorf("ExecutorIDs this[%v](%v) Not Equal that[%v](%v)", i, this.ExecutorIDs[i], i, that1.ExecutorIDs[i]) + } + } + if !this.Unavailability.Equal(that1.Unavailability) { + return fmt.Errorf("Unavailability this(%v) Not Equal that(%v)", this.Unavailability, that1.Unavailability) + } + if !this.AllocationInfo.Equal(that1.AllocationInfo) { + return fmt.Errorf("AllocationInfo this(%v) Not Equal that(%v)", this.AllocationInfo, that1.AllocationInfo) + } + return nil +} +func (this *Offer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Offer) + if !ok { + that2, ok := that.(Offer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.ID.Equal(&that1.ID) { + return false + } + if !this.FrameworkID.Equal(&that1.FrameworkID) { + return false + } + if !this.AgentID.Equal(&that1.AgentID) { + return false + } + if this.Hostname != that1.Hostname { + return false + } + if !this.URL.Equal(that1.URL) { + return false + } + if !this.Domain.Equal(that1.Domain) { + return false + } + if len(this.Resources) != len(that1.Resources) { + return false + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return false + } + } + if len(this.Attributes) != len(that1.Attributes) { + return false + } + for i := range this.Attributes { + if !this.Attributes[i].Equal(&that1.Attributes[i]) { + return false + } + } + if len(this.ExecutorIDs) != len(that1.ExecutorIDs) { + return false + } + for i := range this.ExecutorIDs { + if !this.ExecutorIDs[i].Equal(&that1.ExecutorIDs[i]) { + return false + } + } + if !this.Unavailability.Equal(that1.Unavailability) { + return false + } + if !this.AllocationInfo.Equal(that1.AllocationInfo) { + return false + } + return true +} +func (this *Offer_Operation) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Offer_Operation) + if !ok { + that2, ok := that.(Offer_Operation) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Offer_Operation") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Offer_Operation but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Offer_Operation but is not nil && this == nil") + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.ID.Equal(that1.ID) { + return fmt.Errorf("ID this(%v) Not Equal that(%v)", this.ID, that1.ID) + } + if !this.Launch.Equal(that1.Launch) { + return fmt.Errorf("Launch this(%v) Not Equal that(%v)", this.Launch, that1.Launch) + } + if !this.LaunchGroup.Equal(that1.LaunchGroup) { + return fmt.Errorf("LaunchGroup this(%v) Not Equal that(%v)", this.LaunchGroup, that1.LaunchGroup) + } + if !this.Reserve.Equal(that1.Reserve) { + return fmt.Errorf("Reserve this(%v) Not Equal that(%v)", this.Reserve, that1.Reserve) + } + if !this.Unreserve.Equal(that1.Unreserve) { + return fmt.Errorf("Unreserve this(%v) Not Equal that(%v)", this.Unreserve, that1.Unreserve) + } + if !this.Create.Equal(that1.Create) { + return fmt.Errorf("Create this(%v) Not Equal that(%v)", this.Create, that1.Create) + } + if !this.Destroy.Equal(that1.Destroy) { + return fmt.Errorf("Destroy this(%v) Not Equal that(%v)", this.Destroy, that1.Destroy) + } + if !this.CreateVolume.Equal(that1.CreateVolume) { + return fmt.Errorf("CreateVolume this(%v) Not Equal that(%v)", this.CreateVolume, that1.CreateVolume) + } + if !this.DestroyVolume.Equal(that1.DestroyVolume) { + return fmt.Errorf("DestroyVolume this(%v) Not Equal that(%v)", this.DestroyVolume, that1.DestroyVolume) + } + if !this.CreateBlock.Equal(that1.CreateBlock) { + return fmt.Errorf("CreateBlock this(%v) Not Equal that(%v)", this.CreateBlock, that1.CreateBlock) + } + if !this.DestroyBlock.Equal(that1.DestroyBlock) { + return fmt.Errorf("DestroyBlock this(%v) Not Equal that(%v)", this.DestroyBlock, that1.DestroyBlock) + } + return nil +} +func (this *Offer_Operation) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Offer_Operation) + if !ok { + that2, ok := that.(Offer_Operation) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + if !this.ID.Equal(that1.ID) { + return false + } + if !this.Launch.Equal(that1.Launch) { + return false + } + if !this.LaunchGroup.Equal(that1.LaunchGroup) { + return false + } + if !this.Reserve.Equal(that1.Reserve) { + return false + } + if !this.Unreserve.Equal(that1.Unreserve) { + return false + } + if !this.Create.Equal(that1.Create) { + return false + } + if !this.Destroy.Equal(that1.Destroy) { + return false + } + if !this.CreateVolume.Equal(that1.CreateVolume) { + return false + } + if !this.DestroyVolume.Equal(that1.DestroyVolume) { + return false + } + if !this.CreateBlock.Equal(that1.CreateBlock) { + return false + } + if !this.DestroyBlock.Equal(that1.DestroyBlock) { + return false + } + return true +} +func (this *Offer_Operation_Launch) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Offer_Operation_Launch) + if !ok { + that2, ok := that.(Offer_Operation_Launch) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Offer_Operation_Launch") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Offer_Operation_Launch but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Offer_Operation_Launch but is not nil && this == nil") + } + if len(this.TaskInfos) != len(that1.TaskInfos) { + return fmt.Errorf("TaskInfos this(%v) Not Equal that(%v)", len(this.TaskInfos), len(that1.TaskInfos)) + } + for i := range this.TaskInfos { + if !this.TaskInfos[i].Equal(&that1.TaskInfos[i]) { + return fmt.Errorf("TaskInfos this[%v](%v) Not Equal that[%v](%v)", i, this.TaskInfos[i], i, that1.TaskInfos[i]) + } + } + return nil +} +func (this *Offer_Operation_Launch) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Offer_Operation_Launch) + if !ok { + that2, ok := that.(Offer_Operation_Launch) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.TaskInfos) != len(that1.TaskInfos) { + return false + } + for i := range this.TaskInfos { + if !this.TaskInfos[i].Equal(&that1.TaskInfos[i]) { + return false + } + } + return true +} +func (this *Offer_Operation_LaunchGroup) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Offer_Operation_LaunchGroup) + if !ok { + that2, ok := that.(Offer_Operation_LaunchGroup) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Offer_Operation_LaunchGroup") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Offer_Operation_LaunchGroup but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Offer_Operation_LaunchGroup but is not nil && this == nil") + } + if !this.Executor.Equal(&that1.Executor) { + return fmt.Errorf("Executor this(%v) Not Equal that(%v)", this.Executor, that1.Executor) + } + if !this.TaskGroup.Equal(&that1.TaskGroup) { + return fmt.Errorf("TaskGroup this(%v) Not Equal that(%v)", this.TaskGroup, that1.TaskGroup) + } + return nil +} +func (this *Offer_Operation_LaunchGroup) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Offer_Operation_LaunchGroup) + if !ok { + that2, ok := that.(Offer_Operation_LaunchGroup) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Executor.Equal(&that1.Executor) { + return false + } + if !this.TaskGroup.Equal(&that1.TaskGroup) { + return false + } + return true +} +func (this *Offer_Operation_Reserve) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Offer_Operation_Reserve) + if !ok { + that2, ok := that.(Offer_Operation_Reserve) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Offer_Operation_Reserve") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Offer_Operation_Reserve but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Offer_Operation_Reserve but is not nil && this == nil") + } + if len(this.Resources) != len(that1.Resources) { + return fmt.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return fmt.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) + } + } + return nil +} +func (this *Offer_Operation_Reserve) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Offer_Operation_Reserve) + if !ok { + that2, ok := that.(Offer_Operation_Reserve) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Resources) != len(that1.Resources) { + return false + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return false + } + } + return true +} +func (this *Offer_Operation_Unreserve) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Offer_Operation_Unreserve) + if !ok { + that2, ok := that.(Offer_Operation_Unreserve) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Offer_Operation_Unreserve") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Offer_Operation_Unreserve but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Offer_Operation_Unreserve but is not nil && this == nil") + } + if len(this.Resources) != len(that1.Resources) { + return fmt.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return fmt.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) + } + } + return nil +} +func (this *Offer_Operation_Unreserve) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Offer_Operation_Unreserve) + if !ok { + that2, ok := that.(Offer_Operation_Unreserve) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Resources) != len(that1.Resources) { + return false + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return false + } + } + return true +} +func (this *Offer_Operation_Create) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Offer_Operation_Create) + if !ok { + that2, ok := that.(Offer_Operation_Create) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Offer_Operation_Create") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Offer_Operation_Create but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Offer_Operation_Create but is not nil && this == nil") + } + if len(this.Volumes) != len(that1.Volumes) { + return fmt.Errorf("Volumes this(%v) Not Equal that(%v)", len(this.Volumes), len(that1.Volumes)) + } + for i := range this.Volumes { + if !this.Volumes[i].Equal(&that1.Volumes[i]) { + return fmt.Errorf("Volumes this[%v](%v) Not Equal that[%v](%v)", i, this.Volumes[i], i, that1.Volumes[i]) + } + } + return nil +} +func (this *Offer_Operation_Create) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Offer_Operation_Create) + if !ok { + that2, ok := that.(Offer_Operation_Create) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Volumes) != len(that1.Volumes) { + return false + } + for i := range this.Volumes { + if !this.Volumes[i].Equal(&that1.Volumes[i]) { + return false + } + } + return true +} +func (this *Offer_Operation_Destroy) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Offer_Operation_Destroy) + if !ok { + that2, ok := that.(Offer_Operation_Destroy) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Offer_Operation_Destroy") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Offer_Operation_Destroy but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Offer_Operation_Destroy but is not nil && this == nil") + } + if len(this.Volumes) != len(that1.Volumes) { + return fmt.Errorf("Volumes this(%v) Not Equal that(%v)", len(this.Volumes), len(that1.Volumes)) + } + for i := range this.Volumes { + if !this.Volumes[i].Equal(&that1.Volumes[i]) { + return fmt.Errorf("Volumes this[%v](%v) Not Equal that[%v](%v)", i, this.Volumes[i], i, that1.Volumes[i]) + } + } + return nil +} +func (this *Offer_Operation_Destroy) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Offer_Operation_Destroy) + if !ok { + that2, ok := that.(Offer_Operation_Destroy) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Volumes) != len(that1.Volumes) { + return false + } + for i := range this.Volumes { + if !this.Volumes[i].Equal(&that1.Volumes[i]) { + return false + } + } + return true +} +func (this *Offer_Operation_CreateVolume) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Offer_Operation_CreateVolume) + if !ok { + that2, ok := that.(Offer_Operation_CreateVolume) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Offer_Operation_CreateVolume") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Offer_Operation_CreateVolume but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Offer_Operation_CreateVolume but is not nil && this == nil") + } + if !this.Source.Equal(&that1.Source) { + return fmt.Errorf("Source this(%v) Not Equal that(%v)", this.Source, that1.Source) + } + if this.TargetType != that1.TargetType { + return fmt.Errorf("TargetType this(%v) Not Equal that(%v)", this.TargetType, that1.TargetType) + } + return nil +} +func (this *Offer_Operation_CreateVolume) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Offer_Operation_CreateVolume) + if !ok { + that2, ok := that.(Offer_Operation_CreateVolume) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Source.Equal(&that1.Source) { + return false + } + if this.TargetType != that1.TargetType { + return false + } + return true +} +func (this *Offer_Operation_DestroyVolume) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Offer_Operation_DestroyVolume) + if !ok { + that2, ok := that.(Offer_Operation_DestroyVolume) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Offer_Operation_DestroyVolume") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Offer_Operation_DestroyVolume but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Offer_Operation_DestroyVolume but is not nil && this == nil") + } + if !this.Volume.Equal(&that1.Volume) { + return fmt.Errorf("Volume this(%v) Not Equal that(%v)", this.Volume, that1.Volume) + } + return nil +} +func (this *Offer_Operation_DestroyVolume) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Offer_Operation_DestroyVolume) + if !ok { + that2, ok := that.(Offer_Operation_DestroyVolume) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Volume.Equal(&that1.Volume) { + return false + } + return true +} +func (this *Offer_Operation_CreateBlock) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Offer_Operation_CreateBlock) + if !ok { + that2, ok := that.(Offer_Operation_CreateBlock) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Offer_Operation_CreateBlock") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Offer_Operation_CreateBlock but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Offer_Operation_CreateBlock but is not nil && this == nil") + } + if !this.Source.Equal(&that1.Source) { + return fmt.Errorf("Source this(%v) Not Equal that(%v)", this.Source, that1.Source) + } + return nil +} +func (this *Offer_Operation_CreateBlock) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Offer_Operation_CreateBlock) + if !ok { + that2, ok := that.(Offer_Operation_CreateBlock) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Source.Equal(&that1.Source) { + return false + } + return true +} +func (this *Offer_Operation_DestroyBlock) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Offer_Operation_DestroyBlock) + if !ok { + that2, ok := that.(Offer_Operation_DestroyBlock) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Offer_Operation_DestroyBlock") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Offer_Operation_DestroyBlock but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Offer_Operation_DestroyBlock but is not nil && this == nil") + } + if !this.Block.Equal(&that1.Block) { + return fmt.Errorf("Block this(%v) Not Equal that(%v)", this.Block, that1.Block) + } + return nil +} +func (this *Offer_Operation_DestroyBlock) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Offer_Operation_DestroyBlock) + if !ok { + that2, ok := that.(Offer_Operation_DestroyBlock) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Block.Equal(&that1.Block) { + return false + } + return true +} +func (this *InverseOffer) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*InverseOffer) + if !ok { + that2, ok := that.(InverseOffer) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *InverseOffer") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *InverseOffer but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *InverseOffer but is not nil && this == nil") + } + if !this.OfferID.Equal(&that1.OfferID) { + return fmt.Errorf("OfferID this(%v) Not Equal that(%v)", this.OfferID, that1.OfferID) + } + if !this.URL.Equal(that1.URL) { + return fmt.Errorf("URL this(%v) Not Equal that(%v)", this.URL, that1.URL) + } + if !this.FrameworkID.Equal(&that1.FrameworkID) { + return fmt.Errorf("FrameworkID this(%v) Not Equal that(%v)", this.FrameworkID, that1.FrameworkID) + } + if !this.AgentID.Equal(that1.AgentID) { + return fmt.Errorf("AgentID this(%v) Not Equal that(%v)", this.AgentID, that1.AgentID) + } + if !this.Unavailability.Equal(&that1.Unavailability) { + return fmt.Errorf("Unavailability this(%v) Not Equal that(%v)", this.Unavailability, that1.Unavailability) + } + if len(this.Resources) != len(that1.Resources) { + return fmt.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return fmt.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) + } + } + return nil +} +func (this *InverseOffer) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*InverseOffer) + if !ok { + that2, ok := that.(InverseOffer) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.OfferID.Equal(&that1.OfferID) { + return false + } + if !this.URL.Equal(that1.URL) { + return false + } + if !this.FrameworkID.Equal(&that1.FrameworkID) { + return false + } + if !this.AgentID.Equal(that1.AgentID) { + return false + } + if !this.Unavailability.Equal(&that1.Unavailability) { + return false + } + if len(this.Resources) != len(that1.Resources) { + return false + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return false + } + } + return true +} +func (this *TaskInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TaskInfo) + if !ok { + that2, ok := that.(TaskInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TaskInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TaskInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TaskInfo but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if !this.TaskID.Equal(&that1.TaskID) { + return fmt.Errorf("TaskID this(%v) Not Equal that(%v)", this.TaskID, that1.TaskID) + } + if !this.AgentID.Equal(&that1.AgentID) { + return fmt.Errorf("AgentID this(%v) Not Equal that(%v)", this.AgentID, that1.AgentID) + } + if len(this.Resources) != len(that1.Resources) { + return fmt.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return fmt.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) + } + } + if !this.Executor.Equal(that1.Executor) { + return fmt.Errorf("Executor this(%v) Not Equal that(%v)", this.Executor, that1.Executor) + } + if !this.Command.Equal(that1.Command) { + return fmt.Errorf("Command this(%v) Not Equal that(%v)", this.Command, that1.Command) + } + if !this.Container.Equal(that1.Container) { + return fmt.Errorf("Container this(%v) Not Equal that(%v)", this.Container, that1.Container) + } + if !this.HealthCheck.Equal(that1.HealthCheck) { + return fmt.Errorf("HealthCheck this(%v) Not Equal that(%v)", this.HealthCheck, that1.HealthCheck) + } + if !this.Check.Equal(that1.Check) { + return fmt.Errorf("Check this(%v) Not Equal that(%v)", this.Check, that1.Check) + } + if !this.KillPolicy.Equal(that1.KillPolicy) { + return fmt.Errorf("KillPolicy this(%v) Not Equal that(%v)", this.KillPolicy, that1.KillPolicy) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if !this.Labels.Equal(that1.Labels) { + return fmt.Errorf("Labels this(%v) Not Equal that(%v)", this.Labels, that1.Labels) + } + if !this.Discovery.Equal(that1.Discovery) { + return fmt.Errorf("Discovery this(%v) Not Equal that(%v)", this.Discovery, that1.Discovery) + } + return nil +} +func (this *TaskInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TaskInfo) + if !ok { + that2, ok := that.(TaskInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if !this.TaskID.Equal(&that1.TaskID) { + return false + } + if !this.AgentID.Equal(&that1.AgentID) { + return false + } + if len(this.Resources) != len(that1.Resources) { + return false + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return false + } + } + if !this.Executor.Equal(that1.Executor) { + return false + } + if !this.Command.Equal(that1.Command) { + return false + } + if !this.Container.Equal(that1.Container) { + return false + } + if !this.HealthCheck.Equal(that1.HealthCheck) { + return false + } + if !this.Check.Equal(that1.Check) { + return false + } + if !this.KillPolicy.Equal(that1.KillPolicy) { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if !this.Labels.Equal(that1.Labels) { + return false + } + if !this.Discovery.Equal(that1.Discovery) { + return false + } + return true +} +func (this *TaskGroupInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TaskGroupInfo) + if !ok { + that2, ok := that.(TaskGroupInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TaskGroupInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TaskGroupInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TaskGroupInfo but is not nil && this == nil") + } + if len(this.Tasks) != len(that1.Tasks) { + return fmt.Errorf("Tasks this(%v) Not Equal that(%v)", len(this.Tasks), len(that1.Tasks)) + } + for i := range this.Tasks { + if !this.Tasks[i].Equal(&that1.Tasks[i]) { + return fmt.Errorf("Tasks this[%v](%v) Not Equal that[%v](%v)", i, this.Tasks[i], i, that1.Tasks[i]) + } + } + return nil +} +func (this *TaskGroupInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TaskGroupInfo) + if !ok { + that2, ok := that.(TaskGroupInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Tasks) != len(that1.Tasks) { + return false + } + for i := range this.Tasks { + if !this.Tasks[i].Equal(&that1.Tasks[i]) { + return false + } + } + return true +} +func (this *Task) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Task) + if !ok { + that2, ok := that.(Task) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Task") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Task but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Task but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if !this.TaskID.Equal(&that1.TaskID) { + return fmt.Errorf("TaskID this(%v) Not Equal that(%v)", this.TaskID, that1.TaskID) + } + if !this.FrameworkID.Equal(&that1.FrameworkID) { + return fmt.Errorf("FrameworkID this(%v) Not Equal that(%v)", this.FrameworkID, that1.FrameworkID) + } + if !this.ExecutorID.Equal(that1.ExecutorID) { + return fmt.Errorf("ExecutorID this(%v) Not Equal that(%v)", this.ExecutorID, that1.ExecutorID) + } + if !this.AgentID.Equal(&that1.AgentID) { + return fmt.Errorf("AgentID this(%v) Not Equal that(%v)", this.AgentID, that1.AgentID) + } + if this.State != nil && that1.State != nil { + if *this.State != *that1.State { + return fmt.Errorf("State this(%v) Not Equal that(%v)", *this.State, *that1.State) + } + } else if this.State != nil { + return fmt.Errorf("this.State == nil && that.State != nil") + } else if that1.State != nil { + return fmt.Errorf("State this(%v) Not Equal that(%v)", this.State, that1.State) + } + if len(this.Resources) != len(that1.Resources) { + return fmt.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return fmt.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) + } + } + if len(this.Statuses) != len(that1.Statuses) { + return fmt.Errorf("Statuses this(%v) Not Equal that(%v)", len(this.Statuses), len(that1.Statuses)) + } + for i := range this.Statuses { + if !this.Statuses[i].Equal(&that1.Statuses[i]) { + return fmt.Errorf("Statuses this[%v](%v) Not Equal that[%v](%v)", i, this.Statuses[i], i, that1.Statuses[i]) + } + } + if this.StatusUpdateState != nil && that1.StatusUpdateState != nil { + if *this.StatusUpdateState != *that1.StatusUpdateState { + return fmt.Errorf("StatusUpdateState this(%v) Not Equal that(%v)", *this.StatusUpdateState, *that1.StatusUpdateState) + } + } else if this.StatusUpdateState != nil { + return fmt.Errorf("this.StatusUpdateState == nil && that.StatusUpdateState != nil") + } else if that1.StatusUpdateState != nil { + return fmt.Errorf("StatusUpdateState this(%v) Not Equal that(%v)", this.StatusUpdateState, that1.StatusUpdateState) + } + if !bytes.Equal(this.StatusUpdateUUID, that1.StatusUpdateUUID) { + return fmt.Errorf("StatusUpdateUUID this(%v) Not Equal that(%v)", this.StatusUpdateUUID, that1.StatusUpdateUUID) + } + if !this.Labels.Equal(that1.Labels) { + return fmt.Errorf("Labels this(%v) Not Equal that(%v)", this.Labels, that1.Labels) + } + if !this.Discovery.Equal(that1.Discovery) { + return fmt.Errorf("Discovery this(%v) Not Equal that(%v)", this.Discovery, that1.Discovery) + } + if !this.Container.Equal(that1.Container) { + return fmt.Errorf("Container this(%v) Not Equal that(%v)", this.Container, that1.Container) + } + if this.User != nil && that1.User != nil { + if *this.User != *that1.User { + return fmt.Errorf("User this(%v) Not Equal that(%v)", *this.User, *that1.User) + } + } else if this.User != nil { + return fmt.Errorf("this.User == nil && that.User != nil") + } else if that1.User != nil { + return fmt.Errorf("User this(%v) Not Equal that(%v)", this.User, that1.User) + } + return nil +} +func (this *Task) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Task) + if !ok { + that2, ok := that.(Task) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if !this.TaskID.Equal(&that1.TaskID) { + return false + } + if !this.FrameworkID.Equal(&that1.FrameworkID) { + return false + } + if !this.ExecutorID.Equal(that1.ExecutorID) { + return false + } + if !this.AgentID.Equal(&that1.AgentID) { + return false + } + if this.State != nil && that1.State != nil { + if *this.State != *that1.State { + return false + } + } else if this.State != nil { + return false + } else if that1.State != nil { + return false + } + if len(this.Resources) != len(that1.Resources) { + return false + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return false + } + } + if len(this.Statuses) != len(that1.Statuses) { + return false + } + for i := range this.Statuses { + if !this.Statuses[i].Equal(&that1.Statuses[i]) { + return false + } + } + if this.StatusUpdateState != nil && that1.StatusUpdateState != nil { + if *this.StatusUpdateState != *that1.StatusUpdateState { + return false + } + } else if this.StatusUpdateState != nil { + return false + } else if that1.StatusUpdateState != nil { + return false + } + if !bytes.Equal(this.StatusUpdateUUID, that1.StatusUpdateUUID) { + return false + } + if !this.Labels.Equal(that1.Labels) { + return false + } + if !this.Discovery.Equal(that1.Discovery) { + return false + } + if !this.Container.Equal(that1.Container) { + return false + } + if this.User != nil && that1.User != nil { + if *this.User != *that1.User { + return false + } + } else if this.User != nil { + return false + } else if that1.User != nil { + return false + } + return true +} +func (this *TaskResourceLimitation) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TaskResourceLimitation) + if !ok { + that2, ok := that.(TaskResourceLimitation) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TaskResourceLimitation") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TaskResourceLimitation but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TaskResourceLimitation but is not nil && this == nil") + } + if len(this.Resources) != len(that1.Resources) { + return fmt.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return fmt.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) + } + } + return nil +} +func (this *TaskResourceLimitation) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TaskResourceLimitation) + if !ok { + that2, ok := that.(TaskResourceLimitation) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Resources) != len(that1.Resources) { + return false + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return false + } + } + return true +} +func (this *UUID) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*UUID) + if !ok { + that2, ok := that.(UUID) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *UUID") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *UUID but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *UUID but is not nil && this == nil") + } + if !bytes.Equal(this.Value, that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + return nil +} +func (this *UUID) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*UUID) + if !ok { + that2, ok := that.(UUID) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !bytes.Equal(this.Value, that1.Value) { + return false + } + return true +} +func (this *Operation) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Operation) + if !ok { + that2, ok := that.(Operation) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Operation") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Operation but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Operation but is not nil && this == nil") + } + if !this.FrameworkID.Equal(that1.FrameworkID) { + return fmt.Errorf("FrameworkID this(%v) Not Equal that(%v)", this.FrameworkID, that1.FrameworkID) + } + if !this.AgentID.Equal(that1.AgentID) { + return fmt.Errorf("AgentID this(%v) Not Equal that(%v)", this.AgentID, that1.AgentID) + } + if !this.Info.Equal(&that1.Info) { + return fmt.Errorf("Info this(%v) Not Equal that(%v)", this.Info, that1.Info) + } + if !this.LatestStatus.Equal(&that1.LatestStatus) { + return fmt.Errorf("LatestStatus this(%v) Not Equal that(%v)", this.LatestStatus, that1.LatestStatus) + } + if len(this.Statuses) != len(that1.Statuses) { + return fmt.Errorf("Statuses this(%v) Not Equal that(%v)", len(this.Statuses), len(that1.Statuses)) + } + for i := range this.Statuses { + if !this.Statuses[i].Equal(&that1.Statuses[i]) { + return fmt.Errorf("Statuses this[%v](%v) Not Equal that[%v](%v)", i, this.Statuses[i], i, that1.Statuses[i]) + } + } + if !this.UUID.Equal(&that1.UUID) { + return fmt.Errorf("UUID this(%v) Not Equal that(%v)", this.UUID, that1.UUID) + } + return nil +} +func (this *Operation) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Operation) + if !ok { + that2, ok := that.(Operation) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.FrameworkID.Equal(that1.FrameworkID) { + return false + } + if !this.AgentID.Equal(that1.AgentID) { + return false + } + if !this.Info.Equal(&that1.Info) { + return false + } + if !this.LatestStatus.Equal(&that1.LatestStatus) { + return false + } + if len(this.Statuses) != len(that1.Statuses) { + return false + } + for i := range this.Statuses { + if !this.Statuses[i].Equal(&that1.Statuses[i]) { + return false + } + } + if !this.UUID.Equal(&that1.UUID) { + return false + } + return true +} +func (this *OperationStatus) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*OperationStatus) + if !ok { + that2, ok := that.(OperationStatus) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *OperationStatus") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *OperationStatus but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *OperationStatus but is not nil && this == nil") + } + if !this.OperationID.Equal(that1.OperationID) { + return fmt.Errorf("OperationID this(%v) Not Equal that(%v)", this.OperationID, that1.OperationID) + } + if this.State != that1.State { + return fmt.Errorf("State this(%v) Not Equal that(%v)", this.State, that1.State) + } + if this.Message != nil && that1.Message != nil { + if *this.Message != *that1.Message { + return fmt.Errorf("Message this(%v) Not Equal that(%v)", *this.Message, *that1.Message) + } + } else if this.Message != nil { + return fmt.Errorf("this.Message == nil && that.Message != nil") + } else if that1.Message != nil { + return fmt.Errorf("Message this(%v) Not Equal that(%v)", this.Message, that1.Message) + } + if len(this.ConvertedResources) != len(that1.ConvertedResources) { + return fmt.Errorf("ConvertedResources this(%v) Not Equal that(%v)", len(this.ConvertedResources), len(that1.ConvertedResources)) + } + for i := range this.ConvertedResources { + if !this.ConvertedResources[i].Equal(&that1.ConvertedResources[i]) { + return fmt.Errorf("ConvertedResources this[%v](%v) Not Equal that[%v](%v)", i, this.ConvertedResources[i], i, that1.ConvertedResources[i]) + } + } + if !this.UUID.Equal(that1.UUID) { + return fmt.Errorf("UUID this(%v) Not Equal that(%v)", this.UUID, that1.UUID) + } + return nil +} +func (this *OperationStatus) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*OperationStatus) + if !ok { + that2, ok := that.(OperationStatus) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.OperationID.Equal(that1.OperationID) { + return false + } + if this.State != that1.State { + return false + } + if this.Message != nil && that1.Message != nil { + if *this.Message != *that1.Message { + return false + } + } else if this.Message != nil { + return false + } else if that1.Message != nil { + return false + } + if len(this.ConvertedResources) != len(that1.ConvertedResources) { + return false + } + for i := range this.ConvertedResources { + if !this.ConvertedResources[i].Equal(&that1.ConvertedResources[i]) { + return false + } + } + if !this.UUID.Equal(that1.UUID) { + return false + } + return true +} +func (this *CheckStatusInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CheckStatusInfo) + if !ok { + that2, ok := that.(CheckStatusInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CheckStatusInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CheckStatusInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CheckStatusInfo but is not nil && this == nil") + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) + } + } else if this.Type != nil { + return fmt.Errorf("this.Type == nil && that.Type != nil") + } else if that1.Type != nil { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.Command.Equal(that1.Command) { + return fmt.Errorf("Command this(%v) Not Equal that(%v)", this.Command, that1.Command) + } + if !this.HTTP.Equal(that1.HTTP) { + return fmt.Errorf("HTTP this(%v) Not Equal that(%v)", this.HTTP, that1.HTTP) + } + if !this.TCP.Equal(that1.TCP) { + return fmt.Errorf("TCP this(%v) Not Equal that(%v)", this.TCP, that1.TCP) + } + return nil +} +func (this *CheckStatusInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CheckStatusInfo) + if !ok { + that2, ok := that.(CheckStatusInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return false + } + } else if this.Type != nil { + return false + } else if that1.Type != nil { + return false + } + if !this.Command.Equal(that1.Command) { + return false + } + if !this.HTTP.Equal(that1.HTTP) { + return false + } + if !this.TCP.Equal(that1.TCP) { + return false + } + return true +} +func (this *CheckStatusInfo_Command) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CheckStatusInfo_Command) + if !ok { + that2, ok := that.(CheckStatusInfo_Command) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CheckStatusInfo_Command") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CheckStatusInfo_Command but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CheckStatusInfo_Command but is not nil && this == nil") + } + if this.ExitCode != nil && that1.ExitCode != nil { + if *this.ExitCode != *that1.ExitCode { + return fmt.Errorf("ExitCode this(%v) Not Equal that(%v)", *this.ExitCode, *that1.ExitCode) + } + } else if this.ExitCode != nil { + return fmt.Errorf("this.ExitCode == nil && that.ExitCode != nil") + } else if that1.ExitCode != nil { + return fmt.Errorf("ExitCode this(%v) Not Equal that(%v)", this.ExitCode, that1.ExitCode) + } + return nil +} +func (this *CheckStatusInfo_Command) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CheckStatusInfo_Command) + if !ok { + that2, ok := that.(CheckStatusInfo_Command) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.ExitCode != nil && that1.ExitCode != nil { + if *this.ExitCode != *that1.ExitCode { + return false + } + } else if this.ExitCode != nil { + return false + } else if that1.ExitCode != nil { + return false + } + return true +} +func (this *CheckStatusInfo_Http) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CheckStatusInfo_Http) + if !ok { + that2, ok := that.(CheckStatusInfo_Http) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CheckStatusInfo_Http") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CheckStatusInfo_Http but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CheckStatusInfo_Http but is not nil && this == nil") + } + if this.StatusCode != nil && that1.StatusCode != nil { + if *this.StatusCode != *that1.StatusCode { + return fmt.Errorf("StatusCode this(%v) Not Equal that(%v)", *this.StatusCode, *that1.StatusCode) + } + } else if this.StatusCode != nil { + return fmt.Errorf("this.StatusCode == nil && that.StatusCode != nil") + } else if that1.StatusCode != nil { + return fmt.Errorf("StatusCode this(%v) Not Equal that(%v)", this.StatusCode, that1.StatusCode) + } + return nil +} +func (this *CheckStatusInfo_Http) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CheckStatusInfo_Http) + if !ok { + that2, ok := that.(CheckStatusInfo_Http) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.StatusCode != nil && that1.StatusCode != nil { + if *this.StatusCode != *that1.StatusCode { + return false + } + } else if this.StatusCode != nil { + return false + } else if that1.StatusCode != nil { + return false + } + return true +} +func (this *CheckStatusInfo_Tcp) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CheckStatusInfo_Tcp) + if !ok { + that2, ok := that.(CheckStatusInfo_Tcp) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CheckStatusInfo_Tcp") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CheckStatusInfo_Tcp but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CheckStatusInfo_Tcp but is not nil && this == nil") + } + if this.Succeeded != nil && that1.Succeeded != nil { + if *this.Succeeded != *that1.Succeeded { + return fmt.Errorf("Succeeded this(%v) Not Equal that(%v)", *this.Succeeded, *that1.Succeeded) + } + } else if this.Succeeded != nil { + return fmt.Errorf("this.Succeeded == nil && that.Succeeded != nil") + } else if that1.Succeeded != nil { + return fmt.Errorf("Succeeded this(%v) Not Equal that(%v)", this.Succeeded, that1.Succeeded) + } + return nil +} +func (this *CheckStatusInfo_Tcp) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CheckStatusInfo_Tcp) + if !ok { + that2, ok := that.(CheckStatusInfo_Tcp) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Succeeded != nil && that1.Succeeded != nil { + if *this.Succeeded != *that1.Succeeded { + return false + } + } else if this.Succeeded != nil { + return false + } else if that1.Succeeded != nil { + return false + } + return true +} +func (this *TaskStatus) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TaskStatus) + if !ok { + that2, ok := that.(TaskStatus) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TaskStatus") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TaskStatus but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TaskStatus but is not nil && this == nil") + } + if !this.TaskID.Equal(&that1.TaskID) { + return fmt.Errorf("TaskID this(%v) Not Equal that(%v)", this.TaskID, that1.TaskID) + } + if this.State != nil && that1.State != nil { + if *this.State != *that1.State { + return fmt.Errorf("State this(%v) Not Equal that(%v)", *this.State, *that1.State) + } + } else if this.State != nil { + return fmt.Errorf("this.State == nil && that.State != nil") + } else if that1.State != nil { + return fmt.Errorf("State this(%v) Not Equal that(%v)", this.State, that1.State) + } + if this.Message != nil && that1.Message != nil { + if *this.Message != *that1.Message { + return fmt.Errorf("Message this(%v) Not Equal that(%v)", *this.Message, *that1.Message) + } + } else if this.Message != nil { + return fmt.Errorf("this.Message == nil && that.Message != nil") + } else if that1.Message != nil { + return fmt.Errorf("Message this(%v) Not Equal that(%v)", this.Message, that1.Message) + } + if this.Source != nil && that1.Source != nil { + if *this.Source != *that1.Source { + return fmt.Errorf("Source this(%v) Not Equal that(%v)", *this.Source, *that1.Source) + } + } else if this.Source != nil { + return fmt.Errorf("this.Source == nil && that.Source != nil") + } else if that1.Source != nil { + return fmt.Errorf("Source this(%v) Not Equal that(%v)", this.Source, that1.Source) + } + if this.Reason != nil && that1.Reason != nil { + if *this.Reason != *that1.Reason { + return fmt.Errorf("Reason this(%v) Not Equal that(%v)", *this.Reason, *that1.Reason) + } + } else if this.Reason != nil { + return fmt.Errorf("this.Reason == nil && that.Reason != nil") + } else if that1.Reason != nil { + return fmt.Errorf("Reason this(%v) Not Equal that(%v)", this.Reason, that1.Reason) + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + if !this.AgentID.Equal(that1.AgentID) { + return fmt.Errorf("AgentID this(%v) Not Equal that(%v)", this.AgentID, that1.AgentID) + } + if !this.ExecutorID.Equal(that1.ExecutorID) { + return fmt.Errorf("ExecutorID this(%v) Not Equal that(%v)", this.ExecutorID, that1.ExecutorID) + } + if this.Timestamp != nil && that1.Timestamp != nil { + if *this.Timestamp != *that1.Timestamp { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", *this.Timestamp, *that1.Timestamp) + } + } else if this.Timestamp != nil { + return fmt.Errorf("this.Timestamp == nil && that.Timestamp != nil") + } else if that1.Timestamp != nil { + return fmt.Errorf("Timestamp this(%v) Not Equal that(%v)", this.Timestamp, that1.Timestamp) + } + if !bytes.Equal(this.UUID, that1.UUID) { + return fmt.Errorf("UUID this(%v) Not Equal that(%v)", this.UUID, that1.UUID) + } + if this.Healthy != nil && that1.Healthy != nil { + if *this.Healthy != *that1.Healthy { + return fmt.Errorf("Healthy this(%v) Not Equal that(%v)", *this.Healthy, *that1.Healthy) + } + } else if this.Healthy != nil { + return fmt.Errorf("this.Healthy == nil && that.Healthy != nil") + } else if that1.Healthy != nil { + return fmt.Errorf("Healthy this(%v) Not Equal that(%v)", this.Healthy, that1.Healthy) + } + if !this.CheckStatus.Equal(that1.CheckStatus) { + return fmt.Errorf("CheckStatus this(%v) Not Equal that(%v)", this.CheckStatus, that1.CheckStatus) + } + if !this.Labels.Equal(that1.Labels) { + return fmt.Errorf("Labels this(%v) Not Equal that(%v)", this.Labels, that1.Labels) + } + if !this.ContainerStatus.Equal(that1.ContainerStatus) { + return fmt.Errorf("ContainerStatus this(%v) Not Equal that(%v)", this.ContainerStatus, that1.ContainerStatus) + } + if !this.UnreachableTime.Equal(that1.UnreachableTime) { + return fmt.Errorf("UnreachableTime this(%v) Not Equal that(%v)", this.UnreachableTime, that1.UnreachableTime) + } + if !this.Limitation.Equal(that1.Limitation) { + return fmt.Errorf("Limitation this(%v) Not Equal that(%v)", this.Limitation, that1.Limitation) + } + return nil +} +func (this *TaskStatus) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TaskStatus) + if !ok { + that2, ok := that.(TaskStatus) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.TaskID.Equal(&that1.TaskID) { + return false + } + if this.State != nil && that1.State != nil { + if *this.State != *that1.State { + return false + } + } else if this.State != nil { + return false + } else if that1.State != nil { + return false + } + if this.Message != nil && that1.Message != nil { + if *this.Message != *that1.Message { + return false + } + } else if this.Message != nil { + return false + } else if that1.Message != nil { + return false + } + if this.Source != nil && that1.Source != nil { + if *this.Source != *that1.Source { + return false + } + } else if this.Source != nil { + return false + } else if that1.Source != nil { + return false + } + if this.Reason != nil && that1.Reason != nil { + if *this.Reason != *that1.Reason { + return false + } + } else if this.Reason != nil { + return false + } else if that1.Reason != nil { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + if !this.AgentID.Equal(that1.AgentID) { + return false + } + if !this.ExecutorID.Equal(that1.ExecutorID) { + return false + } + if this.Timestamp != nil && that1.Timestamp != nil { + if *this.Timestamp != *that1.Timestamp { + return false + } + } else if this.Timestamp != nil { + return false + } else if that1.Timestamp != nil { + return false + } + if !bytes.Equal(this.UUID, that1.UUID) { + return false + } + if this.Healthy != nil && that1.Healthy != nil { + if *this.Healthy != *that1.Healthy { + return false + } + } else if this.Healthy != nil { + return false + } else if that1.Healthy != nil { + return false + } + if !this.CheckStatus.Equal(that1.CheckStatus) { + return false + } + if !this.Labels.Equal(that1.Labels) { + return false + } + if !this.ContainerStatus.Equal(that1.ContainerStatus) { + return false + } + if !this.UnreachableTime.Equal(that1.UnreachableTime) { + return false + } + if !this.Limitation.Equal(that1.Limitation) { + return false + } + return true +} +func (this *Filters) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Filters) + if !ok { + that2, ok := that.(Filters) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Filters") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Filters but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Filters but is not nil && this == nil") + } + if this.RefuseSeconds != nil && that1.RefuseSeconds != nil { + if *this.RefuseSeconds != *that1.RefuseSeconds { + return fmt.Errorf("RefuseSeconds this(%v) Not Equal that(%v)", *this.RefuseSeconds, *that1.RefuseSeconds) + } + } else if this.RefuseSeconds != nil { + return fmt.Errorf("this.RefuseSeconds == nil && that.RefuseSeconds != nil") + } else if that1.RefuseSeconds != nil { + return fmt.Errorf("RefuseSeconds this(%v) Not Equal that(%v)", this.RefuseSeconds, that1.RefuseSeconds) + } + return nil +} +func (this *Filters) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Filters) + if !ok { + that2, ok := that.(Filters) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.RefuseSeconds != nil && that1.RefuseSeconds != nil { + if *this.RefuseSeconds != *that1.RefuseSeconds { + return false + } + } else if this.RefuseSeconds != nil { + return false + } else if that1.RefuseSeconds != nil { + return false + } + return true +} +func (this *Environment) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Environment) + if !ok { + that2, ok := that.(Environment) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Environment") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Environment but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Environment but is not nil && this == nil") + } + if len(this.Variables) != len(that1.Variables) { + return fmt.Errorf("Variables this(%v) Not Equal that(%v)", len(this.Variables), len(that1.Variables)) + } + for i := range this.Variables { + if !this.Variables[i].Equal(&that1.Variables[i]) { + return fmt.Errorf("Variables this[%v](%v) Not Equal that[%v](%v)", i, this.Variables[i], i, that1.Variables[i]) + } + } + return nil +} +func (this *Environment) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Environment) + if !ok { + that2, ok := that.(Environment) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Variables) != len(that1.Variables) { + return false + } + for i := range this.Variables { + if !this.Variables[i].Equal(&that1.Variables[i]) { + return false + } + } + return true +} +func (this *Environment_Variable) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Environment_Variable) + if !ok { + that2, ok := that.(Environment_Variable) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Environment_Variable") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Environment_Variable but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Environment_Variable but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) + } + } else if this.Type != nil { + return fmt.Errorf("this.Type == nil && that.Type != nil") + } else if that1.Type != nil { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) + } + } else if this.Value != nil { + return fmt.Errorf("this.Value == nil && that.Value != nil") + } else if that1.Value != nil { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + if !this.Secret.Equal(that1.Secret) { + return fmt.Errorf("Secret this(%v) Not Equal that(%v)", this.Secret, that1.Secret) + } + return nil +} +func (this *Environment_Variable) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Environment_Variable) + if !ok { + that2, ok := that.(Environment_Variable) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return false + } + } else if this.Type != nil { + return false + } else if that1.Type != nil { + return false + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return false + } + } else if this.Value != nil { + return false + } else if that1.Value != nil { + return false + } + if !this.Secret.Equal(that1.Secret) { + return false + } + return true +} +func (this *Parameter) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Parameter) + if !ok { + that2, ok := that.(Parameter) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Parameter") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Parameter but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Parameter but is not nil && this == nil") + } + if this.Key != that1.Key { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", this.Key, that1.Key) + } + if this.Value != that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + return nil +} +func (this *Parameter) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Parameter) + if !ok { + that2, ok := that.(Parameter) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Key != that1.Key { + return false + } + if this.Value != that1.Value { + return false + } + return true +} +func (this *Parameters) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Parameters) + if !ok { + that2, ok := that.(Parameters) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Parameters") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Parameters but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Parameters but is not nil && this == nil") + } + if len(this.Parameter) != len(that1.Parameter) { + return fmt.Errorf("Parameter this(%v) Not Equal that(%v)", len(this.Parameter), len(that1.Parameter)) + } + for i := range this.Parameter { + if !this.Parameter[i].Equal(&that1.Parameter[i]) { + return fmt.Errorf("Parameter this[%v](%v) Not Equal that[%v](%v)", i, this.Parameter[i], i, that1.Parameter[i]) + } + } + return nil +} +func (this *Parameters) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Parameters) + if !ok { + that2, ok := that.(Parameters) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Parameter) != len(that1.Parameter) { + return false + } + for i := range this.Parameter { + if !this.Parameter[i].Equal(&that1.Parameter[i]) { + return false + } + } + return true +} +func (this *Credential) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Credential) + if !ok { + that2, ok := that.(Credential) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Credential") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Credential but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Credential but is not nil && this == nil") + } + if this.Principal != that1.Principal { + return fmt.Errorf("Principal this(%v) Not Equal that(%v)", this.Principal, that1.Principal) + } + if this.Secret != nil && that1.Secret != nil { + if *this.Secret != *that1.Secret { + return fmt.Errorf("Secret this(%v) Not Equal that(%v)", *this.Secret, *that1.Secret) + } + } else if this.Secret != nil { + return fmt.Errorf("this.Secret == nil && that.Secret != nil") + } else if that1.Secret != nil { + return fmt.Errorf("Secret this(%v) Not Equal that(%v)", this.Secret, that1.Secret) + } + return nil +} +func (this *Credential) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Credential) + if !ok { + that2, ok := that.(Credential) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Principal != that1.Principal { + return false + } + if this.Secret != nil && that1.Secret != nil { + if *this.Secret != *that1.Secret { + return false + } + } else if this.Secret != nil { + return false + } else if that1.Secret != nil { + return false + } + return true +} +func (this *Credentials) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Credentials) + if !ok { + that2, ok := that.(Credentials) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Credentials") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Credentials but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Credentials but is not nil && this == nil") + } + if len(this.Credentials) != len(that1.Credentials) { + return fmt.Errorf("Credentials this(%v) Not Equal that(%v)", len(this.Credentials), len(that1.Credentials)) + } + for i := range this.Credentials { + if !this.Credentials[i].Equal(&that1.Credentials[i]) { + return fmt.Errorf("Credentials this[%v](%v) Not Equal that[%v](%v)", i, this.Credentials[i], i, that1.Credentials[i]) + } + } + return nil +} +func (this *Credentials) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Credentials) + if !ok { + that2, ok := that.(Credentials) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Credentials) != len(that1.Credentials) { + return false + } + for i := range this.Credentials { + if !this.Credentials[i].Equal(&that1.Credentials[i]) { + return false + } + } + return true +} +func (this *Secret) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Secret) + if !ok { + that2, ok := that.(Secret) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Secret") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Secret but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Secret but is not nil && this == nil") + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.Reference.Equal(that1.Reference) { + return fmt.Errorf("Reference this(%v) Not Equal that(%v)", this.Reference, that1.Reference) + } + if !this.Value.Equal(that1.Value) { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + return nil +} +func (this *Secret) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Secret) + if !ok { + that2, ok := that.(Secret) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + if !this.Reference.Equal(that1.Reference) { + return false + } + if !this.Value.Equal(that1.Value) { + return false + } + return true +} +func (this *Secret_Reference) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Secret_Reference) + if !ok { + that2, ok := that.(Secret_Reference) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Secret_Reference") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Secret_Reference but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Secret_Reference but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Key != nil && that1.Key != nil { + if *this.Key != *that1.Key { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", *this.Key, *that1.Key) + } + } else if this.Key != nil { + return fmt.Errorf("this.Key == nil && that.Key != nil") + } else if that1.Key != nil { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", this.Key, that1.Key) + } + return nil +} +func (this *Secret_Reference) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Secret_Reference) + if !ok { + that2, ok := that.(Secret_Reference) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Key != nil && that1.Key != nil { + if *this.Key != *that1.Key { + return false + } + } else if this.Key != nil { + return false + } else if that1.Key != nil { + return false + } + return true +} +func (this *Secret_Value) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Secret_Value) + if !ok { + that2, ok := that.(Secret_Value) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Secret_Value") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Secret_Value but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Secret_Value but is not nil && this == nil") + } + if !bytes.Equal(this.Data, that1.Data) { + return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) + } + return nil +} +func (this *Secret_Value) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Secret_Value) + if !ok { + that2, ok := that.(Secret_Value) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !bytes.Equal(this.Data, that1.Data) { + return false + } + return true +} +func (this *RateLimit) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RateLimit) + if !ok { + that2, ok := that.(RateLimit) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *RateLimit") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RateLimit but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RateLimit but is not nil && this == nil") + } + if this.QPS != nil && that1.QPS != nil { + if *this.QPS != *that1.QPS { + return fmt.Errorf("QPS this(%v) Not Equal that(%v)", *this.QPS, *that1.QPS) + } + } else if this.QPS != nil { + return fmt.Errorf("this.QPS == nil && that.QPS != nil") + } else if that1.QPS != nil { + return fmt.Errorf("QPS this(%v) Not Equal that(%v)", this.QPS, that1.QPS) + } + if this.Principal != that1.Principal { + return fmt.Errorf("Principal this(%v) Not Equal that(%v)", this.Principal, that1.Principal) + } + if this.Capacity != nil && that1.Capacity != nil { + if *this.Capacity != *that1.Capacity { + return fmt.Errorf("Capacity this(%v) Not Equal that(%v)", *this.Capacity, *that1.Capacity) + } + } else if this.Capacity != nil { + return fmt.Errorf("this.Capacity == nil && that.Capacity != nil") + } else if that1.Capacity != nil { + return fmt.Errorf("Capacity this(%v) Not Equal that(%v)", this.Capacity, that1.Capacity) + } + return nil +} +func (this *RateLimit) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*RateLimit) + if !ok { + that2, ok := that.(RateLimit) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.QPS != nil && that1.QPS != nil { + if *this.QPS != *that1.QPS { + return false + } + } else if this.QPS != nil { + return false + } else if that1.QPS != nil { + return false + } + if this.Principal != that1.Principal { + return false + } + if this.Capacity != nil && that1.Capacity != nil { + if *this.Capacity != *that1.Capacity { + return false + } + } else if this.Capacity != nil { + return false + } else if that1.Capacity != nil { + return false + } + return true +} +func (this *RateLimits) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RateLimits) + if !ok { + that2, ok := that.(RateLimits) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *RateLimits") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RateLimits but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RateLimits but is not nil && this == nil") + } + if len(this.Limits) != len(that1.Limits) { + return fmt.Errorf("Limits this(%v) Not Equal that(%v)", len(this.Limits), len(that1.Limits)) + } + for i := range this.Limits { + if !this.Limits[i].Equal(&that1.Limits[i]) { + return fmt.Errorf("Limits this[%v](%v) Not Equal that[%v](%v)", i, this.Limits[i], i, that1.Limits[i]) + } + } + if this.AggregateDefaultQPS != nil && that1.AggregateDefaultQPS != nil { + if *this.AggregateDefaultQPS != *that1.AggregateDefaultQPS { + return fmt.Errorf("AggregateDefaultQPS this(%v) Not Equal that(%v)", *this.AggregateDefaultQPS, *that1.AggregateDefaultQPS) + } + } else if this.AggregateDefaultQPS != nil { + return fmt.Errorf("this.AggregateDefaultQPS == nil && that.AggregateDefaultQPS != nil") + } else if that1.AggregateDefaultQPS != nil { + return fmt.Errorf("AggregateDefaultQPS this(%v) Not Equal that(%v)", this.AggregateDefaultQPS, that1.AggregateDefaultQPS) + } + if this.AggregateDefaultCapacity != nil && that1.AggregateDefaultCapacity != nil { + if *this.AggregateDefaultCapacity != *that1.AggregateDefaultCapacity { + return fmt.Errorf("AggregateDefaultCapacity this(%v) Not Equal that(%v)", *this.AggregateDefaultCapacity, *that1.AggregateDefaultCapacity) + } + } else if this.AggregateDefaultCapacity != nil { + return fmt.Errorf("this.AggregateDefaultCapacity == nil && that.AggregateDefaultCapacity != nil") + } else if that1.AggregateDefaultCapacity != nil { + return fmt.Errorf("AggregateDefaultCapacity this(%v) Not Equal that(%v)", this.AggregateDefaultCapacity, that1.AggregateDefaultCapacity) + } + return nil +} +func (this *RateLimits) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*RateLimits) + if !ok { + that2, ok := that.(RateLimits) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Limits) != len(that1.Limits) { + return false + } + for i := range this.Limits { + if !this.Limits[i].Equal(&that1.Limits[i]) { + return false + } + } + if this.AggregateDefaultQPS != nil && that1.AggregateDefaultQPS != nil { + if *this.AggregateDefaultQPS != *that1.AggregateDefaultQPS { + return false + } + } else if this.AggregateDefaultQPS != nil { + return false + } else if that1.AggregateDefaultQPS != nil { + return false + } + if this.AggregateDefaultCapacity != nil && that1.AggregateDefaultCapacity != nil { + if *this.AggregateDefaultCapacity != *that1.AggregateDefaultCapacity { + return false + } + } else if this.AggregateDefaultCapacity != nil { + return false + } else if that1.AggregateDefaultCapacity != nil { + return false + } + return true +} +func (this *Image) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Image) + if !ok { + that2, ok := that.(Image) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Image") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Image but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Image but is not nil && this == nil") + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) + } + } else if this.Type != nil { + return fmt.Errorf("this.Type == nil && that.Type != nil") + } else if that1.Type != nil { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.Appc.Equal(that1.Appc) { + return fmt.Errorf("Appc this(%v) Not Equal that(%v)", this.Appc, that1.Appc) + } + if !this.Docker.Equal(that1.Docker) { + return fmt.Errorf("Docker this(%v) Not Equal that(%v)", this.Docker, that1.Docker) + } + if this.Cached != nil && that1.Cached != nil { + if *this.Cached != *that1.Cached { + return fmt.Errorf("Cached this(%v) Not Equal that(%v)", *this.Cached, *that1.Cached) + } + } else if this.Cached != nil { + return fmt.Errorf("this.Cached == nil && that.Cached != nil") + } else if that1.Cached != nil { + return fmt.Errorf("Cached this(%v) Not Equal that(%v)", this.Cached, that1.Cached) + } + return nil +} +func (this *Image) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Image) + if !ok { + that2, ok := that.(Image) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return false + } + } else if this.Type != nil { + return false + } else if that1.Type != nil { + return false + } + if !this.Appc.Equal(that1.Appc) { + return false + } + if !this.Docker.Equal(that1.Docker) { + return false + } + if this.Cached != nil && that1.Cached != nil { + if *this.Cached != *that1.Cached { + return false + } + } else if this.Cached != nil { + return false + } else if that1.Cached != nil { + return false + } + return true +} +func (this *Image_Appc) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Image_Appc) + if !ok { + that2, ok := that.(Image_Appc) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Image_Appc") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Image_Appc but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Image_Appc but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.ID != nil && that1.ID != nil { + if *this.ID != *that1.ID { + return fmt.Errorf("ID this(%v) Not Equal that(%v)", *this.ID, *that1.ID) + } + } else if this.ID != nil { + return fmt.Errorf("this.ID == nil && that.ID != nil") + } else if that1.ID != nil { + return fmt.Errorf("ID this(%v) Not Equal that(%v)", this.ID, that1.ID) + } + if !this.Labels.Equal(that1.Labels) { + return fmt.Errorf("Labels this(%v) Not Equal that(%v)", this.Labels, that1.Labels) + } + return nil +} +func (this *Image_Appc) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Image_Appc) + if !ok { + that2, ok := that.(Image_Appc) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.ID != nil && that1.ID != nil { + if *this.ID != *that1.ID { + return false + } + } else if this.ID != nil { + return false + } else if that1.ID != nil { + return false + } + if !this.Labels.Equal(that1.Labels) { + return false + } + return true +} +func (this *Image_Docker) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Image_Docker) + if !ok { + that2, ok := that.(Image_Docker) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Image_Docker") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Image_Docker but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Image_Docker but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if !this.Credential.Equal(that1.Credential) { + return fmt.Errorf("Credential this(%v) Not Equal that(%v)", this.Credential, that1.Credential) + } + if !this.Config.Equal(that1.Config) { + return fmt.Errorf("Config this(%v) Not Equal that(%v)", this.Config, that1.Config) + } + return nil +} +func (this *Image_Docker) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Image_Docker) + if !ok { + that2, ok := that.(Image_Docker) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if !this.Credential.Equal(that1.Credential) { + return false + } + if !this.Config.Equal(that1.Config) { + return false + } + return true +} +func (this *MountPropagation) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*MountPropagation) + if !ok { + that2, ok := that.(MountPropagation) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *MountPropagation") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *MountPropagation but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *MountPropagation but is not nil && this == nil") + } + if this.Mode != nil && that1.Mode != nil { + if *this.Mode != *that1.Mode { + return fmt.Errorf("Mode this(%v) Not Equal that(%v)", *this.Mode, *that1.Mode) + } + } else if this.Mode != nil { + return fmt.Errorf("this.Mode == nil && that.Mode != nil") + } else if that1.Mode != nil { + return fmt.Errorf("Mode this(%v) Not Equal that(%v)", this.Mode, that1.Mode) + } + return nil +} +func (this *MountPropagation) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*MountPropagation) + if !ok { + that2, ok := that.(MountPropagation) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Mode != nil && that1.Mode != nil { + if *this.Mode != *that1.Mode { + return false + } + } else if this.Mode != nil { + return false + } else if that1.Mode != nil { + return false + } + return true +} +func (this *Volume) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Volume) + if !ok { + that2, ok := that.(Volume) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Volume") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Volume but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Volume but is not nil && this == nil") + } + if this.Mode != nil && that1.Mode != nil { + if *this.Mode != *that1.Mode { + return fmt.Errorf("Mode this(%v) Not Equal that(%v)", *this.Mode, *that1.Mode) + } + } else if this.Mode != nil { + return fmt.Errorf("this.Mode == nil && that.Mode != nil") + } else if that1.Mode != nil { + return fmt.Errorf("Mode this(%v) Not Equal that(%v)", this.Mode, that1.Mode) + } + if this.ContainerPath != that1.ContainerPath { + return fmt.Errorf("ContainerPath this(%v) Not Equal that(%v)", this.ContainerPath, that1.ContainerPath) + } + if this.HostPath != nil && that1.HostPath != nil { + if *this.HostPath != *that1.HostPath { + return fmt.Errorf("HostPath this(%v) Not Equal that(%v)", *this.HostPath, *that1.HostPath) + } + } else if this.HostPath != nil { + return fmt.Errorf("this.HostPath == nil && that.HostPath != nil") + } else if that1.HostPath != nil { + return fmt.Errorf("HostPath this(%v) Not Equal that(%v)", this.HostPath, that1.HostPath) + } + if !this.Image.Equal(that1.Image) { + return fmt.Errorf("Image this(%v) Not Equal that(%v)", this.Image, that1.Image) + } + if !this.Source.Equal(that1.Source) { + return fmt.Errorf("Source this(%v) Not Equal that(%v)", this.Source, that1.Source) + } + return nil +} +func (this *Volume) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Volume) + if !ok { + that2, ok := that.(Volume) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Mode != nil && that1.Mode != nil { + if *this.Mode != *that1.Mode { + return false + } + } else if this.Mode != nil { + return false + } else if that1.Mode != nil { + return false + } + if this.ContainerPath != that1.ContainerPath { + return false + } + if this.HostPath != nil && that1.HostPath != nil { + if *this.HostPath != *that1.HostPath { + return false + } + } else if this.HostPath != nil { + return false + } else if that1.HostPath != nil { + return false + } + if !this.Image.Equal(that1.Image) { + return false + } + if !this.Source.Equal(that1.Source) { + return false + } + return true +} +func (this *Volume_Source) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Volume_Source) + if !ok { + that2, ok := that.(Volume_Source) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Volume_Source") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Volume_Source but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Volume_Source but is not nil && this == nil") + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if !this.DockerVolume.Equal(that1.DockerVolume) { + return fmt.Errorf("DockerVolume this(%v) Not Equal that(%v)", this.DockerVolume, that1.DockerVolume) + } + if !this.HostPath.Equal(that1.HostPath) { + return fmt.Errorf("HostPath this(%v) Not Equal that(%v)", this.HostPath, that1.HostPath) + } + if !this.SandboxPath.Equal(that1.SandboxPath) { + return fmt.Errorf("SandboxPath this(%v) Not Equal that(%v)", this.SandboxPath, that1.SandboxPath) + } + if !this.Secret.Equal(that1.Secret) { + return fmt.Errorf("Secret this(%v) Not Equal that(%v)", this.Secret, that1.Secret) + } + return nil +} +func (this *Volume_Source) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Volume_Source) + if !ok { + that2, ok := that.(Volume_Source) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + if !this.DockerVolume.Equal(that1.DockerVolume) { + return false + } + if !this.HostPath.Equal(that1.HostPath) { + return false + } + if !this.SandboxPath.Equal(that1.SandboxPath) { + return false + } + if !this.Secret.Equal(that1.Secret) { + return false + } + return true +} +func (this *Volume_Source_DockerVolume) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Volume_Source_DockerVolume) + if !ok { + that2, ok := that.(Volume_Source_DockerVolume) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Volume_Source_DockerVolume") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Volume_Source_DockerVolume but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Volume_Source_DockerVolume but is not nil && this == nil") + } + if this.Driver != nil && that1.Driver != nil { + if *this.Driver != *that1.Driver { + return fmt.Errorf("Driver this(%v) Not Equal that(%v)", *this.Driver, *that1.Driver) + } + } else if this.Driver != nil { + return fmt.Errorf("this.Driver == nil && that.Driver != nil") + } else if that1.Driver != nil { + return fmt.Errorf("Driver this(%v) Not Equal that(%v)", this.Driver, that1.Driver) + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if !this.DriverOptions.Equal(that1.DriverOptions) { + return fmt.Errorf("DriverOptions this(%v) Not Equal that(%v)", this.DriverOptions, that1.DriverOptions) + } + return nil +} +func (this *Volume_Source_DockerVolume) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Volume_Source_DockerVolume) + if !ok { + that2, ok := that.(Volume_Source_DockerVolume) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Driver != nil && that1.Driver != nil { + if *this.Driver != *that1.Driver { + return false + } + } else if this.Driver != nil { + return false + } else if that1.Driver != nil { + return false + } + if this.Name != that1.Name { + return false + } + if !this.DriverOptions.Equal(that1.DriverOptions) { + return false + } + return true +} +func (this *Volume_Source_HostPath) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Volume_Source_HostPath) + if !ok { + that2, ok := that.(Volume_Source_HostPath) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Volume_Source_HostPath") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Volume_Source_HostPath but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Volume_Source_HostPath but is not nil && this == nil") + } + if this.Path != that1.Path { + return fmt.Errorf("Path this(%v) Not Equal that(%v)", this.Path, that1.Path) + } + if !this.MountPropagation.Equal(that1.MountPropagation) { + return fmt.Errorf("MountPropagation this(%v) Not Equal that(%v)", this.MountPropagation, that1.MountPropagation) + } + return nil +} +func (this *Volume_Source_HostPath) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Volume_Source_HostPath) + if !ok { + that2, ok := that.(Volume_Source_HostPath) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Path != that1.Path { + return false + } + if !this.MountPropagation.Equal(that1.MountPropagation) { + return false + } + return true +} +func (this *Volume_Source_SandboxPath) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Volume_Source_SandboxPath) + if !ok { + that2, ok := that.(Volume_Source_SandboxPath) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Volume_Source_SandboxPath") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Volume_Source_SandboxPath but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Volume_Source_SandboxPath but is not nil && this == nil") + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if this.Path != that1.Path { + return fmt.Errorf("Path this(%v) Not Equal that(%v)", this.Path, that1.Path) + } + return nil +} +func (this *Volume_Source_SandboxPath) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Volume_Source_SandboxPath) + if !ok { + that2, ok := that.(Volume_Source_SandboxPath) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + if this.Path != that1.Path { + return false + } + return true +} +func (this *NetworkInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NetworkInfo) + if !ok { + that2, ok := that.(NetworkInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NetworkInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NetworkInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NetworkInfo but is not nil && this == nil") + } + if len(this.IPAddresses) != len(that1.IPAddresses) { + return fmt.Errorf("IPAddresses this(%v) Not Equal that(%v)", len(this.IPAddresses), len(that1.IPAddresses)) + } + for i := range this.IPAddresses { + if !this.IPAddresses[i].Equal(&that1.IPAddresses[i]) { + return fmt.Errorf("IPAddresses this[%v](%v) Not Equal that[%v](%v)", i, this.IPAddresses[i], i, that1.IPAddresses[i]) + } + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) + } + } else if this.Name != nil { + return fmt.Errorf("this.Name == nil && that.Name != nil") + } else if that1.Name != nil { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if len(this.Groups) != len(that1.Groups) { + return fmt.Errorf("Groups this(%v) Not Equal that(%v)", len(this.Groups), len(that1.Groups)) + } + for i := range this.Groups { + if this.Groups[i] != that1.Groups[i] { + return fmt.Errorf("Groups this[%v](%v) Not Equal that[%v](%v)", i, this.Groups[i], i, that1.Groups[i]) + } + } + if !this.Labels.Equal(that1.Labels) { + return fmt.Errorf("Labels this(%v) Not Equal that(%v)", this.Labels, that1.Labels) + } + if len(this.PortMappings) != len(that1.PortMappings) { + return fmt.Errorf("PortMappings this(%v) Not Equal that(%v)", len(this.PortMappings), len(that1.PortMappings)) + } + for i := range this.PortMappings { + if !this.PortMappings[i].Equal(&that1.PortMappings[i]) { + return fmt.Errorf("PortMappings this[%v](%v) Not Equal that[%v](%v)", i, this.PortMappings[i], i, that1.PortMappings[i]) + } + } + return nil +} +func (this *NetworkInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NetworkInfo) + if !ok { + that2, ok := that.(NetworkInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.IPAddresses) != len(that1.IPAddresses) { + return false + } + for i := range this.IPAddresses { + if !this.IPAddresses[i].Equal(&that1.IPAddresses[i]) { + return false + } + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return false + } + } else if this.Name != nil { + return false + } else if that1.Name != nil { + return false + } + if len(this.Groups) != len(that1.Groups) { + return false + } + for i := range this.Groups { + if this.Groups[i] != that1.Groups[i] { + return false + } + } + if !this.Labels.Equal(that1.Labels) { + return false + } + if len(this.PortMappings) != len(that1.PortMappings) { + return false + } + for i := range this.PortMappings { + if !this.PortMappings[i].Equal(&that1.PortMappings[i]) { + return false + } + } + return true +} +func (this *NetworkInfo_IPAddress) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NetworkInfo_IPAddress) + if !ok { + that2, ok := that.(NetworkInfo_IPAddress) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NetworkInfo_IPAddress") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NetworkInfo_IPAddress but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NetworkInfo_IPAddress but is not nil && this == nil") + } + if this.Protocol != nil && that1.Protocol != nil { + if *this.Protocol != *that1.Protocol { + return fmt.Errorf("Protocol this(%v) Not Equal that(%v)", *this.Protocol, *that1.Protocol) + } + } else if this.Protocol != nil { + return fmt.Errorf("this.Protocol == nil && that.Protocol != nil") + } else if that1.Protocol != nil { + return fmt.Errorf("Protocol this(%v) Not Equal that(%v)", this.Protocol, that1.Protocol) + } + if this.IPAddress != nil && that1.IPAddress != nil { + if *this.IPAddress != *that1.IPAddress { + return fmt.Errorf("IPAddress this(%v) Not Equal that(%v)", *this.IPAddress, *that1.IPAddress) + } + } else if this.IPAddress != nil { + return fmt.Errorf("this.IPAddress == nil && that.IPAddress != nil") + } else if that1.IPAddress != nil { + return fmt.Errorf("IPAddress this(%v) Not Equal that(%v)", this.IPAddress, that1.IPAddress) + } + return nil +} +func (this *NetworkInfo_IPAddress) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NetworkInfo_IPAddress) + if !ok { + that2, ok := that.(NetworkInfo_IPAddress) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Protocol != nil && that1.Protocol != nil { + if *this.Protocol != *that1.Protocol { + return false + } + } else if this.Protocol != nil { + return false + } else if that1.Protocol != nil { + return false + } + if this.IPAddress != nil && that1.IPAddress != nil { + if *this.IPAddress != *that1.IPAddress { + return false + } + } else if this.IPAddress != nil { + return false + } else if that1.IPAddress != nil { + return false + } + return true +} +func (this *NetworkInfo_PortMapping) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*NetworkInfo_PortMapping) + if !ok { + that2, ok := that.(NetworkInfo_PortMapping) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *NetworkInfo_PortMapping") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *NetworkInfo_PortMapping but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *NetworkInfo_PortMapping but is not nil && this == nil") + } + if this.HostPort != that1.HostPort { + return fmt.Errorf("HostPort this(%v) Not Equal that(%v)", this.HostPort, that1.HostPort) + } + if this.ContainerPort != that1.ContainerPort { + return fmt.Errorf("ContainerPort this(%v) Not Equal that(%v)", this.ContainerPort, that1.ContainerPort) + } + if this.Protocol != nil && that1.Protocol != nil { + if *this.Protocol != *that1.Protocol { + return fmt.Errorf("Protocol this(%v) Not Equal that(%v)", *this.Protocol, *that1.Protocol) + } + } else if this.Protocol != nil { + return fmt.Errorf("this.Protocol == nil && that.Protocol != nil") + } else if that1.Protocol != nil { + return fmt.Errorf("Protocol this(%v) Not Equal that(%v)", this.Protocol, that1.Protocol) + } + return nil +} +func (this *NetworkInfo_PortMapping) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*NetworkInfo_PortMapping) + if !ok { + that2, ok := that.(NetworkInfo_PortMapping) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.HostPort != that1.HostPort { + return false + } + if this.ContainerPort != that1.ContainerPort { + return false + } + if this.Protocol != nil && that1.Protocol != nil { + if *this.Protocol != *that1.Protocol { + return false + } + } else if this.Protocol != nil { + return false + } else if that1.Protocol != nil { + return false + } + return true +} +func (this *CapabilityInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CapabilityInfo) + if !ok { + that2, ok := that.(CapabilityInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CapabilityInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CapabilityInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CapabilityInfo but is not nil && this == nil") + } + if len(this.Capabilities) != len(that1.Capabilities) { + return fmt.Errorf("Capabilities this(%v) Not Equal that(%v)", len(this.Capabilities), len(that1.Capabilities)) + } + for i := range this.Capabilities { + if this.Capabilities[i] != that1.Capabilities[i] { + return fmt.Errorf("Capabilities this[%v](%v) Not Equal that[%v](%v)", i, this.Capabilities[i], i, that1.Capabilities[i]) + } + } + return nil +} +func (this *CapabilityInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CapabilityInfo) + if !ok { + that2, ok := that.(CapabilityInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Capabilities) != len(that1.Capabilities) { + return false + } + for i := range this.Capabilities { + if this.Capabilities[i] != that1.Capabilities[i] { + return false + } + } + return true +} +func (this *LinuxInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*LinuxInfo) + if !ok { + that2, ok := that.(LinuxInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *LinuxInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *LinuxInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *LinuxInfo but is not nil && this == nil") + } + if !this.CapabilityInfo.Equal(that1.CapabilityInfo) { + return fmt.Errorf("CapabilityInfo this(%v) Not Equal that(%v)", this.CapabilityInfo, that1.CapabilityInfo) + } + if !this.BoundingCapabilities.Equal(that1.BoundingCapabilities) { + return fmt.Errorf("BoundingCapabilities this(%v) Not Equal that(%v)", this.BoundingCapabilities, that1.BoundingCapabilities) + } + if !this.EffectiveCapabilities.Equal(that1.EffectiveCapabilities) { + return fmt.Errorf("EffectiveCapabilities this(%v) Not Equal that(%v)", this.EffectiveCapabilities, that1.EffectiveCapabilities) + } + if this.SharePIDNamespace != nil && that1.SharePIDNamespace != nil { + if *this.SharePIDNamespace != *that1.SharePIDNamespace { + return fmt.Errorf("SharePIDNamespace this(%v) Not Equal that(%v)", *this.SharePIDNamespace, *that1.SharePIDNamespace) + } + } else if this.SharePIDNamespace != nil { + return fmt.Errorf("this.SharePIDNamespace == nil && that.SharePIDNamespace != nil") + } else if that1.SharePIDNamespace != nil { + return fmt.Errorf("SharePIDNamespace this(%v) Not Equal that(%v)", this.SharePIDNamespace, that1.SharePIDNamespace) + } + return nil +} +func (this *LinuxInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*LinuxInfo) + if !ok { + that2, ok := that.(LinuxInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.CapabilityInfo.Equal(that1.CapabilityInfo) { + return false + } + if !this.BoundingCapabilities.Equal(that1.BoundingCapabilities) { + return false + } + if !this.EffectiveCapabilities.Equal(that1.EffectiveCapabilities) { + return false + } + if this.SharePIDNamespace != nil && that1.SharePIDNamespace != nil { + if *this.SharePIDNamespace != *that1.SharePIDNamespace { + return false + } + } else if this.SharePIDNamespace != nil { + return false + } else if that1.SharePIDNamespace != nil { + return false + } + return true +} +func (this *RLimitInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RLimitInfo) + if !ok { + that2, ok := that.(RLimitInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *RLimitInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RLimitInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RLimitInfo but is not nil && this == nil") + } + if len(this.Rlimits) != len(that1.Rlimits) { + return fmt.Errorf("Rlimits this(%v) Not Equal that(%v)", len(this.Rlimits), len(that1.Rlimits)) + } + for i := range this.Rlimits { + if !this.Rlimits[i].Equal(&that1.Rlimits[i]) { + return fmt.Errorf("Rlimits this[%v](%v) Not Equal that[%v](%v)", i, this.Rlimits[i], i, that1.Rlimits[i]) + } + } + return nil +} +func (this *RLimitInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*RLimitInfo) + if !ok { + that2, ok := that.(RLimitInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Rlimits) != len(that1.Rlimits) { + return false + } + for i := range this.Rlimits { + if !this.Rlimits[i].Equal(&that1.Rlimits[i]) { + return false + } + } + return true +} +func (this *RLimitInfo_RLimit) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*RLimitInfo_RLimit) + if !ok { + that2, ok := that.(RLimitInfo_RLimit) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *RLimitInfo_RLimit") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *RLimitInfo_RLimit but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *RLimitInfo_RLimit but is not nil && this == nil") + } + if this.Type != that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if this.Hard != nil && that1.Hard != nil { + if *this.Hard != *that1.Hard { + return fmt.Errorf("Hard this(%v) Not Equal that(%v)", *this.Hard, *that1.Hard) + } + } else if this.Hard != nil { + return fmt.Errorf("this.Hard == nil && that.Hard != nil") + } else if that1.Hard != nil { + return fmt.Errorf("Hard this(%v) Not Equal that(%v)", this.Hard, that1.Hard) + } + if this.Soft != nil && that1.Soft != nil { + if *this.Soft != *that1.Soft { + return fmt.Errorf("Soft this(%v) Not Equal that(%v)", *this.Soft, *that1.Soft) + } + } else if this.Soft != nil { + return fmt.Errorf("this.Soft == nil && that.Soft != nil") + } else if that1.Soft != nil { + return fmt.Errorf("Soft this(%v) Not Equal that(%v)", this.Soft, that1.Soft) + } + return nil +} +func (this *RLimitInfo_RLimit) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*RLimitInfo_RLimit) + if !ok { + that2, ok := that.(RLimitInfo_RLimit) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != that1.Type { + return false + } + if this.Hard != nil && that1.Hard != nil { + if *this.Hard != *that1.Hard { + return false + } + } else if this.Hard != nil { + return false + } else if that1.Hard != nil { + return false + } + if this.Soft != nil && that1.Soft != nil { + if *this.Soft != *that1.Soft { + return false + } + } else if this.Soft != nil { + return false + } else if that1.Soft != nil { + return false + } + return true +} +func (this *TTYInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TTYInfo) + if !ok { + that2, ok := that.(TTYInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TTYInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TTYInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TTYInfo but is not nil && this == nil") + } + if !this.WindowSize.Equal(that1.WindowSize) { + return fmt.Errorf("WindowSize this(%v) Not Equal that(%v)", this.WindowSize, that1.WindowSize) + } + return nil +} +func (this *TTYInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TTYInfo) + if !ok { + that2, ok := that.(TTYInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.WindowSize.Equal(that1.WindowSize) { + return false + } + return true +} +func (this *TTYInfo_WindowSize) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*TTYInfo_WindowSize) + if !ok { + that2, ok := that.(TTYInfo_WindowSize) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *TTYInfo_WindowSize") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *TTYInfo_WindowSize but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *TTYInfo_WindowSize but is not nil && this == nil") + } + if this.Rows != that1.Rows { + return fmt.Errorf("Rows this(%v) Not Equal that(%v)", this.Rows, that1.Rows) + } + if this.Columns != that1.Columns { + return fmt.Errorf("Columns this(%v) Not Equal that(%v)", this.Columns, that1.Columns) + } + return nil +} +func (this *TTYInfo_WindowSize) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*TTYInfo_WindowSize) + if !ok { + that2, ok := that.(TTYInfo_WindowSize) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Rows != that1.Rows { + return false + } + if this.Columns != that1.Columns { + return false + } + return true +} +func (this *ContainerInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainerInfo) + if !ok { + that2, ok := that.(ContainerInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainerInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainerInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainerInfo but is not nil && this == nil") + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", *this.Type, *that1.Type) + } + } else if this.Type != nil { + return fmt.Errorf("this.Type == nil && that.Type != nil") + } else if that1.Type != nil { + return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) + } + if len(this.Volumes) != len(that1.Volumes) { + return fmt.Errorf("Volumes this(%v) Not Equal that(%v)", len(this.Volumes), len(that1.Volumes)) + } + for i := range this.Volumes { + if !this.Volumes[i].Equal(&that1.Volumes[i]) { + return fmt.Errorf("Volumes this[%v](%v) Not Equal that[%v](%v)", i, this.Volumes[i], i, that1.Volumes[i]) + } + } + if this.Hostname != nil && that1.Hostname != nil { + if *this.Hostname != *that1.Hostname { + return fmt.Errorf("Hostname this(%v) Not Equal that(%v)", *this.Hostname, *that1.Hostname) + } + } else if this.Hostname != nil { + return fmt.Errorf("this.Hostname == nil && that.Hostname != nil") + } else if that1.Hostname != nil { + return fmt.Errorf("Hostname this(%v) Not Equal that(%v)", this.Hostname, that1.Hostname) + } + if !this.Docker.Equal(that1.Docker) { + return fmt.Errorf("Docker this(%v) Not Equal that(%v)", this.Docker, that1.Docker) + } + if !this.Mesos.Equal(that1.Mesos) { + return fmt.Errorf("Mesos this(%v) Not Equal that(%v)", this.Mesos, that1.Mesos) + } + if len(this.NetworkInfos) != len(that1.NetworkInfos) { + return fmt.Errorf("NetworkInfos this(%v) Not Equal that(%v)", len(this.NetworkInfos), len(that1.NetworkInfos)) + } + for i := range this.NetworkInfos { + if !this.NetworkInfos[i].Equal(&that1.NetworkInfos[i]) { + return fmt.Errorf("NetworkInfos this[%v](%v) Not Equal that[%v](%v)", i, this.NetworkInfos[i], i, that1.NetworkInfos[i]) + } + } + if !this.LinuxInfo.Equal(that1.LinuxInfo) { + return fmt.Errorf("LinuxInfo this(%v) Not Equal that(%v)", this.LinuxInfo, that1.LinuxInfo) + } + if !this.RlimitInfo.Equal(that1.RlimitInfo) { + return fmt.Errorf("RlimitInfo this(%v) Not Equal that(%v)", this.RlimitInfo, that1.RlimitInfo) + } + if !this.TTYInfo.Equal(that1.TTYInfo) { + return fmt.Errorf("TTYInfo this(%v) Not Equal that(%v)", this.TTYInfo, that1.TTYInfo) + } + return nil +} +func (this *ContainerInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ContainerInfo) + if !ok { + that2, ok := that.(ContainerInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Type != nil && that1.Type != nil { + if *this.Type != *that1.Type { + return false + } + } else if this.Type != nil { + return false + } else if that1.Type != nil { + return false + } + if len(this.Volumes) != len(that1.Volumes) { + return false + } + for i := range this.Volumes { + if !this.Volumes[i].Equal(&that1.Volumes[i]) { + return false + } + } + if this.Hostname != nil && that1.Hostname != nil { + if *this.Hostname != *that1.Hostname { + return false + } + } else if this.Hostname != nil { + return false + } else if that1.Hostname != nil { + return false + } + if !this.Docker.Equal(that1.Docker) { + return false + } + if !this.Mesos.Equal(that1.Mesos) { + return false + } + if len(this.NetworkInfos) != len(that1.NetworkInfos) { + return false + } + for i := range this.NetworkInfos { + if !this.NetworkInfos[i].Equal(&that1.NetworkInfos[i]) { + return false + } + } + if !this.LinuxInfo.Equal(that1.LinuxInfo) { + return false + } + if !this.RlimitInfo.Equal(that1.RlimitInfo) { + return false + } + if !this.TTYInfo.Equal(that1.TTYInfo) { + return false + } + return true +} +func (this *ContainerInfo_DockerInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainerInfo_DockerInfo) + if !ok { + that2, ok := that.(ContainerInfo_DockerInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainerInfo_DockerInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainerInfo_DockerInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainerInfo_DockerInfo but is not nil && this == nil") + } + if this.Image != that1.Image { + return fmt.Errorf("Image this(%v) Not Equal that(%v)", this.Image, that1.Image) + } + if this.Network != nil && that1.Network != nil { + if *this.Network != *that1.Network { + return fmt.Errorf("Network this(%v) Not Equal that(%v)", *this.Network, *that1.Network) + } + } else if this.Network != nil { + return fmt.Errorf("this.Network == nil && that.Network != nil") + } else if that1.Network != nil { + return fmt.Errorf("Network this(%v) Not Equal that(%v)", this.Network, that1.Network) + } + if len(this.PortMappings) != len(that1.PortMappings) { + return fmt.Errorf("PortMappings this(%v) Not Equal that(%v)", len(this.PortMappings), len(that1.PortMappings)) + } + for i := range this.PortMappings { + if !this.PortMappings[i].Equal(&that1.PortMappings[i]) { + return fmt.Errorf("PortMappings this[%v](%v) Not Equal that[%v](%v)", i, this.PortMappings[i], i, that1.PortMappings[i]) + } + } + if this.Privileged != nil && that1.Privileged != nil { + if *this.Privileged != *that1.Privileged { + return fmt.Errorf("Privileged this(%v) Not Equal that(%v)", *this.Privileged, *that1.Privileged) + } + } else if this.Privileged != nil { + return fmt.Errorf("this.Privileged == nil && that.Privileged != nil") + } else if that1.Privileged != nil { + return fmt.Errorf("Privileged this(%v) Not Equal that(%v)", this.Privileged, that1.Privileged) + } + if len(this.Parameters) != len(that1.Parameters) { + return fmt.Errorf("Parameters this(%v) Not Equal that(%v)", len(this.Parameters), len(that1.Parameters)) + } + for i := range this.Parameters { + if !this.Parameters[i].Equal(&that1.Parameters[i]) { + return fmt.Errorf("Parameters this[%v](%v) Not Equal that[%v](%v)", i, this.Parameters[i], i, that1.Parameters[i]) + } + } + if this.ForcePullImage != nil && that1.ForcePullImage != nil { + if *this.ForcePullImage != *that1.ForcePullImage { + return fmt.Errorf("ForcePullImage this(%v) Not Equal that(%v)", *this.ForcePullImage, *that1.ForcePullImage) + } + } else if this.ForcePullImage != nil { + return fmt.Errorf("this.ForcePullImage == nil && that.ForcePullImage != nil") + } else if that1.ForcePullImage != nil { + return fmt.Errorf("ForcePullImage this(%v) Not Equal that(%v)", this.ForcePullImage, that1.ForcePullImage) + } + if this.VolumeDriver != nil && that1.VolumeDriver != nil { + if *this.VolumeDriver != *that1.VolumeDriver { + return fmt.Errorf("VolumeDriver this(%v) Not Equal that(%v)", *this.VolumeDriver, *that1.VolumeDriver) + } + } else if this.VolumeDriver != nil { + return fmt.Errorf("this.VolumeDriver == nil && that.VolumeDriver != nil") + } else if that1.VolumeDriver != nil { + return fmt.Errorf("VolumeDriver this(%v) Not Equal that(%v)", this.VolumeDriver, that1.VolumeDriver) + } + return nil +} +func (this *ContainerInfo_DockerInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ContainerInfo_DockerInfo) + if !ok { + that2, ok := that.(ContainerInfo_DockerInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Image != that1.Image { + return false + } + if this.Network != nil && that1.Network != nil { + if *this.Network != *that1.Network { + return false + } + } else if this.Network != nil { + return false + } else if that1.Network != nil { + return false + } + if len(this.PortMappings) != len(that1.PortMappings) { + return false + } + for i := range this.PortMappings { + if !this.PortMappings[i].Equal(&that1.PortMappings[i]) { + return false + } + } + if this.Privileged != nil && that1.Privileged != nil { + if *this.Privileged != *that1.Privileged { + return false + } + } else if this.Privileged != nil { + return false + } else if that1.Privileged != nil { + return false + } + if len(this.Parameters) != len(that1.Parameters) { + return false + } + for i := range this.Parameters { + if !this.Parameters[i].Equal(&that1.Parameters[i]) { + return false + } + } + if this.ForcePullImage != nil && that1.ForcePullImage != nil { + if *this.ForcePullImage != *that1.ForcePullImage { + return false + } + } else if this.ForcePullImage != nil { + return false + } else if that1.ForcePullImage != nil { + return false + } + if this.VolumeDriver != nil && that1.VolumeDriver != nil { + if *this.VolumeDriver != *that1.VolumeDriver { + return false + } + } else if this.VolumeDriver != nil { + return false + } else if that1.VolumeDriver != nil { + return false + } + return true +} +func (this *ContainerInfo_DockerInfo_PortMapping) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainerInfo_DockerInfo_PortMapping) + if !ok { + that2, ok := that.(ContainerInfo_DockerInfo_PortMapping) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainerInfo_DockerInfo_PortMapping") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainerInfo_DockerInfo_PortMapping but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainerInfo_DockerInfo_PortMapping but is not nil && this == nil") + } + if this.HostPort != that1.HostPort { + return fmt.Errorf("HostPort this(%v) Not Equal that(%v)", this.HostPort, that1.HostPort) + } + if this.ContainerPort != that1.ContainerPort { + return fmt.Errorf("ContainerPort this(%v) Not Equal that(%v)", this.ContainerPort, that1.ContainerPort) + } + if this.Protocol != nil && that1.Protocol != nil { + if *this.Protocol != *that1.Protocol { + return fmt.Errorf("Protocol this(%v) Not Equal that(%v)", *this.Protocol, *that1.Protocol) + } + } else if this.Protocol != nil { + return fmt.Errorf("this.Protocol == nil && that.Protocol != nil") + } else if that1.Protocol != nil { + return fmt.Errorf("Protocol this(%v) Not Equal that(%v)", this.Protocol, that1.Protocol) + } + return nil +} +func (this *ContainerInfo_DockerInfo_PortMapping) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ContainerInfo_DockerInfo_PortMapping) + if !ok { + that2, ok := that.(ContainerInfo_DockerInfo_PortMapping) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.HostPort != that1.HostPort { + return false + } + if this.ContainerPort != that1.ContainerPort { + return false + } + if this.Protocol != nil && that1.Protocol != nil { + if *this.Protocol != *that1.Protocol { + return false + } + } else if this.Protocol != nil { + return false + } else if that1.Protocol != nil { + return false + } + return true +} +func (this *ContainerInfo_MesosInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainerInfo_MesosInfo) + if !ok { + that2, ok := that.(ContainerInfo_MesosInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainerInfo_MesosInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainerInfo_MesosInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainerInfo_MesosInfo but is not nil && this == nil") + } + if !this.Image.Equal(that1.Image) { + return fmt.Errorf("Image this(%v) Not Equal that(%v)", this.Image, that1.Image) + } + return nil +} +func (this *ContainerInfo_MesosInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ContainerInfo_MesosInfo) + if !ok { + that2, ok := that.(ContainerInfo_MesosInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Image.Equal(that1.Image) { + return false + } + return true +} +func (this *ContainerStatus) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*ContainerStatus) + if !ok { + that2, ok := that.(ContainerStatus) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *ContainerStatus") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *ContainerStatus but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *ContainerStatus but is not nil && this == nil") + } + if !this.ContainerID.Equal(that1.ContainerID) { + return fmt.Errorf("ContainerID this(%v) Not Equal that(%v)", this.ContainerID, that1.ContainerID) + } + if len(this.NetworkInfos) != len(that1.NetworkInfos) { + return fmt.Errorf("NetworkInfos this(%v) Not Equal that(%v)", len(this.NetworkInfos), len(that1.NetworkInfos)) + } + for i := range this.NetworkInfos { + if !this.NetworkInfos[i].Equal(&that1.NetworkInfos[i]) { + return fmt.Errorf("NetworkInfos this[%v](%v) Not Equal that[%v](%v)", i, this.NetworkInfos[i], i, that1.NetworkInfos[i]) + } + } + if !this.CgroupInfo.Equal(that1.CgroupInfo) { + return fmt.Errorf("CgroupInfo this(%v) Not Equal that(%v)", this.CgroupInfo, that1.CgroupInfo) + } + if this.ExecutorPID != nil && that1.ExecutorPID != nil { + if *this.ExecutorPID != *that1.ExecutorPID { + return fmt.Errorf("ExecutorPID this(%v) Not Equal that(%v)", *this.ExecutorPID, *that1.ExecutorPID) + } + } else if this.ExecutorPID != nil { + return fmt.Errorf("this.ExecutorPID == nil && that.ExecutorPID != nil") + } else if that1.ExecutorPID != nil { + return fmt.Errorf("ExecutorPID this(%v) Not Equal that(%v)", this.ExecutorPID, that1.ExecutorPID) + } + return nil +} +func (this *ContainerStatus) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*ContainerStatus) + if !ok { + that2, ok := that.(ContainerStatus) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.ContainerID.Equal(that1.ContainerID) { + return false + } + if len(this.NetworkInfos) != len(that1.NetworkInfos) { + return false + } + for i := range this.NetworkInfos { + if !this.NetworkInfos[i].Equal(&that1.NetworkInfos[i]) { + return false + } + } + if !this.CgroupInfo.Equal(that1.CgroupInfo) { + return false + } + if this.ExecutorPID != nil && that1.ExecutorPID != nil { + if *this.ExecutorPID != *that1.ExecutorPID { + return false + } + } else if this.ExecutorPID != nil { + return false + } else if that1.ExecutorPID != nil { + return false + } + return true +} +func (this *CgroupInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CgroupInfo) + if !ok { + that2, ok := that.(CgroupInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CgroupInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CgroupInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CgroupInfo but is not nil && this == nil") + } + if !this.NetCLS.Equal(that1.NetCLS) { + return fmt.Errorf("NetCLS this(%v) Not Equal that(%v)", this.NetCLS, that1.NetCLS) + } + return nil +} +func (this *CgroupInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CgroupInfo) + if !ok { + that2, ok := that.(CgroupInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.NetCLS.Equal(that1.NetCLS) { + return false + } + return true +} +func (this *CgroupInfo_Blkio) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CgroupInfo_Blkio) + if !ok { + that2, ok := that.(CgroupInfo_Blkio) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CgroupInfo_Blkio") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CgroupInfo_Blkio but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CgroupInfo_Blkio but is not nil && this == nil") + } + return nil +} +func (this *CgroupInfo_Blkio) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CgroupInfo_Blkio) + if !ok { + that2, ok := that.(CgroupInfo_Blkio) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + return true +} +func (this *CgroupInfo_Blkio_Value) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CgroupInfo_Blkio_Value) + if !ok { + that2, ok := that.(CgroupInfo_Blkio_Value) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CgroupInfo_Blkio_Value") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CgroupInfo_Blkio_Value but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CgroupInfo_Blkio_Value but is not nil && this == nil") + } + if this.Op != nil && that1.Op != nil { + if *this.Op != *that1.Op { + return fmt.Errorf("Op this(%v) Not Equal that(%v)", *this.Op, *that1.Op) + } + } else if this.Op != nil { + return fmt.Errorf("this.Op == nil && that.Op != nil") + } else if that1.Op != nil { + return fmt.Errorf("Op this(%v) Not Equal that(%v)", this.Op, that1.Op) + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) + } + } else if this.Value != nil { + return fmt.Errorf("this.Value == nil && that.Value != nil") + } else if that1.Value != nil { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + return nil +} +func (this *CgroupInfo_Blkio_Value) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CgroupInfo_Blkio_Value) + if !ok { + that2, ok := that.(CgroupInfo_Blkio_Value) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Op != nil && that1.Op != nil { + if *this.Op != *that1.Op { + return false + } + } else if this.Op != nil { + return false + } else if that1.Op != nil { + return false + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return false + } + } else if this.Value != nil { + return false + } else if that1.Value != nil { + return false + } + return true +} +func (this *CgroupInfo_Blkio_CFQ) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CgroupInfo_Blkio_CFQ) + if !ok { + that2, ok := that.(CgroupInfo_Blkio_CFQ) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CgroupInfo_Blkio_CFQ") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CgroupInfo_Blkio_CFQ but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CgroupInfo_Blkio_CFQ but is not nil && this == nil") + } + return nil +} +func (this *CgroupInfo_Blkio_CFQ) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CgroupInfo_Blkio_CFQ) + if !ok { + that2, ok := that.(CgroupInfo_Blkio_CFQ) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + return true +} +func (this *CgroupInfo_Blkio_CFQ_Statistics) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CgroupInfo_Blkio_CFQ_Statistics) + if !ok { + that2, ok := that.(CgroupInfo_Blkio_CFQ_Statistics) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CgroupInfo_Blkio_CFQ_Statistics") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CgroupInfo_Blkio_CFQ_Statistics but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CgroupInfo_Blkio_CFQ_Statistics but is not nil && this == nil") + } + if !this.Device.Equal(that1.Device) { + return fmt.Errorf("Device this(%v) Not Equal that(%v)", this.Device, that1.Device) + } + if this.Sectors != nil && that1.Sectors != nil { + if *this.Sectors != *that1.Sectors { + return fmt.Errorf("Sectors this(%v) Not Equal that(%v)", *this.Sectors, *that1.Sectors) + } + } else if this.Sectors != nil { + return fmt.Errorf("this.Sectors == nil && that.Sectors != nil") + } else if that1.Sectors != nil { + return fmt.Errorf("Sectors this(%v) Not Equal that(%v)", this.Sectors, that1.Sectors) + } + if this.Time != nil && that1.Time != nil { + if *this.Time != *that1.Time { + return fmt.Errorf("Time this(%v) Not Equal that(%v)", *this.Time, *that1.Time) + } + } else if this.Time != nil { + return fmt.Errorf("this.Time == nil && that.Time != nil") + } else if that1.Time != nil { + return fmt.Errorf("Time this(%v) Not Equal that(%v)", this.Time, that1.Time) + } + if len(this.IOServiced) != len(that1.IOServiced) { + return fmt.Errorf("IOServiced this(%v) Not Equal that(%v)", len(this.IOServiced), len(that1.IOServiced)) + } + for i := range this.IOServiced { + if !this.IOServiced[i].Equal(&that1.IOServiced[i]) { + return fmt.Errorf("IOServiced this[%v](%v) Not Equal that[%v](%v)", i, this.IOServiced[i], i, that1.IOServiced[i]) + } + } + if len(this.IOServiceBytes) != len(that1.IOServiceBytes) { + return fmt.Errorf("IOServiceBytes this(%v) Not Equal that(%v)", len(this.IOServiceBytes), len(that1.IOServiceBytes)) + } + for i := range this.IOServiceBytes { + if !this.IOServiceBytes[i].Equal(&that1.IOServiceBytes[i]) { + return fmt.Errorf("IOServiceBytes this[%v](%v) Not Equal that[%v](%v)", i, this.IOServiceBytes[i], i, that1.IOServiceBytes[i]) + } + } + if len(this.IOServiceTime) != len(that1.IOServiceTime) { + return fmt.Errorf("IOServiceTime this(%v) Not Equal that(%v)", len(this.IOServiceTime), len(that1.IOServiceTime)) + } + for i := range this.IOServiceTime { + if !this.IOServiceTime[i].Equal(&that1.IOServiceTime[i]) { + return fmt.Errorf("IOServiceTime this[%v](%v) Not Equal that[%v](%v)", i, this.IOServiceTime[i], i, that1.IOServiceTime[i]) + } + } + if len(this.IOWaitTime) != len(that1.IOWaitTime) { + return fmt.Errorf("IOWaitTime this(%v) Not Equal that(%v)", len(this.IOWaitTime), len(that1.IOWaitTime)) + } + for i := range this.IOWaitTime { + if !this.IOWaitTime[i].Equal(&that1.IOWaitTime[i]) { + return fmt.Errorf("IOWaitTime this[%v](%v) Not Equal that[%v](%v)", i, this.IOWaitTime[i], i, that1.IOWaitTime[i]) + } + } + if len(this.IOMerged) != len(that1.IOMerged) { + return fmt.Errorf("IOMerged this(%v) Not Equal that(%v)", len(this.IOMerged), len(that1.IOMerged)) + } + for i := range this.IOMerged { + if !this.IOMerged[i].Equal(&that1.IOMerged[i]) { + return fmt.Errorf("IOMerged this[%v](%v) Not Equal that[%v](%v)", i, this.IOMerged[i], i, that1.IOMerged[i]) + } + } + if len(this.IOQueued) != len(that1.IOQueued) { + return fmt.Errorf("IOQueued this(%v) Not Equal that(%v)", len(this.IOQueued), len(that1.IOQueued)) + } + for i := range this.IOQueued { + if !this.IOQueued[i].Equal(&that1.IOQueued[i]) { + return fmt.Errorf("IOQueued this[%v](%v) Not Equal that[%v](%v)", i, this.IOQueued[i], i, that1.IOQueued[i]) + } + } + return nil +} +func (this *CgroupInfo_Blkio_CFQ_Statistics) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CgroupInfo_Blkio_CFQ_Statistics) + if !ok { + that2, ok := that.(CgroupInfo_Blkio_CFQ_Statistics) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Device.Equal(that1.Device) { + return false + } + if this.Sectors != nil && that1.Sectors != nil { + if *this.Sectors != *that1.Sectors { + return false + } + } else if this.Sectors != nil { + return false + } else if that1.Sectors != nil { + return false + } + if this.Time != nil && that1.Time != nil { + if *this.Time != *that1.Time { + return false + } + } else if this.Time != nil { + return false + } else if that1.Time != nil { + return false + } + if len(this.IOServiced) != len(that1.IOServiced) { + return false + } + for i := range this.IOServiced { + if !this.IOServiced[i].Equal(&that1.IOServiced[i]) { + return false + } + } + if len(this.IOServiceBytes) != len(that1.IOServiceBytes) { + return false + } + for i := range this.IOServiceBytes { + if !this.IOServiceBytes[i].Equal(&that1.IOServiceBytes[i]) { + return false + } + } + if len(this.IOServiceTime) != len(that1.IOServiceTime) { + return false + } + for i := range this.IOServiceTime { + if !this.IOServiceTime[i].Equal(&that1.IOServiceTime[i]) { + return false + } + } + if len(this.IOWaitTime) != len(that1.IOWaitTime) { + return false + } + for i := range this.IOWaitTime { + if !this.IOWaitTime[i].Equal(&that1.IOWaitTime[i]) { + return false + } + } + if len(this.IOMerged) != len(that1.IOMerged) { + return false + } + for i := range this.IOMerged { + if !this.IOMerged[i].Equal(&that1.IOMerged[i]) { + return false + } + } + if len(this.IOQueued) != len(that1.IOQueued) { + return false + } + for i := range this.IOQueued { + if !this.IOQueued[i].Equal(&that1.IOQueued[i]) { + return false + } + } + return true +} +func (this *CgroupInfo_Blkio_Throttling) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CgroupInfo_Blkio_Throttling) + if !ok { + that2, ok := that.(CgroupInfo_Blkio_Throttling) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CgroupInfo_Blkio_Throttling") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CgroupInfo_Blkio_Throttling but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CgroupInfo_Blkio_Throttling but is not nil && this == nil") + } + return nil +} +func (this *CgroupInfo_Blkio_Throttling) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CgroupInfo_Blkio_Throttling) + if !ok { + that2, ok := that.(CgroupInfo_Blkio_Throttling) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + return true +} +func (this *CgroupInfo_Blkio_Throttling_Statistics) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CgroupInfo_Blkio_Throttling_Statistics) + if !ok { + that2, ok := that.(CgroupInfo_Blkio_Throttling_Statistics) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CgroupInfo_Blkio_Throttling_Statistics") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CgroupInfo_Blkio_Throttling_Statistics but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CgroupInfo_Blkio_Throttling_Statistics but is not nil && this == nil") + } + if !this.Device.Equal(that1.Device) { + return fmt.Errorf("Device this(%v) Not Equal that(%v)", this.Device, that1.Device) + } + if len(this.IOServiced) != len(that1.IOServiced) { + return fmt.Errorf("IOServiced this(%v) Not Equal that(%v)", len(this.IOServiced), len(that1.IOServiced)) + } + for i := range this.IOServiced { + if !this.IOServiced[i].Equal(&that1.IOServiced[i]) { + return fmt.Errorf("IOServiced this[%v](%v) Not Equal that[%v](%v)", i, this.IOServiced[i], i, that1.IOServiced[i]) + } + } + if len(this.IOServiceBytes) != len(that1.IOServiceBytes) { + return fmt.Errorf("IOServiceBytes this(%v) Not Equal that(%v)", len(this.IOServiceBytes), len(that1.IOServiceBytes)) + } + for i := range this.IOServiceBytes { + if !this.IOServiceBytes[i].Equal(&that1.IOServiceBytes[i]) { + return fmt.Errorf("IOServiceBytes this[%v](%v) Not Equal that[%v](%v)", i, this.IOServiceBytes[i], i, that1.IOServiceBytes[i]) + } + } + return nil +} +func (this *CgroupInfo_Blkio_Throttling_Statistics) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CgroupInfo_Blkio_Throttling_Statistics) + if !ok { + that2, ok := that.(CgroupInfo_Blkio_Throttling_Statistics) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Device.Equal(that1.Device) { + return false + } + if len(this.IOServiced) != len(that1.IOServiced) { + return false + } + for i := range this.IOServiced { + if !this.IOServiced[i].Equal(&that1.IOServiced[i]) { + return false + } + } + if len(this.IOServiceBytes) != len(that1.IOServiceBytes) { + return false + } + for i := range this.IOServiceBytes { + if !this.IOServiceBytes[i].Equal(&that1.IOServiceBytes[i]) { + return false + } + } + return true +} +func (this *CgroupInfo_Blkio_Statistics) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CgroupInfo_Blkio_Statistics) + if !ok { + that2, ok := that.(CgroupInfo_Blkio_Statistics) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CgroupInfo_Blkio_Statistics") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CgroupInfo_Blkio_Statistics but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CgroupInfo_Blkio_Statistics but is not nil && this == nil") + } + if len(this.CFQ) != len(that1.CFQ) { + return fmt.Errorf("CFQ this(%v) Not Equal that(%v)", len(this.CFQ), len(that1.CFQ)) + } + for i := range this.CFQ { + if !this.CFQ[i].Equal(&that1.CFQ[i]) { + return fmt.Errorf("CFQ this[%v](%v) Not Equal that[%v](%v)", i, this.CFQ[i], i, that1.CFQ[i]) + } + } + if len(this.CFQRecursive) != len(that1.CFQRecursive) { + return fmt.Errorf("CFQRecursive this(%v) Not Equal that(%v)", len(this.CFQRecursive), len(that1.CFQRecursive)) + } + for i := range this.CFQRecursive { + if !this.CFQRecursive[i].Equal(&that1.CFQRecursive[i]) { + return fmt.Errorf("CFQRecursive this[%v](%v) Not Equal that[%v](%v)", i, this.CFQRecursive[i], i, that1.CFQRecursive[i]) + } + } + if len(this.Throttling) != len(that1.Throttling) { + return fmt.Errorf("Throttling this(%v) Not Equal that(%v)", len(this.Throttling), len(that1.Throttling)) + } + for i := range this.Throttling { + if !this.Throttling[i].Equal(that1.Throttling[i]) { + return fmt.Errorf("Throttling this[%v](%v) Not Equal that[%v](%v)", i, this.Throttling[i], i, that1.Throttling[i]) + } + } + return nil +} +func (this *CgroupInfo_Blkio_Statistics) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CgroupInfo_Blkio_Statistics) + if !ok { + that2, ok := that.(CgroupInfo_Blkio_Statistics) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.CFQ) != len(that1.CFQ) { + return false + } + for i := range this.CFQ { + if !this.CFQ[i].Equal(&that1.CFQ[i]) { + return false + } + } + if len(this.CFQRecursive) != len(that1.CFQRecursive) { + return false + } + for i := range this.CFQRecursive { + if !this.CFQRecursive[i].Equal(&that1.CFQRecursive[i]) { + return false + } + } + if len(this.Throttling) != len(that1.Throttling) { + return false + } + for i := range this.Throttling { + if !this.Throttling[i].Equal(that1.Throttling[i]) { + return false + } + } + return true +} +func (this *CgroupInfo_NetCls) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*CgroupInfo_NetCls) + if !ok { + that2, ok := that.(CgroupInfo_NetCls) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *CgroupInfo_NetCls") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *CgroupInfo_NetCls but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *CgroupInfo_NetCls but is not nil && this == nil") + } + if this.ClassID != nil && that1.ClassID != nil { + if *this.ClassID != *that1.ClassID { + return fmt.Errorf("ClassID this(%v) Not Equal that(%v)", *this.ClassID, *that1.ClassID) + } + } else if this.ClassID != nil { + return fmt.Errorf("this.ClassID == nil && that.ClassID != nil") + } else if that1.ClassID != nil { + return fmt.Errorf("ClassID this(%v) Not Equal that(%v)", this.ClassID, that1.ClassID) + } + return nil +} +func (this *CgroupInfo_NetCls) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*CgroupInfo_NetCls) + if !ok { + that2, ok := that.(CgroupInfo_NetCls) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.ClassID != nil && that1.ClassID != nil { + if *this.ClassID != *that1.ClassID { + return false + } + } else if this.ClassID != nil { + return false + } else if that1.ClassID != nil { + return false + } + return true +} +func (this *Labels) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Labels) + if !ok { + that2, ok := that.(Labels) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Labels") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Labels but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Labels but is not nil && this == nil") + } + if len(this.Labels) != len(that1.Labels) { + return fmt.Errorf("Labels this(%v) Not Equal that(%v)", len(this.Labels), len(that1.Labels)) + } + for i := range this.Labels { + if !this.Labels[i].Equal(&that1.Labels[i]) { + return fmt.Errorf("Labels this[%v](%v) Not Equal that[%v](%v)", i, this.Labels[i], i, that1.Labels[i]) + } + } + return nil +} +func (this *Labels) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Labels) + if !ok { + that2, ok := that.(Labels) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Labels) != len(that1.Labels) { + return false + } + for i := range this.Labels { + if !this.Labels[i].Equal(&that1.Labels[i]) { + return false + } + } + return true +} +func (this *Label) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Label) + if !ok { + that2, ok := that.(Label) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Label") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Label but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Label but is not nil && this == nil") + } + if this.Key != that1.Key { + return fmt.Errorf("Key this(%v) Not Equal that(%v)", this.Key, that1.Key) + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) + } + } else if this.Value != nil { + return fmt.Errorf("this.Value == nil && that.Value != nil") + } else if that1.Value != nil { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + return nil +} +func (this *Label) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Label) + if !ok { + that2, ok := that.(Label) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Key != that1.Key { + return false + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return false + } + } else if this.Value != nil { + return false + } else if that1.Value != nil { + return false + } + return true +} +func (this *Port) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Port) + if !ok { + that2, ok := that.(Port) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Port") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Port but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Port but is not nil && this == nil") + } + if this.Number != that1.Number { + return fmt.Errorf("Number this(%v) Not Equal that(%v)", this.Number, that1.Number) + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) + } + } else if this.Name != nil { + return fmt.Errorf("this.Name == nil && that.Name != nil") + } else if that1.Name != nil { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Protocol != nil && that1.Protocol != nil { + if *this.Protocol != *that1.Protocol { + return fmt.Errorf("Protocol this(%v) Not Equal that(%v)", *this.Protocol, *that1.Protocol) + } + } else if this.Protocol != nil { + return fmt.Errorf("this.Protocol == nil && that.Protocol != nil") + } else if that1.Protocol != nil { + return fmt.Errorf("Protocol this(%v) Not Equal that(%v)", this.Protocol, that1.Protocol) + } + if this.Visibility != nil && that1.Visibility != nil { + if *this.Visibility != *that1.Visibility { + return fmt.Errorf("Visibility this(%v) Not Equal that(%v)", *this.Visibility, *that1.Visibility) + } + } else if this.Visibility != nil { + return fmt.Errorf("this.Visibility == nil && that.Visibility != nil") + } else if that1.Visibility != nil { + return fmt.Errorf("Visibility this(%v) Not Equal that(%v)", this.Visibility, that1.Visibility) + } + if !this.Labels.Equal(that1.Labels) { + return fmt.Errorf("Labels this(%v) Not Equal that(%v)", this.Labels, that1.Labels) + } + return nil +} +func (this *Port) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Port) + if !ok { + that2, ok := that.(Port) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Number != that1.Number { + return false + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return false + } + } else if this.Name != nil { + return false + } else if that1.Name != nil { + return false + } + if this.Protocol != nil && that1.Protocol != nil { + if *this.Protocol != *that1.Protocol { + return false + } + } else if this.Protocol != nil { + return false + } else if that1.Protocol != nil { + return false + } + if this.Visibility != nil && that1.Visibility != nil { + if *this.Visibility != *that1.Visibility { + return false + } + } else if this.Visibility != nil { + return false + } else if that1.Visibility != nil { + return false + } + if !this.Labels.Equal(that1.Labels) { + return false + } + return true +} +func (this *Ports) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Ports) + if !ok { + that2, ok := that.(Ports) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Ports") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Ports but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Ports but is not nil && this == nil") + } + if len(this.Ports) != len(that1.Ports) { + return fmt.Errorf("Ports this(%v) Not Equal that(%v)", len(this.Ports), len(that1.Ports)) + } + for i := range this.Ports { + if !this.Ports[i].Equal(&that1.Ports[i]) { + return fmt.Errorf("Ports this[%v](%v) Not Equal that[%v](%v)", i, this.Ports[i], i, that1.Ports[i]) + } + } + return nil +} +func (this *Ports) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Ports) + if !ok { + that2, ok := that.(Ports) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.Ports) != len(that1.Ports) { + return false + } + for i := range this.Ports { + if !this.Ports[i].Equal(&that1.Ports[i]) { + return false + } + } + return true +} +func (this *DiscoveryInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DiscoveryInfo) + if !ok { + that2, ok := that.(DiscoveryInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DiscoveryInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DiscoveryInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DiscoveryInfo but is not nil && this == nil") + } + if this.Visibility != that1.Visibility { + return fmt.Errorf("Visibility this(%v) Not Equal that(%v)", this.Visibility, that1.Visibility) + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", *this.Name, *that1.Name) + } + } else if this.Name != nil { + return fmt.Errorf("this.Name == nil && that.Name != nil") + } else if that1.Name != nil { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Environment != nil && that1.Environment != nil { + if *this.Environment != *that1.Environment { + return fmt.Errorf("Environment this(%v) Not Equal that(%v)", *this.Environment, *that1.Environment) + } + } else if this.Environment != nil { + return fmt.Errorf("this.Environment == nil && that.Environment != nil") + } else if that1.Environment != nil { + return fmt.Errorf("Environment this(%v) Not Equal that(%v)", this.Environment, that1.Environment) + } + if this.Location != nil && that1.Location != nil { + if *this.Location != *that1.Location { + return fmt.Errorf("Location this(%v) Not Equal that(%v)", *this.Location, *that1.Location) + } + } else if this.Location != nil { + return fmt.Errorf("this.Location == nil && that.Location != nil") + } else if that1.Location != nil { + return fmt.Errorf("Location this(%v) Not Equal that(%v)", this.Location, that1.Location) + } + if this.Version != nil && that1.Version != nil { + if *this.Version != *that1.Version { + return fmt.Errorf("Version this(%v) Not Equal that(%v)", *this.Version, *that1.Version) + } + } else if this.Version != nil { + return fmt.Errorf("this.Version == nil && that.Version != nil") + } else if that1.Version != nil { + return fmt.Errorf("Version this(%v) Not Equal that(%v)", this.Version, that1.Version) + } + if !this.Ports.Equal(that1.Ports) { + return fmt.Errorf("Ports this(%v) Not Equal that(%v)", this.Ports, that1.Ports) + } + if !this.Labels.Equal(that1.Labels) { + return fmt.Errorf("Labels this(%v) Not Equal that(%v)", this.Labels, that1.Labels) + } + return nil +} +func (this *DiscoveryInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DiscoveryInfo) + if !ok { + that2, ok := that.(DiscoveryInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Visibility != that1.Visibility { + return false + } + if this.Name != nil && that1.Name != nil { + if *this.Name != *that1.Name { + return false + } + } else if this.Name != nil { + return false + } else if that1.Name != nil { + return false + } + if this.Environment != nil && that1.Environment != nil { + if *this.Environment != *that1.Environment { + return false + } + } else if this.Environment != nil { + return false + } else if that1.Environment != nil { + return false + } + if this.Location != nil && that1.Location != nil { + if *this.Location != *that1.Location { + return false + } + } else if this.Location != nil { + return false + } else if that1.Location != nil { + return false + } + if this.Version != nil && that1.Version != nil { + if *this.Version != *that1.Version { + return false + } + } else if this.Version != nil { + return false + } else if that1.Version != nil { + return false + } + if !this.Ports.Equal(that1.Ports) { + return false + } + if !this.Labels.Equal(that1.Labels) { + return false + } + return true +} +func (this *WeightInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*WeightInfo) + if !ok { + that2, ok := that.(WeightInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *WeightInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *WeightInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *WeightInfo but is not nil && this == nil") + } + if this.Weight != that1.Weight { + return fmt.Errorf("Weight this(%v) Not Equal that(%v)", this.Weight, that1.Weight) + } + if this.Role != nil && that1.Role != nil { + if *this.Role != *that1.Role { + return fmt.Errorf("Role this(%v) Not Equal that(%v)", *this.Role, *that1.Role) + } + } else if this.Role != nil { + return fmt.Errorf("this.Role == nil && that.Role != nil") + } else if that1.Role != nil { + return fmt.Errorf("Role this(%v) Not Equal that(%v)", this.Role, that1.Role) + } + return nil +} +func (this *WeightInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*WeightInfo) + if !ok { + that2, ok := that.(WeightInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Weight != that1.Weight { + return false + } + if this.Role != nil && that1.Role != nil { + if *this.Role != *that1.Role { + return false + } + } else if this.Role != nil { + return false + } else if that1.Role != nil { + return false + } + return true +} +func (this *VersionInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*VersionInfo) + if !ok { + that2, ok := that.(VersionInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *VersionInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *VersionInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *VersionInfo but is not nil && this == nil") + } + if this.Version != that1.Version { + return fmt.Errorf("Version this(%v) Not Equal that(%v)", this.Version, that1.Version) + } + if this.BuildDate != nil && that1.BuildDate != nil { + if *this.BuildDate != *that1.BuildDate { + return fmt.Errorf("BuildDate this(%v) Not Equal that(%v)", *this.BuildDate, *that1.BuildDate) + } + } else if this.BuildDate != nil { + return fmt.Errorf("this.BuildDate == nil && that.BuildDate != nil") + } else if that1.BuildDate != nil { + return fmt.Errorf("BuildDate this(%v) Not Equal that(%v)", this.BuildDate, that1.BuildDate) + } + if this.BuildTime != nil && that1.BuildTime != nil { + if *this.BuildTime != *that1.BuildTime { + return fmt.Errorf("BuildTime this(%v) Not Equal that(%v)", *this.BuildTime, *that1.BuildTime) + } + } else if this.BuildTime != nil { + return fmt.Errorf("this.BuildTime == nil && that.BuildTime != nil") + } else if that1.BuildTime != nil { + return fmt.Errorf("BuildTime this(%v) Not Equal that(%v)", this.BuildTime, that1.BuildTime) + } + if this.BuildUser != nil && that1.BuildUser != nil { + if *this.BuildUser != *that1.BuildUser { + return fmt.Errorf("BuildUser this(%v) Not Equal that(%v)", *this.BuildUser, *that1.BuildUser) + } + } else if this.BuildUser != nil { + return fmt.Errorf("this.BuildUser == nil && that.BuildUser != nil") + } else if that1.BuildUser != nil { + return fmt.Errorf("BuildUser this(%v) Not Equal that(%v)", this.BuildUser, that1.BuildUser) + } + if this.GitSHA != nil && that1.GitSHA != nil { + if *this.GitSHA != *that1.GitSHA { + return fmt.Errorf("GitSHA this(%v) Not Equal that(%v)", *this.GitSHA, *that1.GitSHA) + } + } else if this.GitSHA != nil { + return fmt.Errorf("this.GitSHA == nil && that.GitSHA != nil") + } else if that1.GitSHA != nil { + return fmt.Errorf("GitSHA this(%v) Not Equal that(%v)", this.GitSHA, that1.GitSHA) + } + if this.GitBranch != nil && that1.GitBranch != nil { + if *this.GitBranch != *that1.GitBranch { + return fmt.Errorf("GitBranch this(%v) Not Equal that(%v)", *this.GitBranch, *that1.GitBranch) + } + } else if this.GitBranch != nil { + return fmt.Errorf("this.GitBranch == nil && that.GitBranch != nil") + } else if that1.GitBranch != nil { + return fmt.Errorf("GitBranch this(%v) Not Equal that(%v)", this.GitBranch, that1.GitBranch) + } + if this.GitTag != nil && that1.GitTag != nil { + if *this.GitTag != *that1.GitTag { + return fmt.Errorf("GitTag this(%v) Not Equal that(%v)", *this.GitTag, *that1.GitTag) + } + } else if this.GitTag != nil { + return fmt.Errorf("this.GitTag == nil && that.GitTag != nil") + } else if that1.GitTag != nil { + return fmt.Errorf("GitTag this(%v) Not Equal that(%v)", this.GitTag, that1.GitTag) + } + return nil +} +func (this *VersionInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*VersionInfo) + if !ok { + that2, ok := that.(VersionInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Version != that1.Version { + return false + } + if this.BuildDate != nil && that1.BuildDate != nil { + if *this.BuildDate != *that1.BuildDate { + return false + } + } else if this.BuildDate != nil { + return false + } else if that1.BuildDate != nil { + return false + } + if this.BuildTime != nil && that1.BuildTime != nil { + if *this.BuildTime != *that1.BuildTime { + return false + } + } else if this.BuildTime != nil { + return false + } else if that1.BuildTime != nil { + return false + } + if this.BuildUser != nil && that1.BuildUser != nil { + if *this.BuildUser != *that1.BuildUser { + return false + } + } else if this.BuildUser != nil { + return false + } else if that1.BuildUser != nil { + return false + } + if this.GitSHA != nil && that1.GitSHA != nil { + if *this.GitSHA != *that1.GitSHA { + return false + } + } else if this.GitSHA != nil { + return false + } else if that1.GitSHA != nil { + return false + } + if this.GitBranch != nil && that1.GitBranch != nil { + if *this.GitBranch != *that1.GitBranch { + return false + } + } else if this.GitBranch != nil { + return false + } else if that1.GitBranch != nil { + return false + } + if this.GitTag != nil && that1.GitTag != nil { + if *this.GitTag != *that1.GitTag { + return false + } + } else if this.GitTag != nil { + return false + } else if that1.GitTag != nil { + return false + } + return true +} +func (this *Flag) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Flag) + if !ok { + that2, ok := that.(Flag) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Flag") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Flag but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Flag but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) + } + } else if this.Value != nil { + return fmt.Errorf("this.Value == nil && that.Value != nil") + } else if that1.Value != nil { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + return nil +} +func (this *Flag) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Flag) + if !ok { + that2, ok := that.(Flag) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return false + } + } else if this.Value != nil { + return false + } else if that1.Value != nil { + return false + } + return true +} +func (this *Role) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Role) + if !ok { + that2, ok := that.(Role) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Role") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Role but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Role but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Weight != that1.Weight { + return fmt.Errorf("Weight this(%v) Not Equal that(%v)", this.Weight, that1.Weight) + } + if len(this.Frameworks) != len(that1.Frameworks) { + return fmt.Errorf("Frameworks this(%v) Not Equal that(%v)", len(this.Frameworks), len(that1.Frameworks)) + } + for i := range this.Frameworks { + if !this.Frameworks[i].Equal(&that1.Frameworks[i]) { + return fmt.Errorf("Frameworks this[%v](%v) Not Equal that[%v](%v)", i, this.Frameworks[i], i, that1.Frameworks[i]) + } + } + if len(this.Resources) != len(that1.Resources) { + return fmt.Errorf("Resources this(%v) Not Equal that(%v)", len(this.Resources), len(that1.Resources)) + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return fmt.Errorf("Resources this[%v](%v) Not Equal that[%v](%v)", i, this.Resources[i], i, that1.Resources[i]) + } + } + return nil +} +func (this *Role) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Role) + if !ok { + that2, ok := that.(Role) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Weight != that1.Weight { + return false + } + if len(this.Frameworks) != len(that1.Frameworks) { + return false + } + for i := range this.Frameworks { + if !this.Frameworks[i].Equal(&that1.Frameworks[i]) { + return false + } + } + if len(this.Resources) != len(that1.Resources) { + return false + } + for i := range this.Resources { + if !this.Resources[i].Equal(&that1.Resources[i]) { + return false + } + } + return true +} +func (this *Metric) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Metric) + if !ok { + that2, ok := that.(Metric) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Metric") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Metric but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Metric but is not nil && this == nil") + } + if this.Name != that1.Name { + return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", *this.Value, *that1.Value) + } + } else if this.Value != nil { + return fmt.Errorf("this.Value == nil && that.Value != nil") + } else if that1.Value != nil { + return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) + } + return nil +} +func (this *Metric) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Metric) + if !ok { + that2, ok := that.(Metric) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Name != that1.Name { + return false + } + if this.Value != nil && that1.Value != nil { + if *this.Value != *that1.Value { + return false + } + } else if this.Value != nil { + return false + } else if that1.Value != nil { + return false + } + return true +} +func (this *FileInfo) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*FileInfo) + if !ok { + that2, ok := that.(FileInfo) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *FileInfo") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *FileInfo but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *FileInfo but is not nil && this == nil") + } + if this.Path != that1.Path { + return fmt.Errorf("Path this(%v) Not Equal that(%v)", this.Path, that1.Path) + } + if this.Nlink != nil && that1.Nlink != nil { + if *this.Nlink != *that1.Nlink { + return fmt.Errorf("Nlink this(%v) Not Equal that(%v)", *this.Nlink, *that1.Nlink) + } + } else if this.Nlink != nil { + return fmt.Errorf("this.Nlink == nil && that.Nlink != nil") + } else if that1.Nlink != nil { + return fmt.Errorf("Nlink this(%v) Not Equal that(%v)", this.Nlink, that1.Nlink) + } + if this.Size != nil && that1.Size != nil { + if *this.Size != *that1.Size { + return fmt.Errorf("Size this(%v) Not Equal that(%v)", *this.Size, *that1.Size) + } + } else if this.Size != nil { + return fmt.Errorf("this.Size == nil && that.Size != nil") + } else if that1.Size != nil { + return fmt.Errorf("Size this(%v) Not Equal that(%v)", this.Size, that1.Size) + } + if !this.Mtime.Equal(that1.Mtime) { + return fmt.Errorf("Mtime this(%v) Not Equal that(%v)", this.Mtime, that1.Mtime) + } + if this.Mode != nil && that1.Mode != nil { + if *this.Mode != *that1.Mode { + return fmt.Errorf("Mode this(%v) Not Equal that(%v)", *this.Mode, *that1.Mode) + } + } else if this.Mode != nil { + return fmt.Errorf("this.Mode == nil && that.Mode != nil") + } else if that1.Mode != nil { + return fmt.Errorf("Mode this(%v) Not Equal that(%v)", this.Mode, that1.Mode) + } + if this.UID != nil && that1.UID != nil { + if *this.UID != *that1.UID { + return fmt.Errorf("UID this(%v) Not Equal that(%v)", *this.UID, *that1.UID) + } + } else if this.UID != nil { + return fmt.Errorf("this.UID == nil && that.UID != nil") + } else if that1.UID != nil { + return fmt.Errorf("UID this(%v) Not Equal that(%v)", this.UID, that1.UID) + } + if this.GID != nil && that1.GID != nil { + if *this.GID != *that1.GID { + return fmt.Errorf("GID this(%v) Not Equal that(%v)", *this.GID, *that1.GID) + } + } else if this.GID != nil { + return fmt.Errorf("this.GID == nil && that.GID != nil") + } else if that1.GID != nil { + return fmt.Errorf("GID this(%v) Not Equal that(%v)", this.GID, that1.GID) + } + return nil +} +func (this *FileInfo) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*FileInfo) + if !ok { + that2, ok := that.(FileInfo) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Path != that1.Path { + return false + } + if this.Nlink != nil && that1.Nlink != nil { + if *this.Nlink != *that1.Nlink { + return false + } + } else if this.Nlink != nil { + return false + } else if that1.Nlink != nil { + return false + } + if this.Size != nil && that1.Size != nil { + if *this.Size != *that1.Size { + return false + } + } else if this.Size != nil { + return false + } else if that1.Size != nil { + return false + } + if !this.Mtime.Equal(that1.Mtime) { + return false + } + if this.Mode != nil && that1.Mode != nil { + if *this.Mode != *that1.Mode { + return false + } + } else if this.Mode != nil { + return false + } else if that1.Mode != nil { + return false + } + if this.UID != nil && that1.UID != nil { + if *this.UID != *that1.UID { + return false + } + } else if this.UID != nil { + return false + } else if that1.UID != nil { + return false + } + if this.GID != nil && that1.GID != nil { + if *this.GID != *that1.GID { + return false + } + } else if this.GID != nil { + return false + } else if that1.GID != nil { + return false + } + return true +} +func (this *Device) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Device) + if !ok { + that2, ok := that.(Device) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Device") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Device but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Device but is not nil && this == nil") + } + if this.Path != nil && that1.Path != nil { + if *this.Path != *that1.Path { + return fmt.Errorf("Path this(%v) Not Equal that(%v)", *this.Path, *that1.Path) + } + } else if this.Path != nil { + return fmt.Errorf("this.Path == nil && that.Path != nil") + } else if that1.Path != nil { + return fmt.Errorf("Path this(%v) Not Equal that(%v)", this.Path, that1.Path) + } + if !this.Number.Equal(that1.Number) { + return fmt.Errorf("Number this(%v) Not Equal that(%v)", this.Number, that1.Number) + } + return nil +} +func (this *Device) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Device) + if !ok { + that2, ok := that.(Device) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Path != nil && that1.Path != nil { + if *this.Path != *that1.Path { + return false + } + } else if this.Path != nil { + return false + } else if that1.Path != nil { + return false + } + if !this.Number.Equal(that1.Number) { + return false + } + return true +} +func (this *Device_Number) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*Device_Number) + if !ok { + that2, ok := that.(Device_Number) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *Device_Number") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *Device_Number but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *Device_Number but is not nil && this == nil") + } + if this.MajorNumber != nil && that1.MajorNumber != nil { + if *this.MajorNumber != *that1.MajorNumber { + return fmt.Errorf("MajorNumber this(%v) Not Equal that(%v)", *this.MajorNumber, *that1.MajorNumber) + } + } else if this.MajorNumber != nil { + return fmt.Errorf("this.MajorNumber == nil && that.MajorNumber != nil") + } else if that1.MajorNumber != nil { + return fmt.Errorf("MajorNumber this(%v) Not Equal that(%v)", this.MajorNumber, that1.MajorNumber) + } + if this.MinorNumber != nil && that1.MinorNumber != nil { + if *this.MinorNumber != *that1.MinorNumber { + return fmt.Errorf("MinorNumber this(%v) Not Equal that(%v)", *this.MinorNumber, *that1.MinorNumber) + } + } else if this.MinorNumber != nil { + return fmt.Errorf("this.MinorNumber == nil && that.MinorNumber != nil") + } else if that1.MinorNumber != nil { + return fmt.Errorf("MinorNumber this(%v) Not Equal that(%v)", this.MinorNumber, that1.MinorNumber) + } + return nil +} +func (this *Device_Number) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*Device_Number) + if !ok { + that2, ok := that.(Device_Number) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.MajorNumber != nil && that1.MajorNumber != nil { + if *this.MajorNumber != *that1.MajorNumber { + return false + } + } else if this.MajorNumber != nil { + return false + } else if that1.MajorNumber != nil { + return false + } + if this.MinorNumber != nil && that1.MinorNumber != nil { + if *this.MinorNumber != *that1.MinorNumber { + return false + } + } else if this.MinorNumber != nil { + return false + } else if that1.MinorNumber != nil { + return false + } + return true +} +func (this *DeviceAccess) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeviceAccess) + if !ok { + that2, ok := that.(DeviceAccess) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeviceAccess") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeviceAccess but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeviceAccess but is not nil && this == nil") + } + if !this.Device.Equal(&that1.Device) { + return fmt.Errorf("Device this(%v) Not Equal that(%v)", this.Device, that1.Device) + } + if !this.Access.Equal(&that1.Access) { + return fmt.Errorf("Access this(%v) Not Equal that(%v)", this.Access, that1.Access) + } + return nil +} +func (this *DeviceAccess) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DeviceAccess) + if !ok { + that2, ok := that.(DeviceAccess) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if !this.Device.Equal(&that1.Device) { + return false + } + if !this.Access.Equal(&that1.Access) { + return false + } + return true +} +func (this *DeviceAccess_Access) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeviceAccess_Access) + if !ok { + that2, ok := that.(DeviceAccess_Access) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeviceAccess_Access") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeviceAccess_Access but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeviceAccess_Access but is not nil && this == nil") + } + if this.Read != nil && that1.Read != nil { + if *this.Read != *that1.Read { + return fmt.Errorf("Read this(%v) Not Equal that(%v)", *this.Read, *that1.Read) + } + } else if this.Read != nil { + return fmt.Errorf("this.Read == nil && that.Read != nil") + } else if that1.Read != nil { + return fmt.Errorf("Read this(%v) Not Equal that(%v)", this.Read, that1.Read) + } + if this.Write != nil && that1.Write != nil { + if *this.Write != *that1.Write { + return fmt.Errorf("Write this(%v) Not Equal that(%v)", *this.Write, *that1.Write) + } + } else if this.Write != nil { + return fmt.Errorf("this.Write == nil && that.Write != nil") + } else if that1.Write != nil { + return fmt.Errorf("Write this(%v) Not Equal that(%v)", this.Write, that1.Write) + } + if this.Mknod != nil && that1.Mknod != nil { + if *this.Mknod != *that1.Mknod { + return fmt.Errorf("Mknod this(%v) Not Equal that(%v)", *this.Mknod, *that1.Mknod) + } + } else if this.Mknod != nil { + return fmt.Errorf("this.Mknod == nil && that.Mknod != nil") + } else if that1.Mknod != nil { + return fmt.Errorf("Mknod this(%v) Not Equal that(%v)", this.Mknod, that1.Mknod) + } + return nil +} +func (this *DeviceAccess_Access) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DeviceAccess_Access) + if !ok { + that2, ok := that.(DeviceAccess_Access) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if this.Read != nil && that1.Read != nil { + if *this.Read != *that1.Read { + return false + } + } else if this.Read != nil { + return false + } else if that1.Read != nil { + return false + } + if this.Write != nil && that1.Write != nil { + if *this.Write != *that1.Write { + return false + } + } else if this.Write != nil { + return false + } else if that1.Write != nil { + return false + } + if this.Mknod != nil && that1.Mknod != nil { + if *this.Mknod != *that1.Mknod { + return false + } + } else if this.Mknod != nil { + return false + } else if that1.Mknod != nil { + return false + } + return true +} +func (this *DeviceWhitelist) VerboseEqual(that interface{}) error { + if that == nil { + if this == nil { + return nil + } + return fmt.Errorf("that == nil && this != nil") + } + + that1, ok := that.(*DeviceWhitelist) + if !ok { + that2, ok := that.(DeviceWhitelist) + if ok { + that1 = &that2 + } else { + return fmt.Errorf("that is not of type *DeviceWhitelist") + } + } + if that1 == nil { + if this == nil { + return nil + } + return fmt.Errorf("that is type *DeviceWhitelist but is nil && this != nil") + } else if this == nil { + return fmt.Errorf("that is type *DeviceWhitelist but is not nil && this == nil") + } + if len(this.AllowedDevices) != len(that1.AllowedDevices) { + return fmt.Errorf("AllowedDevices this(%v) Not Equal that(%v)", len(this.AllowedDevices), len(that1.AllowedDevices)) + } + for i := range this.AllowedDevices { + if !this.AllowedDevices[i].Equal(&that1.AllowedDevices[i]) { + return fmt.Errorf("AllowedDevices this[%v](%v) Not Equal that[%v](%v)", i, this.AllowedDevices[i], i, that1.AllowedDevices[i]) + } + } + return nil +} +func (this *DeviceWhitelist) Equal(that interface{}) bool { + if that == nil { + if this == nil { + return true + } + return false + } + + that1, ok := that.(*DeviceWhitelist) + if !ok { + that2, ok := that.(DeviceWhitelist) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + if this == nil { + return true + } + return false + } else if this == nil { + return false + } + if len(this.AllowedDevices) != len(that1.AllowedDevices) { + return false + } + for i := range this.AllowedDevices { + if !this.AllowedDevices[i].Equal(&that1.AllowedDevices[i]) { + return false + } + } + return true +} +func (this *FrameworkID) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.FrameworkID{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OfferID) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.OfferID{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AgentID) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.AgentID{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *TaskID) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.TaskID{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ExecutorID) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.ExecutorID{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainerID) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.ContainerID{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.Parent != nil { + s = append(s, "Parent: "+fmt.Sprintf("%#v", this.Parent)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ResourceProviderID) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.ResourceProviderID{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OperationID) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.OperationID{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *TimeInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.TimeInfo{") + s = append(s, "Nanoseconds: "+fmt.Sprintf("%#v", this.Nanoseconds)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DurationInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.DurationInfo{") + s = append(s, "Nanoseconds: "+fmt.Sprintf("%#v", this.Nanoseconds)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Address) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mesos.Address{") + if this.Hostname != nil { + s = append(s, "Hostname: "+valueToGoStringMesos(this.Hostname, "string")+",\n") + } + if this.IP != nil { + s = append(s, "IP: "+valueToGoStringMesos(this.IP, "string")+",\n") + } + s = append(s, "Port: "+fmt.Sprintf("%#v", this.Port)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *URL) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&mesos.URL{") + s = append(s, "Scheme: "+fmt.Sprintf("%#v", this.Scheme)+",\n") + s = append(s, "Address: "+strings.Replace(this.Address.GoString(), `&`, ``, 1)+",\n") + if this.Path != nil { + s = append(s, "Path: "+valueToGoStringMesos(this.Path, "string")+",\n") + } + if this.Query != nil { + s = append(s, "Query: "+fmt.Sprintf("%#v", this.Query)+",\n") + } + if this.Fragment != nil { + s = append(s, "Fragment: "+valueToGoStringMesos(this.Fragment, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Unavailability) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.Unavailability{") + s = append(s, "Start: "+strings.Replace(this.Start.GoString(), `&`, ``, 1)+",\n") + if this.Duration != nil { + s = append(s, "Duration: "+fmt.Sprintf("%#v", this.Duration)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MachineID) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.MachineID{") + if this.Hostname != nil { + s = append(s, "Hostname: "+valueToGoStringMesos(this.Hostname, "string")+",\n") + } + if this.IP != nil { + s = append(s, "IP: "+valueToGoStringMesos(this.IP, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MachineInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mesos.MachineInfo{") + s = append(s, "ID: "+strings.Replace(this.ID.GoString(), `&`, ``, 1)+",\n") + if this.Mode != nil { + s = append(s, "Mode: "+valueToGoStringMesos(this.Mode, "MachineInfo_Mode")+",\n") + } + if this.Unavailability != nil { + s = append(s, "Unavailability: "+fmt.Sprintf("%#v", this.Unavailability)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FrameworkInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 16) + s = append(s, "&mesos.FrameworkInfo{") + s = append(s, "User: "+fmt.Sprintf("%#v", this.User)+",\n") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + if this.ID != nil { + s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n") + } + if this.FailoverTimeout != nil { + s = append(s, "FailoverTimeout: "+valueToGoStringMesos(this.FailoverTimeout, "float64")+",\n") + } + if this.Checkpoint != nil { + s = append(s, "Checkpoint: "+valueToGoStringMesos(this.Checkpoint, "bool")+",\n") + } + if this.Role != nil { + s = append(s, "Role: "+valueToGoStringMesos(this.Role, "string")+",\n") + } + if this.Roles != nil { + s = append(s, "Roles: "+fmt.Sprintf("%#v", this.Roles)+",\n") + } + if this.Hostname != nil { + s = append(s, "Hostname: "+valueToGoStringMesos(this.Hostname, "string")+",\n") + } + if this.Principal != nil { + s = append(s, "Principal: "+valueToGoStringMesos(this.Principal, "string")+",\n") + } + if this.WebUiURL != nil { + s = append(s, "WebUiURL: "+valueToGoStringMesos(this.WebUiURL, "string")+",\n") + } + if this.Capabilities != nil { + s = append(s, "Capabilities: "+fmt.Sprintf("%#v", this.Capabilities)+",\n") + } + if this.Labels != nil { + s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FrameworkInfo_Capability) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.FrameworkInfo_Capability{") + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CheckInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 11) + s = append(s, "&mesos.CheckInfo{") + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + if this.Command != nil { + s = append(s, "Command: "+fmt.Sprintf("%#v", this.Command)+",\n") + } + if this.HTTP != nil { + s = append(s, "HTTP: "+fmt.Sprintf("%#v", this.HTTP)+",\n") + } + if this.TCP != nil { + s = append(s, "TCP: "+fmt.Sprintf("%#v", this.TCP)+",\n") + } + if this.DelaySeconds != nil { + s = append(s, "DelaySeconds: "+valueToGoStringMesos(this.DelaySeconds, "float64")+",\n") + } + if this.IntervalSeconds != nil { + s = append(s, "IntervalSeconds: "+valueToGoStringMesos(this.IntervalSeconds, "float64")+",\n") + } + if this.TimeoutSeconds != nil { + s = append(s, "TimeoutSeconds: "+valueToGoStringMesos(this.TimeoutSeconds, "float64")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CheckInfo_Command) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.CheckInfo_Command{") + s = append(s, "Command: "+strings.Replace(this.Command.GoString(), `&`, ``, 1)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CheckInfo_Http) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.CheckInfo_Http{") + s = append(s, "Port: "+fmt.Sprintf("%#v", this.Port)+",\n") + if this.Path != nil { + s = append(s, "Path: "+valueToGoStringMesos(this.Path, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CheckInfo_Tcp) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.CheckInfo_Tcp{") + s = append(s, "Port: "+fmt.Sprintf("%#v", this.Port)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *HealthCheck) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&mesos.HealthCheck{") + if this.DelaySeconds != nil { + s = append(s, "DelaySeconds: "+valueToGoStringMesos(this.DelaySeconds, "float64")+",\n") + } + if this.IntervalSeconds != nil { + s = append(s, "IntervalSeconds: "+valueToGoStringMesos(this.IntervalSeconds, "float64")+",\n") + } + if this.TimeoutSeconds != nil { + s = append(s, "TimeoutSeconds: "+valueToGoStringMesos(this.TimeoutSeconds, "float64")+",\n") + } + if this.ConsecutiveFailures != nil { + s = append(s, "ConsecutiveFailures: "+valueToGoStringMesos(this.ConsecutiveFailures, "uint32")+",\n") + } + if this.GracePeriodSeconds != nil { + s = append(s, "GracePeriodSeconds: "+valueToGoStringMesos(this.GracePeriodSeconds, "float64")+",\n") + } + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + if this.Command != nil { + s = append(s, "Command: "+fmt.Sprintf("%#v", this.Command)+",\n") + } + if this.HTTP != nil { + s = append(s, "HTTP: "+fmt.Sprintf("%#v", this.HTTP)+",\n") + } + if this.TCP != nil { + s = append(s, "TCP: "+fmt.Sprintf("%#v", this.TCP)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *HealthCheck_HTTPCheckInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&mesos.HealthCheck_HTTPCheckInfo{") + if this.Protocol != nil { + s = append(s, "Protocol: "+valueToGoStringMesos(this.Protocol, "NetworkInfo_Protocol")+",\n") + } + if this.Scheme != nil { + s = append(s, "Scheme: "+valueToGoStringMesos(this.Scheme, "string")+",\n") + } + s = append(s, "Port: "+fmt.Sprintf("%#v", this.Port)+",\n") + if this.Path != nil { + s = append(s, "Path: "+valueToGoStringMesos(this.Path, "string")+",\n") + } + if this.Statuses != nil { + s = append(s, "Statuses: "+fmt.Sprintf("%#v", this.Statuses)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *HealthCheck_TCPCheckInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.HealthCheck_TCPCheckInfo{") + if this.Protocol != nil { + s = append(s, "Protocol: "+valueToGoStringMesos(this.Protocol, "NetworkInfo_Protocol")+",\n") + } + s = append(s, "Port: "+fmt.Sprintf("%#v", this.Port)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *KillPolicy) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.KillPolicy{") + if this.GracePeriod != nil { + s = append(s, "GracePeriod: "+fmt.Sprintf("%#v", this.GracePeriod)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CommandInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&mesos.CommandInfo{") + if this.URIs != nil { + s = append(s, "URIs: "+fmt.Sprintf("%#v", this.URIs)+",\n") + } + if this.Environment != nil { + s = append(s, "Environment: "+fmt.Sprintf("%#v", this.Environment)+",\n") + } + if this.Shell != nil { + s = append(s, "Shell: "+valueToGoStringMesos(this.Shell, "bool")+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringMesos(this.Value, "string")+",\n") + } + if this.Arguments != nil { + s = append(s, "Arguments: "+fmt.Sprintf("%#v", this.Arguments)+",\n") + } + if this.User != nil { + s = append(s, "User: "+valueToGoStringMesos(this.User, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CommandInfo_URI) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&mesos.CommandInfo_URI{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + if this.Executable != nil { + s = append(s, "Executable: "+valueToGoStringMesos(this.Executable, "bool")+",\n") + } + if this.Extract != nil { + s = append(s, "Extract: "+valueToGoStringMesos(this.Extract, "bool")+",\n") + } + if this.Cache != nil { + s = append(s, "Cache: "+valueToGoStringMesos(this.Cache, "bool")+",\n") + } + if this.OutputFile != nil { + s = append(s, "OutputFile: "+valueToGoStringMesos(this.OutputFile, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ExecutorInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 16) + s = append(s, "&mesos.ExecutorInfo{") + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + s = append(s, "ExecutorID: "+strings.Replace(this.ExecutorID.GoString(), `&`, ``, 1)+",\n") + if this.FrameworkID != nil { + s = append(s, "FrameworkID: "+fmt.Sprintf("%#v", this.FrameworkID)+",\n") + } + if this.Command != nil { + s = append(s, "Command: "+fmt.Sprintf("%#v", this.Command)+",\n") + } + if this.Container != nil { + s = append(s, "Container: "+fmt.Sprintf("%#v", this.Container)+",\n") + } + if this.Resources != nil { + s = append(s, "Resources: "+fmt.Sprintf("%#v", this.Resources)+",\n") + } + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringMesos(this.Name, "string")+",\n") + } + if this.Source != nil { + s = append(s, "Source: "+valueToGoStringMesos(this.Source, "string")+",\n") + } + if this.Data != nil { + s = append(s, "Data: "+valueToGoStringMesos(this.Data, "byte")+",\n") + } + if this.Discovery != nil { + s = append(s, "Discovery: "+fmt.Sprintf("%#v", this.Discovery)+",\n") + } + if this.ShutdownGracePeriod != nil { + s = append(s, "ShutdownGracePeriod: "+fmt.Sprintf("%#v", this.ShutdownGracePeriod)+",\n") + } + if this.Labels != nil { + s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DomainInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.DomainInfo{") + if this.FaultDomain != nil { + s = append(s, "FaultDomain: "+fmt.Sprintf("%#v", this.FaultDomain)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DomainInfo_FaultDomain) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.DomainInfo_FaultDomain{") + s = append(s, "Region: "+strings.Replace(this.Region.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Zone: "+strings.Replace(this.Zone.GoString(), `&`, ``, 1)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DomainInfo_FaultDomain_RegionInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.DomainInfo_FaultDomain_RegionInfo{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DomainInfo_FaultDomain_ZoneInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.DomainInfo_FaultDomain_ZoneInfo{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MasterInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&mesos.MasterInfo{") + s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n") + s = append(s, "IP: "+fmt.Sprintf("%#v", this.IP)+",\n") + if this.Port != nil { + s = append(s, "Port: "+valueToGoStringMesos(this.Port, "uint32")+",\n") + } + if this.PID != nil { + s = append(s, "PID: "+valueToGoStringMesos(this.PID, "string")+",\n") + } + if this.Hostname != nil { + s = append(s, "Hostname: "+valueToGoStringMesos(this.Hostname, "string")+",\n") + } + if this.Version != nil { + s = append(s, "Version: "+valueToGoStringMesos(this.Version, "string")+",\n") + } + if this.Address != nil { + s = append(s, "Address: "+fmt.Sprintf("%#v", this.Address)+",\n") + } + if this.Domain != nil { + s = append(s, "Domain: "+fmt.Sprintf("%#v", this.Domain)+",\n") + } + if this.Capabilities != nil { + s = append(s, "Capabilities: "+fmt.Sprintf("%#v", this.Capabilities)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MasterInfo_Capability) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.MasterInfo_Capability{") + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AgentInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&mesos.AgentInfo{") + s = append(s, "Hostname: "+fmt.Sprintf("%#v", this.Hostname)+",\n") + if this.Port != nil { + s = append(s, "Port: "+valueToGoStringMesos(this.Port, "int32")+",\n") + } + if this.Resources != nil { + s = append(s, "Resources: "+fmt.Sprintf("%#v", this.Resources)+",\n") + } + if this.Attributes != nil { + s = append(s, "Attributes: "+fmt.Sprintf("%#v", this.Attributes)+",\n") + } + if this.ID != nil { + s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n") + } + if this.Domain != nil { + s = append(s, "Domain: "+fmt.Sprintf("%#v", this.Domain)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *AgentInfo_Capability) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.AgentInfo_Capability{") + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CSIPluginContainerInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&mesos.CSIPluginContainerInfo{") + if this.Services != nil { + s = append(s, "Services: "+fmt.Sprintf("%#v", this.Services)+",\n") + } + if this.Command != nil { + s = append(s, "Command: "+fmt.Sprintf("%#v", this.Command)+",\n") + } + if this.Resources != nil { + s = append(s, "Resources: "+fmt.Sprintf("%#v", this.Resources)+",\n") + } + if this.Container != nil { + s = append(s, "Container: "+fmt.Sprintf("%#v", this.Container)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CSIPluginInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mesos.CSIPluginInfo{") + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + if this.Containers != nil { + s = append(s, "Containers: "+fmt.Sprintf("%#v", this.Containers)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ResourceProviderInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&mesos.ResourceProviderInfo{") + if this.ID != nil { + s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n") + } + if this.Attributes != nil { + s = append(s, "Attributes: "+fmt.Sprintf("%#v", this.Attributes)+",\n") + } + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + if this.DefaultReservations != nil { + s = append(s, "DefaultReservations: "+fmt.Sprintf("%#v", this.DefaultReservations)+",\n") + } + if this.Storage != nil { + s = append(s, "Storage: "+fmt.Sprintf("%#v", this.Storage)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ResourceProviderInfo_Storage) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.ResourceProviderInfo_Storage{") + s = append(s, "Plugin: "+strings.Replace(this.Plugin.GoString(), `&`, ``, 1)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Value) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&mesos.Value{") + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + if this.Scalar != nil { + s = append(s, "Scalar: "+fmt.Sprintf("%#v", this.Scalar)+",\n") + } + if this.Ranges != nil { + s = append(s, "Ranges: "+fmt.Sprintf("%#v", this.Ranges)+",\n") + } + if this.Set != nil { + s = append(s, "Set: "+fmt.Sprintf("%#v", this.Set)+",\n") + } + if this.Text != nil { + s = append(s, "Text: "+fmt.Sprintf("%#v", this.Text)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Value_Scalar) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.Value_Scalar{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Value_Range) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.Value_Range{") + s = append(s, "Begin: "+fmt.Sprintf("%#v", this.Begin)+",\n") + s = append(s, "End: "+fmt.Sprintf("%#v", this.End)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Value_Ranges) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.Value_Ranges{") + if this.Range != nil { + s = append(s, "Range: "+fmt.Sprintf("%#v", this.Range)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Value_Set) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.Value_Set{") + if this.Item != nil { + s = append(s, "Item: "+fmt.Sprintf("%#v", this.Item)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Value_Text) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.Value_Text{") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Attribute) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&mesos.Attribute{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + if this.Scalar != nil { + s = append(s, "Scalar: "+fmt.Sprintf("%#v", this.Scalar)+",\n") + } + if this.Ranges != nil { + s = append(s, "Ranges: "+fmt.Sprintf("%#v", this.Ranges)+",\n") + } + if this.Set != nil { + s = append(s, "Set: "+fmt.Sprintf("%#v", this.Set)+",\n") + } + if this.Text != nil { + s = append(s, "Text: "+fmt.Sprintf("%#v", this.Text)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Resource) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&mesos.Resource{") + if this.ProviderID != nil { + s = append(s, "ProviderID: "+fmt.Sprintf("%#v", this.ProviderID)+",\n") + } + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + if this.Type != nil { + s = append(s, "Type: "+valueToGoStringMesos(this.Type, "Value_Type")+",\n") + } + if this.Scalar != nil { + s = append(s, "Scalar: "+fmt.Sprintf("%#v", this.Scalar)+",\n") + } + if this.Ranges != nil { + s = append(s, "Ranges: "+fmt.Sprintf("%#v", this.Ranges)+",\n") + } + if this.Set != nil { + s = append(s, "Set: "+fmt.Sprintf("%#v", this.Set)+",\n") + } + if this.Role != nil { + s = append(s, "Role: "+valueToGoStringMesos(this.Role, "string")+",\n") + } + if this.AllocationInfo != nil { + s = append(s, "AllocationInfo: "+fmt.Sprintf("%#v", this.AllocationInfo)+",\n") + } + if this.Reservation != nil { + s = append(s, "Reservation: "+fmt.Sprintf("%#v", this.Reservation)+",\n") + } + if this.Reservations != nil { + s = append(s, "Reservations: "+fmt.Sprintf("%#v", this.Reservations)+",\n") + } + if this.Disk != nil { + s = append(s, "Disk: "+fmt.Sprintf("%#v", this.Disk)+",\n") + } + if this.Revocable != nil { + s = append(s, "Revocable: "+fmt.Sprintf("%#v", this.Revocable)+",\n") + } + if this.Shared != nil { + s = append(s, "Shared: "+fmt.Sprintf("%#v", this.Shared)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Resource_AllocationInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.Resource_AllocationInfo{") + if this.Role != nil { + s = append(s, "Role: "+valueToGoStringMesos(this.Role, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Resource_ReservationInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&mesos.Resource_ReservationInfo{") + if this.Type != nil { + s = append(s, "Type: "+valueToGoStringMesos(this.Type, "Resource_ReservationInfo_Type")+",\n") + } + if this.Role != nil { + s = append(s, "Role: "+valueToGoStringMesos(this.Role, "string")+",\n") + } + if this.Principal != nil { + s = append(s, "Principal: "+valueToGoStringMesos(this.Principal, "string")+",\n") + } + if this.Labels != nil { + s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Resource_DiskInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mesos.Resource_DiskInfo{") + if this.Persistence != nil { + s = append(s, "Persistence: "+fmt.Sprintf("%#v", this.Persistence)+",\n") + } + if this.Volume != nil { + s = append(s, "Volume: "+fmt.Sprintf("%#v", this.Volume)+",\n") + } + if this.Source != nil { + s = append(s, "Source: "+fmt.Sprintf("%#v", this.Source)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Resource_DiskInfo_Persistence) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.Resource_DiskInfo_Persistence{") + s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n") + if this.Principal != nil { + s = append(s, "Principal: "+valueToGoStringMesos(this.Principal, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Resource_DiskInfo_Source) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&mesos.Resource_DiskInfo_Source{") + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + if this.Path != nil { + s = append(s, "Path: "+fmt.Sprintf("%#v", this.Path)+",\n") + } + if this.Mount != nil { + s = append(s, "Mount: "+fmt.Sprintf("%#v", this.Mount)+",\n") + } + if this.ID != nil { + s = append(s, "ID: "+valueToGoStringMesos(this.ID, "string")+",\n") + } + if this.Metadata != nil { + s = append(s, "Metadata: "+fmt.Sprintf("%#v", this.Metadata)+",\n") + } + if this.Profile != nil { + s = append(s, "Profile: "+valueToGoStringMesos(this.Profile, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Resource_DiskInfo_Source_Path) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.Resource_DiskInfo_Source_Path{") + if this.Root != nil { + s = append(s, "Root: "+valueToGoStringMesos(this.Root, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Resource_DiskInfo_Source_Mount) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.Resource_DiskInfo_Source_Mount{") + if this.Root != nil { + s = append(s, "Root: "+valueToGoStringMesos(this.Root, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Resource_RevocableInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&mesos.Resource_RevocableInfo{") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Resource_SharedInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&mesos.Resource_SharedInfo{") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *TrafficControlStatistics) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 14) + s = append(s, "&mesos.TrafficControlStatistics{") + s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n") + if this.Backlog != nil { + s = append(s, "Backlog: "+valueToGoStringMesos(this.Backlog, "uint64")+",\n") + } + if this.Bytes != nil { + s = append(s, "Bytes: "+valueToGoStringMesos(this.Bytes, "uint64")+",\n") + } + if this.Drops != nil { + s = append(s, "Drops: "+valueToGoStringMesos(this.Drops, "uint64")+",\n") + } + if this.Overlimits != nil { + s = append(s, "Overlimits: "+valueToGoStringMesos(this.Overlimits, "uint64")+",\n") + } + if this.Packets != nil { + s = append(s, "Packets: "+valueToGoStringMesos(this.Packets, "uint64")+",\n") + } + if this.Qlen != nil { + s = append(s, "Qlen: "+valueToGoStringMesos(this.Qlen, "uint64")+",\n") + } + if this.RateBPS != nil { + s = append(s, "RateBPS: "+valueToGoStringMesos(this.RateBPS, "uint64")+",\n") + } + if this.RatePPS != nil { + s = append(s, "RatePPS: "+valueToGoStringMesos(this.RatePPS, "uint64")+",\n") + } + if this.Requeues != nil { + s = append(s, "Requeues: "+valueToGoStringMesos(this.Requeues, "uint64")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *IpStatistics) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 23) + s = append(s, "&mesos.IpStatistics{") + if this.Forwarding != nil { + s = append(s, "Forwarding: "+valueToGoStringMesos(this.Forwarding, "int64")+",\n") + } + if this.DefaultTTL != nil { + s = append(s, "DefaultTTL: "+valueToGoStringMesos(this.DefaultTTL, "int64")+",\n") + } + if this.InReceives != nil { + s = append(s, "InReceives: "+valueToGoStringMesos(this.InReceives, "int64")+",\n") + } + if this.InHdrErrors != nil { + s = append(s, "InHdrErrors: "+valueToGoStringMesos(this.InHdrErrors, "int64")+",\n") + } + if this.InAddrErrors != nil { + s = append(s, "InAddrErrors: "+valueToGoStringMesos(this.InAddrErrors, "int64")+",\n") + } + if this.ForwDatagrams != nil { + s = append(s, "ForwDatagrams: "+valueToGoStringMesos(this.ForwDatagrams, "int64")+",\n") + } + if this.InUnknownProtos != nil { + s = append(s, "InUnknownProtos: "+valueToGoStringMesos(this.InUnknownProtos, "int64")+",\n") + } + if this.InDiscards != nil { + s = append(s, "InDiscards: "+valueToGoStringMesos(this.InDiscards, "int64")+",\n") + } + if this.InDelivers != nil { + s = append(s, "InDelivers: "+valueToGoStringMesos(this.InDelivers, "int64")+",\n") + } + if this.OutRequests != nil { + s = append(s, "OutRequests: "+valueToGoStringMesos(this.OutRequests, "int64")+",\n") + } + if this.OutDiscards != nil { + s = append(s, "OutDiscards: "+valueToGoStringMesos(this.OutDiscards, "int64")+",\n") + } + if this.OutNoRoutes != nil { + s = append(s, "OutNoRoutes: "+valueToGoStringMesos(this.OutNoRoutes, "int64")+",\n") + } + if this.ReasmTimeout != nil { + s = append(s, "ReasmTimeout: "+valueToGoStringMesos(this.ReasmTimeout, "int64")+",\n") + } + if this.ReasmReqds != nil { + s = append(s, "ReasmReqds: "+valueToGoStringMesos(this.ReasmReqds, "int64")+",\n") + } + if this.ReasmOKs != nil { + s = append(s, "ReasmOKs: "+valueToGoStringMesos(this.ReasmOKs, "int64")+",\n") + } + if this.ReasmFails != nil { + s = append(s, "ReasmFails: "+valueToGoStringMesos(this.ReasmFails, "int64")+",\n") + } + if this.FragOKs != nil { + s = append(s, "FragOKs: "+valueToGoStringMesos(this.FragOKs, "int64")+",\n") + } + if this.FragFails != nil { + s = append(s, "FragFails: "+valueToGoStringMesos(this.FragFails, "int64")+",\n") + } + if this.FragCreates != nil { + s = append(s, "FragCreates: "+valueToGoStringMesos(this.FragCreates, "int64")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *IcmpStatistics) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 31) + s = append(s, "&mesos.IcmpStatistics{") + if this.InMsgs != nil { + s = append(s, "InMsgs: "+valueToGoStringMesos(this.InMsgs, "int64")+",\n") + } + if this.InErrors != nil { + s = append(s, "InErrors: "+valueToGoStringMesos(this.InErrors, "int64")+",\n") + } + if this.InCsumErrors != nil { + s = append(s, "InCsumErrors: "+valueToGoStringMesos(this.InCsumErrors, "int64")+",\n") + } + if this.InDestUnreachs != nil { + s = append(s, "InDestUnreachs: "+valueToGoStringMesos(this.InDestUnreachs, "int64")+",\n") + } + if this.InTimeExcds != nil { + s = append(s, "InTimeExcds: "+valueToGoStringMesos(this.InTimeExcds, "int64")+",\n") + } + if this.InParmProbs != nil { + s = append(s, "InParmProbs: "+valueToGoStringMesos(this.InParmProbs, "int64")+",\n") + } + if this.InSrcQuenchs != nil { + s = append(s, "InSrcQuenchs: "+valueToGoStringMesos(this.InSrcQuenchs, "int64")+",\n") + } + if this.InRedirects != nil { + s = append(s, "InRedirects: "+valueToGoStringMesos(this.InRedirects, "int64")+",\n") + } + if this.InEchos != nil { + s = append(s, "InEchos: "+valueToGoStringMesos(this.InEchos, "int64")+",\n") + } + if this.InEchoReps != nil { + s = append(s, "InEchoReps: "+valueToGoStringMesos(this.InEchoReps, "int64")+",\n") + } + if this.InTimestamps != nil { + s = append(s, "InTimestamps: "+valueToGoStringMesos(this.InTimestamps, "int64")+",\n") + } + if this.InTimestampReps != nil { + s = append(s, "InTimestampReps: "+valueToGoStringMesos(this.InTimestampReps, "int64")+",\n") + } + if this.InAddrMasks != nil { + s = append(s, "InAddrMasks: "+valueToGoStringMesos(this.InAddrMasks, "int64")+",\n") + } + if this.InAddrMaskReps != nil { + s = append(s, "InAddrMaskReps: "+valueToGoStringMesos(this.InAddrMaskReps, "int64")+",\n") + } + if this.OutMsgs != nil { + s = append(s, "OutMsgs: "+valueToGoStringMesos(this.OutMsgs, "int64")+",\n") + } + if this.OutErrors != nil { + s = append(s, "OutErrors: "+valueToGoStringMesos(this.OutErrors, "int64")+",\n") + } + if this.OutDestUnreachs != nil { + s = append(s, "OutDestUnreachs: "+valueToGoStringMesos(this.OutDestUnreachs, "int64")+",\n") + } + if this.OutTimeExcds != nil { + s = append(s, "OutTimeExcds: "+valueToGoStringMesos(this.OutTimeExcds, "int64")+",\n") + } + if this.OutParmProbs != nil { + s = append(s, "OutParmProbs: "+valueToGoStringMesos(this.OutParmProbs, "int64")+",\n") + } + if this.OutSrcQuenchs != nil { + s = append(s, "OutSrcQuenchs: "+valueToGoStringMesos(this.OutSrcQuenchs, "int64")+",\n") + } + if this.OutRedirects != nil { + s = append(s, "OutRedirects: "+valueToGoStringMesos(this.OutRedirects, "int64")+",\n") + } + if this.OutEchos != nil { + s = append(s, "OutEchos: "+valueToGoStringMesos(this.OutEchos, "int64")+",\n") + } + if this.OutEchoReps != nil { + s = append(s, "OutEchoReps: "+valueToGoStringMesos(this.OutEchoReps, "int64")+",\n") + } + if this.OutTimestamps != nil { + s = append(s, "OutTimestamps: "+valueToGoStringMesos(this.OutTimestamps, "int64")+",\n") + } + if this.OutTimestampReps != nil { + s = append(s, "OutTimestampReps: "+valueToGoStringMesos(this.OutTimestampReps, "int64")+",\n") + } + if this.OutAddrMasks != nil { + s = append(s, "OutAddrMasks: "+valueToGoStringMesos(this.OutAddrMasks, "int64")+",\n") + } + if this.OutAddrMaskReps != nil { + s = append(s, "OutAddrMaskReps: "+valueToGoStringMesos(this.OutAddrMaskReps, "int64")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *TcpStatistics) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 19) + s = append(s, "&mesos.TcpStatistics{") + if this.RtoAlgorithm != nil { + s = append(s, "RtoAlgorithm: "+valueToGoStringMesos(this.RtoAlgorithm, "int64")+",\n") + } + if this.RtoMin != nil { + s = append(s, "RtoMin: "+valueToGoStringMesos(this.RtoMin, "int64")+",\n") + } + if this.RtoMax != nil { + s = append(s, "RtoMax: "+valueToGoStringMesos(this.RtoMax, "int64")+",\n") + } + if this.MaxConn != nil { + s = append(s, "MaxConn: "+valueToGoStringMesos(this.MaxConn, "int64")+",\n") + } + if this.ActiveOpens != nil { + s = append(s, "ActiveOpens: "+valueToGoStringMesos(this.ActiveOpens, "int64")+",\n") + } + if this.PassiveOpens != nil { + s = append(s, "PassiveOpens: "+valueToGoStringMesos(this.PassiveOpens, "int64")+",\n") + } + if this.AttemptFails != nil { + s = append(s, "AttemptFails: "+valueToGoStringMesos(this.AttemptFails, "int64")+",\n") + } + if this.EstabResets != nil { + s = append(s, "EstabResets: "+valueToGoStringMesos(this.EstabResets, "int64")+",\n") + } + if this.CurrEstab != nil { + s = append(s, "CurrEstab: "+valueToGoStringMesos(this.CurrEstab, "int64")+",\n") + } + if this.InSegs != nil { + s = append(s, "InSegs: "+valueToGoStringMesos(this.InSegs, "int64")+",\n") + } + if this.OutSegs != nil { + s = append(s, "OutSegs: "+valueToGoStringMesos(this.OutSegs, "int64")+",\n") + } + if this.RetransSegs != nil { + s = append(s, "RetransSegs: "+valueToGoStringMesos(this.RetransSegs, "int64")+",\n") + } + if this.InErrs != nil { + s = append(s, "InErrs: "+valueToGoStringMesos(this.InErrs, "int64")+",\n") + } + if this.OutRsts != nil { + s = append(s, "OutRsts: "+valueToGoStringMesos(this.OutRsts, "int64")+",\n") + } + if this.InCsumErrors != nil { + s = append(s, "InCsumErrors: "+valueToGoStringMesos(this.InCsumErrors, "int64")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UdpStatistics) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 12) + s = append(s, "&mesos.UdpStatistics{") + if this.InDatagrams != nil { + s = append(s, "InDatagrams: "+valueToGoStringMesos(this.InDatagrams, "int64")+",\n") + } + if this.NoPorts != nil { + s = append(s, "NoPorts: "+valueToGoStringMesos(this.NoPorts, "int64")+",\n") + } + if this.InErrors != nil { + s = append(s, "InErrors: "+valueToGoStringMesos(this.InErrors, "int64")+",\n") + } + if this.OutDatagrams != nil { + s = append(s, "OutDatagrams: "+valueToGoStringMesos(this.OutDatagrams, "int64")+",\n") + } + if this.RcvbufErrors != nil { + s = append(s, "RcvbufErrors: "+valueToGoStringMesos(this.RcvbufErrors, "int64")+",\n") + } + if this.SndbufErrors != nil { + s = append(s, "SndbufErrors: "+valueToGoStringMesos(this.SndbufErrors, "int64")+",\n") + } + if this.InCsumErrors != nil { + s = append(s, "InCsumErrors: "+valueToGoStringMesos(this.InCsumErrors, "int64")+",\n") + } + if this.IgnoredMulti != nil { + s = append(s, "IgnoredMulti: "+valueToGoStringMesos(this.IgnoredMulti, "int64")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *SNMPStatistics) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&mesos.SNMPStatistics{") + if this.IPStats != nil { + s = append(s, "IPStats: "+fmt.Sprintf("%#v", this.IPStats)+",\n") + } + if this.ICMPStats != nil { + s = append(s, "ICMPStats: "+fmt.Sprintf("%#v", this.ICMPStats)+",\n") + } + if this.TCPStats != nil { + s = append(s, "TCPStats: "+fmt.Sprintf("%#v", this.TCPStats)+",\n") + } + if this.UDPStats != nil { + s = append(s, "UDPStats: "+fmt.Sprintf("%#v", this.UDPStats)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DiskStatistics) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&mesos.DiskStatistics{") + if this.Source != nil { + s = append(s, "Source: "+fmt.Sprintf("%#v", this.Source)+",\n") + } + if this.Persistence != nil { + s = append(s, "Persistence: "+fmt.Sprintf("%#v", this.Persistence)+",\n") + } + if this.LimitBytes != nil { + s = append(s, "LimitBytes: "+valueToGoStringMesos(this.LimitBytes, "uint64")+",\n") + } + if this.UsedBytes != nil { + s = append(s, "UsedBytes: "+valueToGoStringMesos(this.UsedBytes, "uint64")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ResourceStatistics) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 48) + s = append(s, "&mesos.ResourceStatistics{") + s = append(s, "Timestamp: "+fmt.Sprintf("%#v", this.Timestamp)+",\n") + if this.Processes != nil { + s = append(s, "Processes: "+valueToGoStringMesos(this.Processes, "uint32")+",\n") + } + if this.Threads != nil { + s = append(s, "Threads: "+valueToGoStringMesos(this.Threads, "uint32")+",\n") + } + if this.CPUsUserTimeSecs != nil { + s = append(s, "CPUsUserTimeSecs: "+valueToGoStringMesos(this.CPUsUserTimeSecs, "float64")+",\n") + } + if this.CPUsSystemTimeSecs != nil { + s = append(s, "CPUsSystemTimeSecs: "+valueToGoStringMesos(this.CPUsSystemTimeSecs, "float64")+",\n") + } + if this.CPUsLimit != nil { + s = append(s, "CPUsLimit: "+valueToGoStringMesos(this.CPUsLimit, "float64")+",\n") + } + if this.CPUsNrPeriods != nil { + s = append(s, "CPUsNrPeriods: "+valueToGoStringMesos(this.CPUsNrPeriods, "uint32")+",\n") + } + if this.CPUsNrThrottled != nil { + s = append(s, "CPUsNrThrottled: "+valueToGoStringMesos(this.CPUsNrThrottled, "uint32")+",\n") + } + if this.CPUsThrottledTimeSecs != nil { + s = append(s, "CPUsThrottledTimeSecs: "+valueToGoStringMesos(this.CPUsThrottledTimeSecs, "float64")+",\n") + } + if this.MemTotalBytes != nil { + s = append(s, "MemTotalBytes: "+valueToGoStringMesos(this.MemTotalBytes, "uint64")+",\n") + } + if this.MemTotalMemswBytes != nil { + s = append(s, "MemTotalMemswBytes: "+valueToGoStringMesos(this.MemTotalMemswBytes, "uint64")+",\n") + } + if this.MemLimitBytes != nil { + s = append(s, "MemLimitBytes: "+valueToGoStringMesos(this.MemLimitBytes, "uint64")+",\n") + } + if this.MemSoftLimitBytes != nil { + s = append(s, "MemSoftLimitBytes: "+valueToGoStringMesos(this.MemSoftLimitBytes, "uint64")+",\n") + } + if this.MemFileBytes != nil { + s = append(s, "MemFileBytes: "+valueToGoStringMesos(this.MemFileBytes, "uint64")+",\n") + } + if this.MemAnonBytes != nil { + s = append(s, "MemAnonBytes: "+valueToGoStringMesos(this.MemAnonBytes, "uint64")+",\n") + } + if this.MemCacheBytes != nil { + s = append(s, "MemCacheBytes: "+valueToGoStringMesos(this.MemCacheBytes, "uint64")+",\n") + } + if this.MemRSSBytes != nil { + s = append(s, "MemRSSBytes: "+valueToGoStringMesos(this.MemRSSBytes, "uint64")+",\n") + } + if this.MemMappedFileBytes != nil { + s = append(s, "MemMappedFileBytes: "+valueToGoStringMesos(this.MemMappedFileBytes, "uint64")+",\n") + } + if this.MemSwapBytes != nil { + s = append(s, "MemSwapBytes: "+valueToGoStringMesos(this.MemSwapBytes, "uint64")+",\n") + } + if this.MemUnevictableBytes != nil { + s = append(s, "MemUnevictableBytes: "+valueToGoStringMesos(this.MemUnevictableBytes, "uint64")+",\n") + } + if this.MemLowPressureCounter != nil { + s = append(s, "MemLowPressureCounter: "+valueToGoStringMesos(this.MemLowPressureCounter, "uint64")+",\n") + } + if this.MemMediumPressureCounter != nil { + s = append(s, "MemMediumPressureCounter: "+valueToGoStringMesos(this.MemMediumPressureCounter, "uint64")+",\n") + } + if this.MemCriticalPressureCounter != nil { + s = append(s, "MemCriticalPressureCounter: "+valueToGoStringMesos(this.MemCriticalPressureCounter, "uint64")+",\n") + } + if this.DiskLimitBytes != nil { + s = append(s, "DiskLimitBytes: "+valueToGoStringMesos(this.DiskLimitBytes, "uint64")+",\n") + } + if this.DiskUsedBytes != nil { + s = append(s, "DiskUsedBytes: "+valueToGoStringMesos(this.DiskUsedBytes, "uint64")+",\n") + } + if this.DiskStatistics != nil { + s = append(s, "DiskStatistics: "+fmt.Sprintf("%#v", this.DiskStatistics)+",\n") + } + if this.BlkioStatistics != nil { + s = append(s, "BlkioStatistics: "+fmt.Sprintf("%#v", this.BlkioStatistics)+",\n") + } + if this.Perf != nil { + s = append(s, "Perf: "+fmt.Sprintf("%#v", this.Perf)+",\n") + } + if this.NetRxPackets != nil { + s = append(s, "NetRxPackets: "+valueToGoStringMesos(this.NetRxPackets, "uint64")+",\n") + } + if this.NetRxBytes != nil { + s = append(s, "NetRxBytes: "+valueToGoStringMesos(this.NetRxBytes, "uint64")+",\n") + } + if this.NetRxErrors != nil { + s = append(s, "NetRxErrors: "+valueToGoStringMesos(this.NetRxErrors, "uint64")+",\n") + } + if this.NetRxDropped != nil { + s = append(s, "NetRxDropped: "+valueToGoStringMesos(this.NetRxDropped, "uint64")+",\n") + } + if this.NetTxPackets != nil { + s = append(s, "NetTxPackets: "+valueToGoStringMesos(this.NetTxPackets, "uint64")+",\n") + } + if this.NetTxBytes != nil { + s = append(s, "NetTxBytes: "+valueToGoStringMesos(this.NetTxBytes, "uint64")+",\n") + } + if this.NetTxErrors != nil { + s = append(s, "NetTxErrors: "+valueToGoStringMesos(this.NetTxErrors, "uint64")+",\n") + } + if this.NetTxDropped != nil { + s = append(s, "NetTxDropped: "+valueToGoStringMesos(this.NetTxDropped, "uint64")+",\n") + } + if this.NetTCPRttMicrosecsP50 != nil { + s = append(s, "NetTCPRttMicrosecsP50: "+valueToGoStringMesos(this.NetTCPRttMicrosecsP50, "float64")+",\n") + } + if this.NetTCPRttMicrosecsP90 != nil { + s = append(s, "NetTCPRttMicrosecsP90: "+valueToGoStringMesos(this.NetTCPRttMicrosecsP90, "float64")+",\n") + } + if this.NetTCPRttMicrosecsP95 != nil { + s = append(s, "NetTCPRttMicrosecsP95: "+valueToGoStringMesos(this.NetTCPRttMicrosecsP95, "float64")+",\n") + } + if this.NetTCPRttMicrosecsP99 != nil { + s = append(s, "NetTCPRttMicrosecsP99: "+valueToGoStringMesos(this.NetTCPRttMicrosecsP99, "float64")+",\n") + } + if this.NetTCPActiveConnections != nil { + s = append(s, "NetTCPActiveConnections: "+valueToGoStringMesos(this.NetTCPActiveConnections, "float64")+",\n") + } + if this.NetTCPTimeWaitConnections != nil { + s = append(s, "NetTCPTimeWaitConnections: "+valueToGoStringMesos(this.NetTCPTimeWaitConnections, "float64")+",\n") + } + if this.NetTrafficControlStatistics != nil { + s = append(s, "NetTrafficControlStatistics: "+fmt.Sprintf("%#v", this.NetTrafficControlStatistics)+",\n") + } + if this.NetSNMPStatistics != nil { + s = append(s, "NetSNMPStatistics: "+fmt.Sprintf("%#v", this.NetSNMPStatistics)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ResourceUsage) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.ResourceUsage{") + if this.Executors != nil { + s = append(s, "Executors: "+fmt.Sprintf("%#v", this.Executors)+",\n") + } + if this.Total != nil { + s = append(s, "Total: "+fmt.Sprintf("%#v", this.Total)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ResourceUsage_Executor) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&mesos.ResourceUsage_Executor{") + s = append(s, "ExecutorInfo: "+strings.Replace(this.ExecutorInfo.GoString(), `&`, ``, 1)+",\n") + if this.Allocated != nil { + s = append(s, "Allocated: "+fmt.Sprintf("%#v", this.Allocated)+",\n") + } + if this.Statistics != nil { + s = append(s, "Statistics: "+fmt.Sprintf("%#v", this.Statistics)+",\n") + } + s = append(s, "ContainerID: "+strings.Replace(this.ContainerID.GoString(), `&`, ``, 1)+",\n") + if this.Tasks != nil { + s = append(s, "Tasks: "+fmt.Sprintf("%#v", this.Tasks)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ResourceUsage_Executor_Task) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&mesos.ResourceUsage_Executor_Task{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "ID: "+strings.Replace(this.ID.GoString(), `&`, ``, 1)+",\n") + if this.Resources != nil { + s = append(s, "Resources: "+fmt.Sprintf("%#v", this.Resources)+",\n") + } + if this.Labels != nil { + s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *PerfStatistics) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 57) + s = append(s, "&mesos.PerfStatistics{") + s = append(s, "Timestamp: "+fmt.Sprintf("%#v", this.Timestamp)+",\n") + s = append(s, "Duration: "+fmt.Sprintf("%#v", this.Duration)+",\n") + if this.Cycles != nil { + s = append(s, "Cycles: "+valueToGoStringMesos(this.Cycles, "uint64")+",\n") + } + if this.StalledCyclesFrontend != nil { + s = append(s, "StalledCyclesFrontend: "+valueToGoStringMesos(this.StalledCyclesFrontend, "uint64")+",\n") + } + if this.StalledCyclesBackend != nil { + s = append(s, "StalledCyclesBackend: "+valueToGoStringMesos(this.StalledCyclesBackend, "uint64")+",\n") + } + if this.Instructions != nil { + s = append(s, "Instructions: "+valueToGoStringMesos(this.Instructions, "uint64")+",\n") + } + if this.CacheReferences != nil { + s = append(s, "CacheReferences: "+valueToGoStringMesos(this.CacheReferences, "uint64")+",\n") + } + if this.CacheMisses != nil { + s = append(s, "CacheMisses: "+valueToGoStringMesos(this.CacheMisses, "uint64")+",\n") + } + if this.Branches != nil { + s = append(s, "Branches: "+valueToGoStringMesos(this.Branches, "uint64")+",\n") + } + if this.BranchMisses != nil { + s = append(s, "BranchMisses: "+valueToGoStringMesos(this.BranchMisses, "uint64")+",\n") + } + if this.BusCycles != nil { + s = append(s, "BusCycles: "+valueToGoStringMesos(this.BusCycles, "uint64")+",\n") + } + if this.RefCycles != nil { + s = append(s, "RefCycles: "+valueToGoStringMesos(this.RefCycles, "uint64")+",\n") + } + if this.CPUClock != nil { + s = append(s, "CPUClock: "+valueToGoStringMesos(this.CPUClock, "float64")+",\n") + } + if this.TaskClock != nil { + s = append(s, "TaskClock: "+valueToGoStringMesos(this.TaskClock, "float64")+",\n") + } + if this.PageFaults != nil { + s = append(s, "PageFaults: "+valueToGoStringMesos(this.PageFaults, "uint64")+",\n") + } + if this.MinorFaults != nil { + s = append(s, "MinorFaults: "+valueToGoStringMesos(this.MinorFaults, "uint64")+",\n") + } + if this.MajorFaults != nil { + s = append(s, "MajorFaults: "+valueToGoStringMesos(this.MajorFaults, "uint64")+",\n") + } + if this.ContextSwitches != nil { + s = append(s, "ContextSwitches: "+valueToGoStringMesos(this.ContextSwitches, "uint64")+",\n") + } + if this.CPUMigrations != nil { + s = append(s, "CPUMigrations: "+valueToGoStringMesos(this.CPUMigrations, "uint64")+",\n") + } + if this.AlignmentFaults != nil { + s = append(s, "AlignmentFaults: "+valueToGoStringMesos(this.AlignmentFaults, "uint64")+",\n") + } + if this.EmulationFaults != nil { + s = append(s, "EmulationFaults: "+valueToGoStringMesos(this.EmulationFaults, "uint64")+",\n") + } + if this.L1DcacheLoads != nil { + s = append(s, "L1DcacheLoads: "+valueToGoStringMesos(this.L1DcacheLoads, "uint64")+",\n") + } + if this.L1DcacheLoadMisses != nil { + s = append(s, "L1DcacheLoadMisses: "+valueToGoStringMesos(this.L1DcacheLoadMisses, "uint64")+",\n") + } + if this.L1DcacheStores != nil { + s = append(s, "L1DcacheStores: "+valueToGoStringMesos(this.L1DcacheStores, "uint64")+",\n") + } + if this.L1DcacheStoreMisses != nil { + s = append(s, "L1DcacheStoreMisses: "+valueToGoStringMesos(this.L1DcacheStoreMisses, "uint64")+",\n") + } + if this.L1DcachePrefetches != nil { + s = append(s, "L1DcachePrefetches: "+valueToGoStringMesos(this.L1DcachePrefetches, "uint64")+",\n") + } + if this.L1DcachePrefetchMisses != nil { + s = append(s, "L1DcachePrefetchMisses: "+valueToGoStringMesos(this.L1DcachePrefetchMisses, "uint64")+",\n") + } + if this.L1IcacheLoads != nil { + s = append(s, "L1IcacheLoads: "+valueToGoStringMesos(this.L1IcacheLoads, "uint64")+",\n") + } + if this.L1IcacheLoadMisses != nil { + s = append(s, "L1IcacheLoadMisses: "+valueToGoStringMesos(this.L1IcacheLoadMisses, "uint64")+",\n") + } + if this.L1IcachePrefetches != nil { + s = append(s, "L1IcachePrefetches: "+valueToGoStringMesos(this.L1IcachePrefetches, "uint64")+",\n") + } + if this.L1IcachePrefetchMisses != nil { + s = append(s, "L1IcachePrefetchMisses: "+valueToGoStringMesos(this.L1IcachePrefetchMisses, "uint64")+",\n") + } + if this.LLCLoads != nil { + s = append(s, "LLCLoads: "+valueToGoStringMesos(this.LLCLoads, "uint64")+",\n") + } + if this.LLCLoadMisses != nil { + s = append(s, "LLCLoadMisses: "+valueToGoStringMesos(this.LLCLoadMisses, "uint64")+",\n") + } + if this.LLCStores != nil { + s = append(s, "LLCStores: "+valueToGoStringMesos(this.LLCStores, "uint64")+",\n") + } + if this.LLCStoreMisses != nil { + s = append(s, "LLCStoreMisses: "+valueToGoStringMesos(this.LLCStoreMisses, "uint64")+",\n") + } + if this.LLCPrefetches != nil { + s = append(s, "LLCPrefetches: "+valueToGoStringMesos(this.LLCPrefetches, "uint64")+",\n") + } + if this.LLCPrefetchMisses != nil { + s = append(s, "LLCPrefetchMisses: "+valueToGoStringMesos(this.LLCPrefetchMisses, "uint64")+",\n") + } + if this.DTLBLoads != nil { + s = append(s, "DTLBLoads: "+valueToGoStringMesos(this.DTLBLoads, "uint64")+",\n") + } + if this.DTLBLoadMisses != nil { + s = append(s, "DTLBLoadMisses: "+valueToGoStringMesos(this.DTLBLoadMisses, "uint64")+",\n") + } + if this.DTLBStores != nil { + s = append(s, "DTLBStores: "+valueToGoStringMesos(this.DTLBStores, "uint64")+",\n") + } + if this.DTLBStoreMisses != nil { + s = append(s, "DTLBStoreMisses: "+valueToGoStringMesos(this.DTLBStoreMisses, "uint64")+",\n") + } + if this.DTLBPrefetches != nil { + s = append(s, "DTLBPrefetches: "+valueToGoStringMesos(this.DTLBPrefetches, "uint64")+",\n") + } + if this.DTLBPrefetchMisses != nil { + s = append(s, "DTLBPrefetchMisses: "+valueToGoStringMesos(this.DTLBPrefetchMisses, "uint64")+",\n") + } + if this.ITLBLoads != nil { + s = append(s, "ITLBLoads: "+valueToGoStringMesos(this.ITLBLoads, "uint64")+",\n") + } + if this.ITLBLoadMisses != nil { + s = append(s, "ITLBLoadMisses: "+valueToGoStringMesos(this.ITLBLoadMisses, "uint64")+",\n") + } + if this.BranchLoads != nil { + s = append(s, "BranchLoads: "+valueToGoStringMesos(this.BranchLoads, "uint64")+",\n") + } + if this.BranchLoadMisses != nil { + s = append(s, "BranchLoadMisses: "+valueToGoStringMesos(this.BranchLoadMisses, "uint64")+",\n") + } + if this.NodeLoads != nil { + s = append(s, "NodeLoads: "+valueToGoStringMesos(this.NodeLoads, "uint64")+",\n") + } + if this.NodeLoadMisses != nil { + s = append(s, "NodeLoadMisses: "+valueToGoStringMesos(this.NodeLoadMisses, "uint64")+",\n") + } + if this.NodeStores != nil { + s = append(s, "NodeStores: "+valueToGoStringMesos(this.NodeStores, "uint64")+",\n") + } + if this.NodeStoreMisses != nil { + s = append(s, "NodeStoreMisses: "+valueToGoStringMesos(this.NodeStoreMisses, "uint64")+",\n") + } + if this.NodePrefetches != nil { + s = append(s, "NodePrefetches: "+valueToGoStringMesos(this.NodePrefetches, "uint64")+",\n") + } + if this.NodePrefetchMisses != nil { + s = append(s, "NodePrefetchMisses: "+valueToGoStringMesos(this.NodePrefetchMisses, "uint64")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Request) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.Request{") + if this.AgentID != nil { + s = append(s, "AgentID: "+fmt.Sprintf("%#v", this.AgentID)+",\n") + } + if this.Resources != nil { + s = append(s, "Resources: "+fmt.Sprintf("%#v", this.Resources)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Offer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 15) + s = append(s, "&mesos.Offer{") + s = append(s, "ID: "+strings.Replace(this.ID.GoString(), `&`, ``, 1)+",\n") + s = append(s, "FrameworkID: "+strings.Replace(this.FrameworkID.GoString(), `&`, ``, 1)+",\n") + s = append(s, "AgentID: "+strings.Replace(this.AgentID.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Hostname: "+fmt.Sprintf("%#v", this.Hostname)+",\n") + if this.URL != nil { + s = append(s, "URL: "+fmt.Sprintf("%#v", this.URL)+",\n") + } + if this.Domain != nil { + s = append(s, "Domain: "+fmt.Sprintf("%#v", this.Domain)+",\n") + } + if this.Resources != nil { + s = append(s, "Resources: "+fmt.Sprintf("%#v", this.Resources)+",\n") + } + if this.Attributes != nil { + s = append(s, "Attributes: "+fmt.Sprintf("%#v", this.Attributes)+",\n") + } + if this.ExecutorIDs != nil { + s = append(s, "ExecutorIDs: "+fmt.Sprintf("%#v", this.ExecutorIDs)+",\n") + } + if this.Unavailability != nil { + s = append(s, "Unavailability: "+fmt.Sprintf("%#v", this.Unavailability)+",\n") + } + if this.AllocationInfo != nil { + s = append(s, "AllocationInfo: "+fmt.Sprintf("%#v", this.AllocationInfo)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Offer_Operation) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 16) + s = append(s, "&mesos.Offer_Operation{") + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + if this.ID != nil { + s = append(s, "ID: "+fmt.Sprintf("%#v", this.ID)+",\n") + } + if this.Launch != nil { + s = append(s, "Launch: "+fmt.Sprintf("%#v", this.Launch)+",\n") + } + if this.LaunchGroup != nil { + s = append(s, "LaunchGroup: "+fmt.Sprintf("%#v", this.LaunchGroup)+",\n") + } + if this.Reserve != nil { + s = append(s, "Reserve: "+fmt.Sprintf("%#v", this.Reserve)+",\n") + } + if this.Unreserve != nil { + s = append(s, "Unreserve: "+fmt.Sprintf("%#v", this.Unreserve)+",\n") + } + if this.Create != nil { + s = append(s, "Create: "+fmt.Sprintf("%#v", this.Create)+",\n") + } + if this.Destroy != nil { + s = append(s, "Destroy: "+fmt.Sprintf("%#v", this.Destroy)+",\n") + } + if this.CreateVolume != nil { + s = append(s, "CreateVolume: "+fmt.Sprintf("%#v", this.CreateVolume)+",\n") + } + if this.DestroyVolume != nil { + s = append(s, "DestroyVolume: "+fmt.Sprintf("%#v", this.DestroyVolume)+",\n") + } + if this.CreateBlock != nil { + s = append(s, "CreateBlock: "+fmt.Sprintf("%#v", this.CreateBlock)+",\n") + } + if this.DestroyBlock != nil { + s = append(s, "DestroyBlock: "+fmt.Sprintf("%#v", this.DestroyBlock)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Offer_Operation_Launch) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.Offer_Operation_Launch{") + if this.TaskInfos != nil { + s = append(s, "TaskInfos: "+fmt.Sprintf("%#v", this.TaskInfos)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Offer_Operation_LaunchGroup) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.Offer_Operation_LaunchGroup{") + s = append(s, "Executor: "+strings.Replace(this.Executor.GoString(), `&`, ``, 1)+",\n") + s = append(s, "TaskGroup: "+strings.Replace(this.TaskGroup.GoString(), `&`, ``, 1)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Offer_Operation_Reserve) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.Offer_Operation_Reserve{") + if this.Resources != nil { + s = append(s, "Resources: "+fmt.Sprintf("%#v", this.Resources)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Offer_Operation_Unreserve) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.Offer_Operation_Unreserve{") + if this.Resources != nil { + s = append(s, "Resources: "+fmt.Sprintf("%#v", this.Resources)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Offer_Operation_Create) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.Offer_Operation_Create{") + if this.Volumes != nil { + s = append(s, "Volumes: "+fmt.Sprintf("%#v", this.Volumes)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Offer_Operation_Destroy) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.Offer_Operation_Destroy{") + if this.Volumes != nil { + s = append(s, "Volumes: "+fmt.Sprintf("%#v", this.Volumes)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Offer_Operation_CreateVolume) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.Offer_Operation_CreateVolume{") + s = append(s, "Source: "+strings.Replace(this.Source.GoString(), `&`, ``, 1)+",\n") + s = append(s, "TargetType: "+fmt.Sprintf("%#v", this.TargetType)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Offer_Operation_DestroyVolume) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.Offer_Operation_DestroyVolume{") + s = append(s, "Volume: "+strings.Replace(this.Volume.GoString(), `&`, ``, 1)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Offer_Operation_CreateBlock) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.Offer_Operation_CreateBlock{") + s = append(s, "Source: "+strings.Replace(this.Source.GoString(), `&`, ``, 1)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Offer_Operation_DestroyBlock) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.Offer_Operation_DestroyBlock{") + s = append(s, "Block: "+strings.Replace(this.Block.GoString(), `&`, ``, 1)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *InverseOffer) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&mesos.InverseOffer{") + s = append(s, "OfferID: "+strings.Replace(this.OfferID.GoString(), `&`, ``, 1)+",\n") + if this.URL != nil { + s = append(s, "URL: "+fmt.Sprintf("%#v", this.URL)+",\n") + } + s = append(s, "FrameworkID: "+strings.Replace(this.FrameworkID.GoString(), `&`, ``, 1)+",\n") + if this.AgentID != nil { + s = append(s, "AgentID: "+fmt.Sprintf("%#v", this.AgentID)+",\n") + } + s = append(s, "Unavailability: "+strings.Replace(this.Unavailability.GoString(), `&`, ``, 1)+",\n") + if this.Resources != nil { + s = append(s, "Resources: "+fmt.Sprintf("%#v", this.Resources)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *TaskInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 17) + s = append(s, "&mesos.TaskInfo{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "TaskID: "+strings.Replace(this.TaskID.GoString(), `&`, ``, 1)+",\n") + s = append(s, "AgentID: "+strings.Replace(this.AgentID.GoString(), `&`, ``, 1)+",\n") + if this.Resources != nil { + s = append(s, "Resources: "+fmt.Sprintf("%#v", this.Resources)+",\n") + } + if this.Executor != nil { + s = append(s, "Executor: "+fmt.Sprintf("%#v", this.Executor)+",\n") + } + if this.Command != nil { + s = append(s, "Command: "+fmt.Sprintf("%#v", this.Command)+",\n") + } + if this.Container != nil { + s = append(s, "Container: "+fmt.Sprintf("%#v", this.Container)+",\n") + } + if this.HealthCheck != nil { + s = append(s, "HealthCheck: "+fmt.Sprintf("%#v", this.HealthCheck)+",\n") + } + if this.Check != nil { + s = append(s, "Check: "+fmt.Sprintf("%#v", this.Check)+",\n") + } + if this.KillPolicy != nil { + s = append(s, "KillPolicy: "+fmt.Sprintf("%#v", this.KillPolicy)+",\n") + } + if this.Data != nil { + s = append(s, "Data: "+valueToGoStringMesos(this.Data, "byte")+",\n") + } + if this.Labels != nil { + s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n") + } + if this.Discovery != nil { + s = append(s, "Discovery: "+fmt.Sprintf("%#v", this.Discovery)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *TaskGroupInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.TaskGroupInfo{") + if this.Tasks != nil { + s = append(s, "Tasks: "+fmt.Sprintf("%#v", this.Tasks)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Task) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 18) + s = append(s, "&mesos.Task{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "TaskID: "+strings.Replace(this.TaskID.GoString(), `&`, ``, 1)+",\n") + s = append(s, "FrameworkID: "+strings.Replace(this.FrameworkID.GoString(), `&`, ``, 1)+",\n") + if this.ExecutorID != nil { + s = append(s, "ExecutorID: "+fmt.Sprintf("%#v", this.ExecutorID)+",\n") + } + s = append(s, "AgentID: "+strings.Replace(this.AgentID.GoString(), `&`, ``, 1)+",\n") + if this.State != nil { + s = append(s, "State: "+valueToGoStringMesos(this.State, "TaskState")+",\n") + } + if this.Resources != nil { + s = append(s, "Resources: "+fmt.Sprintf("%#v", this.Resources)+",\n") + } + if this.Statuses != nil { + s = append(s, "Statuses: "+fmt.Sprintf("%#v", this.Statuses)+",\n") + } + if this.StatusUpdateState != nil { + s = append(s, "StatusUpdateState: "+valueToGoStringMesos(this.StatusUpdateState, "TaskState")+",\n") + } + if this.StatusUpdateUUID != nil { + s = append(s, "StatusUpdateUUID: "+valueToGoStringMesos(this.StatusUpdateUUID, "byte")+",\n") + } + if this.Labels != nil { + s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n") + } + if this.Discovery != nil { + s = append(s, "Discovery: "+fmt.Sprintf("%#v", this.Discovery)+",\n") + } + if this.Container != nil { + s = append(s, "Container: "+fmt.Sprintf("%#v", this.Container)+",\n") + } + if this.User != nil { + s = append(s, "User: "+valueToGoStringMesos(this.User, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *TaskResourceLimitation) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.TaskResourceLimitation{") + if this.Resources != nil { + s = append(s, "Resources: "+fmt.Sprintf("%#v", this.Resources)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *UUID) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.UUID{") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringMesos(this.Value, "byte")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Operation) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 10) + s = append(s, "&mesos.Operation{") + if this.FrameworkID != nil { + s = append(s, "FrameworkID: "+fmt.Sprintf("%#v", this.FrameworkID)+",\n") + } + if this.AgentID != nil { + s = append(s, "AgentID: "+fmt.Sprintf("%#v", this.AgentID)+",\n") + } + s = append(s, "Info: "+strings.Replace(this.Info.GoString(), `&`, ``, 1)+",\n") + s = append(s, "LatestStatus: "+strings.Replace(this.LatestStatus.GoString(), `&`, ``, 1)+",\n") + if this.Statuses != nil { + s = append(s, "Statuses: "+fmt.Sprintf("%#v", this.Statuses)+",\n") + } + s = append(s, "UUID: "+strings.Replace(this.UUID.GoString(), `&`, ``, 1)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *OperationStatus) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&mesos.OperationStatus{") + if this.OperationID != nil { + s = append(s, "OperationID: "+fmt.Sprintf("%#v", this.OperationID)+",\n") + } + s = append(s, "State: "+fmt.Sprintf("%#v", this.State)+",\n") + if this.Message != nil { + s = append(s, "Message: "+valueToGoStringMesos(this.Message, "string")+",\n") + } + if this.ConvertedResources != nil { + s = append(s, "ConvertedResources: "+fmt.Sprintf("%#v", this.ConvertedResources)+",\n") + } + if this.UUID != nil { + s = append(s, "UUID: "+fmt.Sprintf("%#v", this.UUID)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CheckStatusInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&mesos.CheckStatusInfo{") + if this.Type != nil { + s = append(s, "Type: "+valueToGoStringMesos(this.Type, "CheckInfo_Type")+",\n") + } + if this.Command != nil { + s = append(s, "Command: "+fmt.Sprintf("%#v", this.Command)+",\n") + } + if this.HTTP != nil { + s = append(s, "HTTP: "+fmt.Sprintf("%#v", this.HTTP)+",\n") + } + if this.TCP != nil { + s = append(s, "TCP: "+fmt.Sprintf("%#v", this.TCP)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CheckStatusInfo_Command) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.CheckStatusInfo_Command{") + if this.ExitCode != nil { + s = append(s, "ExitCode: "+valueToGoStringMesos(this.ExitCode, "int32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CheckStatusInfo_Http) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.CheckStatusInfo_Http{") + if this.StatusCode != nil { + s = append(s, "StatusCode: "+valueToGoStringMesos(this.StatusCode, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CheckStatusInfo_Tcp) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.CheckStatusInfo_Tcp{") + if this.Succeeded != nil { + s = append(s, "Succeeded: "+valueToGoStringMesos(this.Succeeded, "bool")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *TaskStatus) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 20) + s = append(s, "&mesos.TaskStatus{") + s = append(s, "TaskID: "+strings.Replace(this.TaskID.GoString(), `&`, ``, 1)+",\n") + if this.State != nil { + s = append(s, "State: "+valueToGoStringMesos(this.State, "TaskState")+",\n") + } + if this.Message != nil { + s = append(s, "Message: "+valueToGoStringMesos(this.Message, "string")+",\n") + } + if this.Source != nil { + s = append(s, "Source: "+valueToGoStringMesos(this.Source, "TaskStatus_Source")+",\n") + } + if this.Reason != nil { + s = append(s, "Reason: "+valueToGoStringMesos(this.Reason, "TaskStatus_Reason")+",\n") + } + if this.Data != nil { + s = append(s, "Data: "+valueToGoStringMesos(this.Data, "byte")+",\n") + } + if this.AgentID != nil { + s = append(s, "AgentID: "+fmt.Sprintf("%#v", this.AgentID)+",\n") + } + if this.ExecutorID != nil { + s = append(s, "ExecutorID: "+fmt.Sprintf("%#v", this.ExecutorID)+",\n") + } + if this.Timestamp != nil { + s = append(s, "Timestamp: "+valueToGoStringMesos(this.Timestamp, "float64")+",\n") + } + if this.UUID != nil { + s = append(s, "UUID: "+valueToGoStringMesos(this.UUID, "byte")+",\n") + } + if this.Healthy != nil { + s = append(s, "Healthy: "+valueToGoStringMesos(this.Healthy, "bool")+",\n") + } + if this.CheckStatus != nil { + s = append(s, "CheckStatus: "+fmt.Sprintf("%#v", this.CheckStatus)+",\n") + } + if this.Labels != nil { + s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n") + } + if this.ContainerStatus != nil { + s = append(s, "ContainerStatus: "+fmt.Sprintf("%#v", this.ContainerStatus)+",\n") + } + if this.UnreachableTime != nil { + s = append(s, "UnreachableTime: "+fmt.Sprintf("%#v", this.UnreachableTime)+",\n") + } + if this.Limitation != nil { + s = append(s, "Limitation: "+fmt.Sprintf("%#v", this.Limitation)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Filters) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.Filters{") + if this.RefuseSeconds != nil { + s = append(s, "RefuseSeconds: "+valueToGoStringMesos(this.RefuseSeconds, "float64")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Environment) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.Environment{") + if this.Variables != nil { + s = append(s, "Variables: "+fmt.Sprintf("%#v", this.Variables)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Environment_Variable) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&mesos.Environment_Variable{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + if this.Type != nil { + s = append(s, "Type: "+valueToGoStringMesos(this.Type, "Environment_Variable_Type")+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringMesos(this.Value, "string")+",\n") + } + if this.Secret != nil { + s = append(s, "Secret: "+fmt.Sprintf("%#v", this.Secret)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Parameter) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.Parameter{") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Parameters) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.Parameters{") + if this.Parameter != nil { + s = append(s, "Parameter: "+fmt.Sprintf("%#v", this.Parameter)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Credential) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.Credential{") + s = append(s, "Principal: "+fmt.Sprintf("%#v", this.Principal)+",\n") + if this.Secret != nil { + s = append(s, "Secret: "+valueToGoStringMesos(this.Secret, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Credentials) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.Credentials{") + if this.Credentials != nil { + s = append(s, "Credentials: "+fmt.Sprintf("%#v", this.Credentials)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Secret) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mesos.Secret{") + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + if this.Reference != nil { + s = append(s, "Reference: "+fmt.Sprintf("%#v", this.Reference)+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Secret_Reference) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.Secret_Reference{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + if this.Key != nil { + s = append(s, "Key: "+valueToGoStringMesos(this.Key, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Secret_Value) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.Secret_Value{") + if this.Data != nil { + s = append(s, "Data: "+valueToGoStringMesos(this.Data, "byte")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *RateLimit) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mesos.RateLimit{") + if this.QPS != nil { + s = append(s, "QPS: "+valueToGoStringMesos(this.QPS, "float64")+",\n") + } + s = append(s, "Principal: "+fmt.Sprintf("%#v", this.Principal)+",\n") + if this.Capacity != nil { + s = append(s, "Capacity: "+valueToGoStringMesos(this.Capacity, "uint64")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *RateLimits) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mesos.RateLimits{") + if this.Limits != nil { + s = append(s, "Limits: "+fmt.Sprintf("%#v", this.Limits)+",\n") + } + if this.AggregateDefaultQPS != nil { + s = append(s, "AggregateDefaultQPS: "+valueToGoStringMesos(this.AggregateDefaultQPS, "float64")+",\n") + } + if this.AggregateDefaultCapacity != nil { + s = append(s, "AggregateDefaultCapacity: "+valueToGoStringMesos(this.AggregateDefaultCapacity, "uint64")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Image) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&mesos.Image{") + if this.Type != nil { + s = append(s, "Type: "+valueToGoStringMesos(this.Type, "Image_Type")+",\n") + } + if this.Appc != nil { + s = append(s, "Appc: "+fmt.Sprintf("%#v", this.Appc)+",\n") + } + if this.Docker != nil { + s = append(s, "Docker: "+fmt.Sprintf("%#v", this.Docker)+",\n") + } + if this.Cached != nil { + s = append(s, "Cached: "+valueToGoStringMesos(this.Cached, "bool")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Image_Appc) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mesos.Image_Appc{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + if this.ID != nil { + s = append(s, "ID: "+valueToGoStringMesos(this.ID, "string")+",\n") + } + if this.Labels != nil { + s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Image_Docker) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mesos.Image_Docker{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + if this.Credential != nil { + s = append(s, "Credential: "+fmt.Sprintf("%#v", this.Credential)+",\n") + } + if this.Config != nil { + s = append(s, "Config: "+fmt.Sprintf("%#v", this.Config)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *MountPropagation) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.MountPropagation{") + if this.Mode != nil { + s = append(s, "Mode: "+valueToGoStringMesos(this.Mode, "MountPropagation_Mode")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Volume) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&mesos.Volume{") + if this.Mode != nil { + s = append(s, "Mode: "+valueToGoStringMesos(this.Mode, "Volume_Mode")+",\n") + } + s = append(s, "ContainerPath: "+fmt.Sprintf("%#v", this.ContainerPath)+",\n") + if this.HostPath != nil { + s = append(s, "HostPath: "+valueToGoStringMesos(this.HostPath, "string")+",\n") + } + if this.Image != nil { + s = append(s, "Image: "+fmt.Sprintf("%#v", this.Image)+",\n") + } + if this.Source != nil { + s = append(s, "Source: "+fmt.Sprintf("%#v", this.Source)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Volume_Source) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&mesos.Volume_Source{") + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + if this.DockerVolume != nil { + s = append(s, "DockerVolume: "+fmt.Sprintf("%#v", this.DockerVolume)+",\n") + } + if this.HostPath != nil { + s = append(s, "HostPath: "+fmt.Sprintf("%#v", this.HostPath)+",\n") + } + if this.SandboxPath != nil { + s = append(s, "SandboxPath: "+fmt.Sprintf("%#v", this.SandboxPath)+",\n") + } + if this.Secret != nil { + s = append(s, "Secret: "+fmt.Sprintf("%#v", this.Secret)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Volume_Source_DockerVolume) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mesos.Volume_Source_DockerVolume{") + if this.Driver != nil { + s = append(s, "Driver: "+valueToGoStringMesos(this.Driver, "string")+",\n") + } + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + if this.DriverOptions != nil { + s = append(s, "DriverOptions: "+fmt.Sprintf("%#v", this.DriverOptions)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Volume_Source_HostPath) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.Volume_Source_HostPath{") + s = append(s, "Path: "+fmt.Sprintf("%#v", this.Path)+",\n") + if this.MountPropagation != nil { + s = append(s, "MountPropagation: "+fmt.Sprintf("%#v", this.MountPropagation)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Volume_Source_SandboxPath) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.Volume_Source_SandboxPath{") + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + s = append(s, "Path: "+fmt.Sprintf("%#v", this.Path)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NetworkInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&mesos.NetworkInfo{") + if this.IPAddresses != nil { + s = append(s, "IPAddresses: "+fmt.Sprintf("%#v", this.IPAddresses)+",\n") + } + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringMesos(this.Name, "string")+",\n") + } + if this.Groups != nil { + s = append(s, "Groups: "+fmt.Sprintf("%#v", this.Groups)+",\n") + } + if this.Labels != nil { + s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n") + } + if this.PortMappings != nil { + s = append(s, "PortMappings: "+fmt.Sprintf("%#v", this.PortMappings)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NetworkInfo_IPAddress) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.NetworkInfo_IPAddress{") + if this.Protocol != nil { + s = append(s, "Protocol: "+valueToGoStringMesos(this.Protocol, "NetworkInfo_Protocol")+",\n") + } + if this.IPAddress != nil { + s = append(s, "IPAddress: "+valueToGoStringMesos(this.IPAddress, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *NetworkInfo_PortMapping) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mesos.NetworkInfo_PortMapping{") + s = append(s, "HostPort: "+fmt.Sprintf("%#v", this.HostPort)+",\n") + s = append(s, "ContainerPort: "+fmt.Sprintf("%#v", this.ContainerPort)+",\n") + if this.Protocol != nil { + s = append(s, "Protocol: "+valueToGoStringMesos(this.Protocol, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CapabilityInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.CapabilityInfo{") + if this.Capabilities != nil { + s = append(s, "Capabilities: "+fmt.Sprintf("%#v", this.Capabilities)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *LinuxInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&mesos.LinuxInfo{") + if this.CapabilityInfo != nil { + s = append(s, "CapabilityInfo: "+fmt.Sprintf("%#v", this.CapabilityInfo)+",\n") + } + if this.BoundingCapabilities != nil { + s = append(s, "BoundingCapabilities: "+fmt.Sprintf("%#v", this.BoundingCapabilities)+",\n") + } + if this.EffectiveCapabilities != nil { + s = append(s, "EffectiveCapabilities: "+fmt.Sprintf("%#v", this.EffectiveCapabilities)+",\n") + } + if this.SharePIDNamespace != nil { + s = append(s, "SharePIDNamespace: "+valueToGoStringMesos(this.SharePIDNamespace, "bool")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *RLimitInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.RLimitInfo{") + if this.Rlimits != nil { + s = append(s, "Rlimits: "+fmt.Sprintf("%#v", this.Rlimits)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *RLimitInfo_RLimit) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mesos.RLimitInfo_RLimit{") + s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") + if this.Hard != nil { + s = append(s, "Hard: "+valueToGoStringMesos(this.Hard, "uint64")+",\n") + } + if this.Soft != nil { + s = append(s, "Soft: "+valueToGoStringMesos(this.Soft, "uint64")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *TTYInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.TTYInfo{") + if this.WindowSize != nil { + s = append(s, "WindowSize: "+fmt.Sprintf("%#v", this.WindowSize)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *TTYInfo_WindowSize) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.TTYInfo_WindowSize{") + s = append(s, "Rows: "+fmt.Sprintf("%#v", this.Rows)+",\n") + s = append(s, "Columns: "+fmt.Sprintf("%#v", this.Columns)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainerInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&mesos.ContainerInfo{") + if this.Type != nil { + s = append(s, "Type: "+valueToGoStringMesos(this.Type, "ContainerInfo_Type")+",\n") + } + if this.Volumes != nil { + s = append(s, "Volumes: "+fmt.Sprintf("%#v", this.Volumes)+",\n") + } + if this.Hostname != nil { + s = append(s, "Hostname: "+valueToGoStringMesos(this.Hostname, "string")+",\n") + } + if this.Docker != nil { + s = append(s, "Docker: "+fmt.Sprintf("%#v", this.Docker)+",\n") + } + if this.Mesos != nil { + s = append(s, "Mesos: "+fmt.Sprintf("%#v", this.Mesos)+",\n") + } + if this.NetworkInfos != nil { + s = append(s, "NetworkInfos: "+fmt.Sprintf("%#v", this.NetworkInfos)+",\n") + } + if this.LinuxInfo != nil { + s = append(s, "LinuxInfo: "+fmt.Sprintf("%#v", this.LinuxInfo)+",\n") + } + if this.RlimitInfo != nil { + s = append(s, "RlimitInfo: "+fmt.Sprintf("%#v", this.RlimitInfo)+",\n") + } + if this.TTYInfo != nil { + s = append(s, "TTYInfo: "+fmt.Sprintf("%#v", this.TTYInfo)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainerInfo_DockerInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 11) + s = append(s, "&mesos.ContainerInfo_DockerInfo{") + s = append(s, "Image: "+fmt.Sprintf("%#v", this.Image)+",\n") + if this.Network != nil { + s = append(s, "Network: "+valueToGoStringMesos(this.Network, "ContainerInfo_DockerInfo_Network")+",\n") + } + if this.PortMappings != nil { + s = append(s, "PortMappings: "+fmt.Sprintf("%#v", this.PortMappings)+",\n") + } + if this.Privileged != nil { + s = append(s, "Privileged: "+valueToGoStringMesos(this.Privileged, "bool")+",\n") + } + if this.Parameters != nil { + s = append(s, "Parameters: "+fmt.Sprintf("%#v", this.Parameters)+",\n") + } + if this.ForcePullImage != nil { + s = append(s, "ForcePullImage: "+valueToGoStringMesos(this.ForcePullImage, "bool")+",\n") + } + if this.VolumeDriver != nil { + s = append(s, "VolumeDriver: "+valueToGoStringMesos(this.VolumeDriver, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainerInfo_DockerInfo_PortMapping) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mesos.ContainerInfo_DockerInfo_PortMapping{") + s = append(s, "HostPort: "+fmt.Sprintf("%#v", this.HostPort)+",\n") + s = append(s, "ContainerPort: "+fmt.Sprintf("%#v", this.ContainerPort)+",\n") + if this.Protocol != nil { + s = append(s, "Protocol: "+valueToGoStringMesos(this.Protocol, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainerInfo_MesosInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.ContainerInfo_MesosInfo{") + if this.Image != nil { + s = append(s, "Image: "+fmt.Sprintf("%#v", this.Image)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *ContainerStatus) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&mesos.ContainerStatus{") + if this.ContainerID != nil { + s = append(s, "ContainerID: "+fmt.Sprintf("%#v", this.ContainerID)+",\n") + } + if this.NetworkInfos != nil { + s = append(s, "NetworkInfos: "+fmt.Sprintf("%#v", this.NetworkInfos)+",\n") + } + if this.CgroupInfo != nil { + s = append(s, "CgroupInfo: "+fmt.Sprintf("%#v", this.CgroupInfo)+",\n") + } + if this.ExecutorPID != nil { + s = append(s, "ExecutorPID: "+valueToGoStringMesos(this.ExecutorPID, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CgroupInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.CgroupInfo{") + if this.NetCLS != nil { + s = append(s, "NetCLS: "+fmt.Sprintf("%#v", this.NetCLS)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CgroupInfo_Blkio) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&mesos.CgroupInfo_Blkio{") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CgroupInfo_Blkio_Value) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.CgroupInfo_Blkio_Value{") + if this.Op != nil { + s = append(s, "Op: "+valueToGoStringMesos(this.Op, "CgroupInfo_Blkio_Operation")+",\n") + } + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringMesos(this.Value, "uint64")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CgroupInfo_Blkio_CFQ) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&mesos.CgroupInfo_Blkio_CFQ{") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CgroupInfo_Blkio_CFQ_Statistics) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 13) + s = append(s, "&mesos.CgroupInfo_Blkio_CFQ_Statistics{") + if this.Device != nil { + s = append(s, "Device: "+fmt.Sprintf("%#v", this.Device)+",\n") + } + if this.Sectors != nil { + s = append(s, "Sectors: "+valueToGoStringMesos(this.Sectors, "uint64")+",\n") + } + if this.Time != nil { + s = append(s, "Time: "+valueToGoStringMesos(this.Time, "uint64")+",\n") + } + if this.IOServiced != nil { + s = append(s, "IOServiced: "+fmt.Sprintf("%#v", this.IOServiced)+",\n") + } + if this.IOServiceBytes != nil { + s = append(s, "IOServiceBytes: "+fmt.Sprintf("%#v", this.IOServiceBytes)+",\n") + } + if this.IOServiceTime != nil { + s = append(s, "IOServiceTime: "+fmt.Sprintf("%#v", this.IOServiceTime)+",\n") + } + if this.IOWaitTime != nil { + s = append(s, "IOWaitTime: "+fmt.Sprintf("%#v", this.IOWaitTime)+",\n") + } + if this.IOMerged != nil { + s = append(s, "IOMerged: "+fmt.Sprintf("%#v", this.IOMerged)+",\n") + } + if this.IOQueued != nil { + s = append(s, "IOQueued: "+fmt.Sprintf("%#v", this.IOQueued)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CgroupInfo_Blkio_Throttling) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 4) + s = append(s, "&mesos.CgroupInfo_Blkio_Throttling{") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CgroupInfo_Blkio_Throttling_Statistics) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mesos.CgroupInfo_Blkio_Throttling_Statistics{") + if this.Device != nil { + s = append(s, "Device: "+fmt.Sprintf("%#v", this.Device)+",\n") + } + if this.IOServiced != nil { + s = append(s, "IOServiced: "+fmt.Sprintf("%#v", this.IOServiced)+",\n") + } + if this.IOServiceBytes != nil { + s = append(s, "IOServiceBytes: "+fmt.Sprintf("%#v", this.IOServiceBytes)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CgroupInfo_Blkio_Statistics) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mesos.CgroupInfo_Blkio_Statistics{") + if this.CFQ != nil { + s = append(s, "CFQ: "+fmt.Sprintf("%#v", this.CFQ)+",\n") + } + if this.CFQRecursive != nil { + s = append(s, "CFQRecursive: "+fmt.Sprintf("%#v", this.CFQRecursive)+",\n") + } + if this.Throttling != nil { + s = append(s, "Throttling: "+fmt.Sprintf("%#v", this.Throttling)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *CgroupInfo_NetCls) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.CgroupInfo_NetCls{") + if this.ClassID != nil { + s = append(s, "ClassID: "+valueToGoStringMesos(this.ClassID, "uint32")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Labels) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.Labels{") + if this.Labels != nil { + s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Label) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.Label{") + s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringMesos(this.Value, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Port) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 9) + s = append(s, "&mesos.Port{") + s = append(s, "Number: "+fmt.Sprintf("%#v", this.Number)+",\n") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringMesos(this.Name, "string")+",\n") + } + if this.Protocol != nil { + s = append(s, "Protocol: "+valueToGoStringMesos(this.Protocol, "string")+",\n") + } + if this.Visibility != nil { + s = append(s, "Visibility: "+valueToGoStringMesos(this.Visibility, "DiscoveryInfo_Visibility")+",\n") + } + if this.Labels != nil { + s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Ports) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.Ports{") + if this.Ports != nil { + s = append(s, "Ports: "+fmt.Sprintf("%#v", this.Ports)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DiscoveryInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 11) + s = append(s, "&mesos.DiscoveryInfo{") + s = append(s, "Visibility: "+fmt.Sprintf("%#v", this.Visibility)+",\n") + if this.Name != nil { + s = append(s, "Name: "+valueToGoStringMesos(this.Name, "string")+",\n") + } + if this.Environment != nil { + s = append(s, "Environment: "+valueToGoStringMesos(this.Environment, "string")+",\n") + } + if this.Location != nil { + s = append(s, "Location: "+valueToGoStringMesos(this.Location, "string")+",\n") + } + if this.Version != nil { + s = append(s, "Version: "+valueToGoStringMesos(this.Version, "string")+",\n") + } + if this.Ports != nil { + s = append(s, "Ports: "+fmt.Sprintf("%#v", this.Ports)+",\n") + } + if this.Labels != nil { + s = append(s, "Labels: "+fmt.Sprintf("%#v", this.Labels)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *WeightInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.WeightInfo{") + s = append(s, "Weight: "+fmt.Sprintf("%#v", this.Weight)+",\n") + if this.Role != nil { + s = append(s, "Role: "+valueToGoStringMesos(this.Role, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *VersionInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 11) + s = append(s, "&mesos.VersionInfo{") + s = append(s, "Version: "+fmt.Sprintf("%#v", this.Version)+",\n") + if this.BuildDate != nil { + s = append(s, "BuildDate: "+valueToGoStringMesos(this.BuildDate, "string")+",\n") + } + if this.BuildTime != nil { + s = append(s, "BuildTime: "+valueToGoStringMesos(this.BuildTime, "float64")+",\n") + } + if this.BuildUser != nil { + s = append(s, "BuildUser: "+valueToGoStringMesos(this.BuildUser, "string")+",\n") + } + if this.GitSHA != nil { + s = append(s, "GitSHA: "+valueToGoStringMesos(this.GitSHA, "string")+",\n") + } + if this.GitBranch != nil { + s = append(s, "GitBranch: "+valueToGoStringMesos(this.GitBranch, "string")+",\n") + } + if this.GitTag != nil { + s = append(s, "GitTag: "+valueToGoStringMesos(this.GitTag, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Flag) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.Flag{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringMesos(this.Value, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Role) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 8) + s = append(s, "&mesos.Role{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + s = append(s, "Weight: "+fmt.Sprintf("%#v", this.Weight)+",\n") + if this.Frameworks != nil { + s = append(s, "Frameworks: "+fmt.Sprintf("%#v", this.Frameworks)+",\n") + } + if this.Resources != nil { + s = append(s, "Resources: "+fmt.Sprintf("%#v", this.Resources)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Metric) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.Metric{") + s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") + if this.Value != nil { + s = append(s, "Value: "+valueToGoStringMesos(this.Value, "float64")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *FileInfo) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 11) + s = append(s, "&mesos.FileInfo{") + s = append(s, "Path: "+fmt.Sprintf("%#v", this.Path)+",\n") + if this.Nlink != nil { + s = append(s, "Nlink: "+valueToGoStringMesos(this.Nlink, "int32")+",\n") + } + if this.Size != nil { + s = append(s, "Size: "+valueToGoStringMesos(this.Size, "uint64")+",\n") + } + if this.Mtime != nil { + s = append(s, "Mtime: "+fmt.Sprintf("%#v", this.Mtime)+",\n") + } + if this.Mode != nil { + s = append(s, "Mode: "+valueToGoStringMesos(this.Mode, "uint32")+",\n") + } + if this.UID != nil { + s = append(s, "UID: "+valueToGoStringMesos(this.UID, "string")+",\n") + } + if this.GID != nil { + s = append(s, "GID: "+valueToGoStringMesos(this.GID, "string")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Device) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.Device{") + if this.Path != nil { + s = append(s, "Path: "+valueToGoStringMesos(this.Path, "string")+",\n") + } + if this.Number != nil { + s = append(s, "Number: "+fmt.Sprintf("%#v", this.Number)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *Device_Number) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.Device_Number{") + if this.MajorNumber != nil { + s = append(s, "MajorNumber: "+valueToGoStringMesos(this.MajorNumber, "uint64")+",\n") + } + if this.MinorNumber != nil { + s = append(s, "MinorNumber: "+valueToGoStringMesos(this.MinorNumber, "uint64")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DeviceAccess) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 6) + s = append(s, "&mesos.DeviceAccess{") + s = append(s, "Device: "+strings.Replace(this.Device.GoString(), `&`, ``, 1)+",\n") + s = append(s, "Access: "+strings.Replace(this.Access.GoString(), `&`, ``, 1)+",\n") + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DeviceAccess_Access) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 7) + s = append(s, "&mesos.DeviceAccess_Access{") + if this.Read != nil { + s = append(s, "Read: "+valueToGoStringMesos(this.Read, "bool")+",\n") + } + if this.Write != nil { + s = append(s, "Write: "+valueToGoStringMesos(this.Write, "bool")+",\n") + } + if this.Mknod != nil { + s = append(s, "Mknod: "+valueToGoStringMesos(this.Mknod, "bool")+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func (this *DeviceWhitelist) GoString() string { + if this == nil { + return "nil" + } + s := make([]string, 0, 5) + s = append(s, "&mesos.DeviceWhitelist{") + if this.AllowedDevices != nil { + s = append(s, "AllowedDevices: "+fmt.Sprintf("%#v", this.AllowedDevices)+",\n") + } + s = append(s, "}") + return strings.Join(s, "") +} +func valueToGoStringMesos(v interface{}, typ string) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) +} +func (m *FrameworkID) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FrameworkID) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + return i, nil +} + +func (m *OfferID) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OfferID) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + return i, nil +} + +func (m *AgentID) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AgentID) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + return i, nil +} + +func (m *TaskID) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TaskID) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + return i, nil +} + +func (m *ExecutorID) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExecutorID) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + return i, nil +} + +func (m *ContainerID) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContainerID) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + if m.Parent != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Parent.ProtoSize())) + n1, err := m.Parent.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n1 + } + return i, nil +} + +func (m *ResourceProviderID) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceProviderID) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + return i, nil +} + +func (m *OperationID) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OperationID) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + return i, nil +} + +func (m *TimeInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TimeInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Nanoseconds)) + return i, nil +} + +func (m *DurationInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DurationInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Nanoseconds)) + return i, nil +} + +func (m *Address) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Address) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Hostname != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Hostname))) + i += copy(dAtA[i:], *m.Hostname) + } + if m.IP != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.IP))) + i += copy(dAtA[i:], *m.IP) + } + dAtA[i] = 0x18 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Port)) + return i, nil +} + +func (m *URL) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *URL) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Scheme))) + i += copy(dAtA[i:], m.Scheme) + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Address.ProtoSize())) + n2, err := m.Address.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n2 + if m.Path != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Path))) + i += copy(dAtA[i:], *m.Path) + } + if len(m.Query) > 0 { + for _, msg := range m.Query { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Fragment != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Fragment))) + i += copy(dAtA[i:], *m.Fragment) + } + return i, nil +} + +func (m *Unavailability) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Unavailability) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Start.ProtoSize())) + n3, err := m.Start.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n3 + if m.Duration != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Duration.ProtoSize())) + n4, err := m.Duration.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n4 + } + return i, nil +} + +func (m *MachineID) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MachineID) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Hostname != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Hostname))) + i += copy(dAtA[i:], *m.Hostname) + } + if m.IP != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.IP))) + i += copy(dAtA[i:], *m.IP) + } + return i, nil +} + +func (m *MachineInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MachineInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.ID.ProtoSize())) + n5, err := m.ID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n5 + if m.Mode != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Mode)) + } + if m.Unavailability != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Unavailability.ProtoSize())) + n6, err := m.Unavailability.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n6 + } + return i, nil +} + +func (m *FrameworkInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FrameworkInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.User))) + i += copy(dAtA[i:], m.User) + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + if m.ID != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.ID.ProtoSize())) + n7, err := m.ID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n7 + } + if m.FailoverTimeout != nil { + dAtA[i] = 0x21 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.FailoverTimeout)))) + } + if m.Checkpoint != nil { + dAtA[i] = 0x28 + i++ + if *m.Checkpoint { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Role != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Role))) + i += copy(dAtA[i:], *m.Role) + } + if m.Hostname != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Hostname))) + i += copy(dAtA[i:], *m.Hostname) + } + if m.Principal != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Principal))) + i += copy(dAtA[i:], *m.Principal) + } + if m.WebUiURL != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.WebUiURL))) + i += copy(dAtA[i:], *m.WebUiURL) + } + if len(m.Capabilities) > 0 { + for _, msg := range m.Capabilities { + dAtA[i] = 0x52 + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Labels != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Labels.ProtoSize())) + n8, err := m.Labels.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n8 + } + if len(m.Roles) > 0 { + for _, s := range m.Roles { + dAtA[i] = 0x62 + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *FrameworkInfo_Capability) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FrameworkInfo_Capability) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Type)) + return i, nil +} + +func (m *CheckInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CheckInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Type)) + if m.Command != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Command.ProtoSize())) + n9, err := m.Command.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n9 + } + if m.HTTP != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.HTTP.ProtoSize())) + n10, err := m.HTTP.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n10 + } + if m.DelaySeconds != nil { + dAtA[i] = 0x21 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.DelaySeconds)))) + } + if m.IntervalSeconds != nil { + dAtA[i] = 0x29 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.IntervalSeconds)))) + } + if m.TimeoutSeconds != nil { + dAtA[i] = 0x31 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.TimeoutSeconds)))) + } + if m.TCP != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.TCP.ProtoSize())) + n11, err := m.TCP.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n11 + } + return i, nil +} + +func (m *CheckInfo_Command) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CheckInfo_Command) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Command.ProtoSize())) + n12, err := m.Command.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n12 + return i, nil +} + +func (m *CheckInfo_Http) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CheckInfo_Http) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Port)) + if m.Path != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Path))) + i += copy(dAtA[i:], *m.Path) + } + return i, nil +} + +func (m *CheckInfo_Tcp) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CheckInfo_Tcp) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Port)) + return i, nil +} + +func (m *HealthCheck) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HealthCheck) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.HTTP != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.HTTP.ProtoSize())) + n13, err := m.HTTP.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n13 + } + if m.DelaySeconds != nil { + dAtA[i] = 0x11 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.DelaySeconds)))) + } + if m.IntervalSeconds != nil { + dAtA[i] = 0x19 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.IntervalSeconds)))) + } + if m.TimeoutSeconds != nil { + dAtA[i] = 0x21 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.TimeoutSeconds)))) + } + if m.ConsecutiveFailures != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.ConsecutiveFailures)) + } + if m.GracePeriodSeconds != nil { + dAtA[i] = 0x31 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.GracePeriodSeconds)))) + } + if m.Command != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Command.ProtoSize())) + n14, err := m.Command.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n14 + } + dAtA[i] = 0x40 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Type)) + if m.TCP != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.TCP.ProtoSize())) + n15, err := m.TCP.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n15 + } + return i, nil +} + +func (m *HealthCheck_HTTPCheckInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HealthCheck_HTTPCheckInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Port)) + if m.Path != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Path))) + i += copy(dAtA[i:], *m.Path) + } + if m.Scheme != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Scheme))) + i += copy(dAtA[i:], *m.Scheme) + } + if len(m.Statuses) > 0 { + for _, num := range m.Statuses { + dAtA[i] = 0x20 + i++ + i = encodeVarintMesos(dAtA, i, uint64(num)) + } + } + if m.Protocol != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Protocol)) + } + return i, nil +} + +func (m *HealthCheck_TCPCheckInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *HealthCheck_TCPCheckInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Port)) + if m.Protocol != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Protocol)) + } + return i, nil +} + +func (m *KillPolicy) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *KillPolicy) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.GracePeriod != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.GracePeriod.ProtoSize())) + n16, err := m.GracePeriod.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n16 + } + return i, nil +} + +func (m *CommandInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CommandInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.URIs) > 0 { + for _, msg := range m.URIs { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Environment != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Environment.ProtoSize())) + n17, err := m.Environment.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n17 + } + if m.Value != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Value))) + i += copy(dAtA[i:], *m.Value) + } + if m.User != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.User))) + i += copy(dAtA[i:], *m.User) + } + if m.Shell != nil { + dAtA[i] = 0x30 + i++ + if *m.Shell { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if len(m.Arguments) > 0 { + for _, s := range m.Arguments { + dAtA[i] = 0x3a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *CommandInfo_URI) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CommandInfo_URI) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + if m.Executable != nil { + dAtA[i] = 0x10 + i++ + if *m.Executable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Extract != nil { + dAtA[i] = 0x18 + i++ + if *m.Extract { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Cache != nil { + dAtA[i] = 0x20 + i++ + if *m.Cache { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.OutputFile != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.OutputFile))) + i += copy(dAtA[i:], *m.OutputFile) + } + return i, nil +} + +func (m *ExecutorInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ExecutorInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.ExecutorID.ProtoSize())) + n18, err := m.ExecutorID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n18 + if m.Data != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Data))) + i += copy(dAtA[i:], m.Data) + } + if len(m.Resources) > 0 { + for _, msg := range m.Resources { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Command != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Command.ProtoSize())) + n19, err := m.Command.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n19 + } + if m.FrameworkID != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.FrameworkID.ProtoSize())) + n20, err := m.FrameworkID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n20 + } + if m.Name != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Name))) + i += copy(dAtA[i:], *m.Name) + } + if m.Source != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Source))) + i += copy(dAtA[i:], *m.Source) + } + if m.Container != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Container.ProtoSize())) + n21, err := m.Container.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n21 + } + if m.Discovery != nil { + dAtA[i] = 0x62 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Discovery.ProtoSize())) + n22, err := m.Discovery.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n22 + } + if m.ShutdownGracePeriod != nil { + dAtA[i] = 0x6a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.ShutdownGracePeriod.ProtoSize())) + n23, err := m.ShutdownGracePeriod.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n23 + } + if m.Labels != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Labels.ProtoSize())) + n24, err := m.Labels.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n24 + } + dAtA[i] = 0x78 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Type)) + return i, nil +} + +func (m *DomainInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DomainInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FaultDomain != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.FaultDomain.ProtoSize())) + n25, err := m.FaultDomain.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n25 + } + return i, nil +} + +func (m *DomainInfo_FaultDomain) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DomainInfo_FaultDomain) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Region.ProtoSize())) + n26, err := m.Region.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n26 + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Zone.ProtoSize())) + n27, err := m.Zone.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n27 + return i, nil +} + +func (m *DomainInfo_FaultDomain_RegionInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DomainInfo_FaultDomain_RegionInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + return i, nil +} + +func (m *DomainInfo_FaultDomain_ZoneInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DomainInfo_FaultDomain_ZoneInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + return i, nil +} + +func (m *MasterInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MasterInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.ID))) + i += copy(dAtA[i:], m.ID) + dAtA[i] = 0x10 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.IP)) + if m.Port == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("port") + } else { + dAtA[i] = 0x18 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Port)) + } + if m.PID != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.PID))) + i += copy(dAtA[i:], *m.PID) + } + if m.Hostname != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Hostname))) + i += copy(dAtA[i:], *m.Hostname) + } + if m.Version != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Version))) + i += copy(dAtA[i:], *m.Version) + } + if m.Address != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Address.ProtoSize())) + n28, err := m.Address.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n28 + } + if m.Domain != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Domain.ProtoSize())) + n29, err := m.Domain.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n29 + } + if len(m.Capabilities) > 0 { + for _, msg := range m.Capabilities { + dAtA[i] = 0x4a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *MasterInfo_Capability) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MasterInfo_Capability) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Type)) + return i, nil +} + +func (m *AgentInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AgentInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Hostname))) + i += copy(dAtA[i:], m.Hostname) + if len(m.Resources) > 0 { + for _, msg := range m.Resources { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Attributes) > 0 { + for _, msg := range m.Attributes { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.ID != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.ID.ProtoSize())) + n30, err := m.ID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n30 + } + if m.Port != nil { + dAtA[i] = 0x40 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Port)) + } + if m.Domain != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Domain.ProtoSize())) + n31, err := m.Domain.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n31 + } + return i, nil +} + +func (m *AgentInfo_Capability) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *AgentInfo_Capability) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Type)) + return i, nil +} + +func (m *CSIPluginContainerInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CSIPluginContainerInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Services) > 0 { + for _, num := range m.Services { + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(num)) + } + } + if m.Command != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Command.ProtoSize())) + n32, err := m.Command.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n32 + } + if len(m.Resources) > 0 { + for _, msg := range m.Resources { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Container != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Container.ProtoSize())) + n33, err := m.Container.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n33 + } + return i, nil +} + +func (m *CSIPluginInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CSIPluginInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Type))) + i += copy(dAtA[i:], m.Type) + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + if len(m.Containers) > 0 { + for _, msg := range m.Containers { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ResourceProviderInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceProviderInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ID != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.ID.ProtoSize())) + n34, err := m.ID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n34 + } + if len(m.Attributes) > 0 { + for _, msg := range m.Attributes { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Type))) + i += copy(dAtA[i:], m.Type) + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + if len(m.DefaultReservations) > 0 { + for _, msg := range m.DefaultReservations { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Storage != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Storage.ProtoSize())) + n35, err := m.Storage.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n35 + } + return i, nil +} + +func (m *ResourceProviderInfo_Storage) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceProviderInfo_Storage) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Plugin.ProtoSize())) + n36, err := m.Plugin.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n36 + return i, nil +} + +func (m *Value) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Value) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Type)) + if m.Scalar != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Scalar.ProtoSize())) + n37, err := m.Scalar.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n37 + } + if m.Ranges != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Ranges.ProtoSize())) + n38, err := m.Ranges.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n38 + } + if m.Set != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Set.ProtoSize())) + n39, err := m.Set.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n39 + } + if m.Text != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Text.ProtoSize())) + n40, err := m.Text.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n40 + } + return i, nil +} + +func (m *Value_Scalar) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Value_Scalar) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x9 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(m.Value)))) + return i, nil +} + +func (m *Value_Range) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Value_Range) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Begin)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.End)) + return i, nil +} + +func (m *Value_Ranges) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Value_Ranges) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Range) > 0 { + for _, msg := range m.Range { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Value_Set) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Value_Set) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Item) > 0 { + for _, s := range m.Item { + dAtA[i] = 0xa + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + return i, nil +} + +func (m *Value_Text) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Value_Text) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + return i, nil +} + +func (m *Attribute) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Attribute) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + dAtA[i] = 0x10 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Type)) + if m.Scalar != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Scalar.ProtoSize())) + n41, err := m.Scalar.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n41 + } + if m.Ranges != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Ranges.ProtoSize())) + n42, err := m.Ranges.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n42 + } + if m.Text != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Text.ProtoSize())) + n43, err := m.Text.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n43 + } + if m.Set != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Set.ProtoSize())) + n44, err := m.Set.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n44 + } + return i, nil +} + +func (m *Resource) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Resource) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + if m.Type == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") + } else { + dAtA[i] = 0x10 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Type)) + } + if m.Scalar != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Scalar.ProtoSize())) + n45, err := m.Scalar.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n45 + } + if m.Ranges != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Ranges.ProtoSize())) + n46, err := m.Ranges.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n46 + } + if m.Set != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Set.ProtoSize())) + n47, err := m.Set.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n47 + } + if m.Role != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Role))) + i += copy(dAtA[i:], *m.Role) + } + if m.Disk != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Disk.ProtoSize())) + n48, err := m.Disk.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n48 + } + if m.Reservation != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Reservation.ProtoSize())) + n49, err := m.Reservation.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n49 + } + if m.Revocable != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Revocable.ProtoSize())) + n50, err := m.Revocable.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n50 + } + if m.Shared != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Shared.ProtoSize())) + n51, err := m.Shared.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n51 + } + if m.AllocationInfo != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.AllocationInfo.ProtoSize())) + n52, err := m.AllocationInfo.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n52 + } + if m.ProviderID != nil { + dAtA[i] = 0x62 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.ProviderID.ProtoSize())) + n53, err := m.ProviderID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n53 + } + if len(m.Reservations) > 0 { + for _, msg := range m.Reservations { + dAtA[i] = 0x6a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Resource_AllocationInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Resource_AllocationInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Role != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Role))) + i += copy(dAtA[i:], *m.Role) + } + return i, nil +} + +func (m *Resource_ReservationInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Resource_ReservationInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Principal != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Principal))) + i += copy(dAtA[i:], *m.Principal) + } + if m.Labels != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Labels.ProtoSize())) + n54, err := m.Labels.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n54 + } + if m.Role != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Role))) + i += copy(dAtA[i:], *m.Role) + } + if m.Type != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Type)) + } + return i, nil +} + +func (m *Resource_DiskInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Resource_DiskInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Persistence != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Persistence.ProtoSize())) + n55, err := m.Persistence.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n55 + } + if m.Volume != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Volume.ProtoSize())) + n56, err := m.Volume.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n56 + } + if m.Source != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Source.ProtoSize())) + n57, err := m.Source.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n57 + } + return i, nil +} + +func (m *Resource_DiskInfo_Persistence) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Resource_DiskInfo_Persistence) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.ID))) + i += copy(dAtA[i:], m.ID) + if m.Principal != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Principal))) + i += copy(dAtA[i:], *m.Principal) + } + return i, nil +} + +func (m *Resource_DiskInfo_Source) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Resource_DiskInfo_Source) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Type)) + if m.Path != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Path.ProtoSize())) + n58, err := m.Path.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n58 + } + if m.Mount != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Mount.ProtoSize())) + n59, err := m.Mount.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n59 + } + if m.ID != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.ID))) + i += copy(dAtA[i:], *m.ID) + } + if m.Metadata != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Metadata.ProtoSize())) + n60, err := m.Metadata.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n60 + } + if m.Profile != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Profile))) + i += copy(dAtA[i:], *m.Profile) + } + return i, nil +} + +func (m *Resource_DiskInfo_Source_Path) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Resource_DiskInfo_Source_Path) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Root != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Root))) + i += copy(dAtA[i:], *m.Root) + } + return i, nil +} + +func (m *Resource_DiskInfo_Source_Mount) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Resource_DiskInfo_Source_Mount) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Root != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Root))) + i += copy(dAtA[i:], *m.Root) + } + return i, nil +} + +func (m *Resource_RevocableInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Resource_RevocableInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *Resource_SharedInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Resource_SharedInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *TrafficControlStatistics) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TrafficControlStatistics) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.ID))) + i += copy(dAtA[i:], m.ID) + if m.Backlog != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Backlog)) + } + if m.Bytes != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Bytes)) + } + if m.Drops != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Drops)) + } + if m.Overlimits != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Overlimits)) + } + if m.Packets != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Packets)) + } + if m.Qlen != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Qlen)) + } + if m.RateBPS != nil { + dAtA[i] = 0x40 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.RateBPS)) + } + if m.RatePPS != nil { + dAtA[i] = 0x48 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.RatePPS)) + } + if m.Requeues != nil { + dAtA[i] = 0x50 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Requeues)) + } + return i, nil +} + +func (m *IpStatistics) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IpStatistics) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Forwarding != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Forwarding)) + } + if m.DefaultTTL != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.DefaultTTL)) + } + if m.InReceives != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InReceives)) + } + if m.InHdrErrors != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InHdrErrors)) + } + if m.InAddrErrors != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InAddrErrors)) + } + if m.ForwDatagrams != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.ForwDatagrams)) + } + if m.InUnknownProtos != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InUnknownProtos)) + } + if m.InDiscards != nil { + dAtA[i] = 0x40 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InDiscards)) + } + if m.InDelivers != nil { + dAtA[i] = 0x48 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InDelivers)) + } + if m.OutRequests != nil { + dAtA[i] = 0x50 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.OutRequests)) + } + if m.OutDiscards != nil { + dAtA[i] = 0x58 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.OutDiscards)) + } + if m.OutNoRoutes != nil { + dAtA[i] = 0x60 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.OutNoRoutes)) + } + if m.ReasmTimeout != nil { + dAtA[i] = 0x68 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.ReasmTimeout)) + } + if m.ReasmReqds != nil { + dAtA[i] = 0x70 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.ReasmReqds)) + } + if m.ReasmOKs != nil { + dAtA[i] = 0x78 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.ReasmOKs)) + } + if m.ReasmFails != nil { + dAtA[i] = 0x80 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.ReasmFails)) + } + if m.FragOKs != nil { + dAtA[i] = 0x88 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.FragOKs)) + } + if m.FragFails != nil { + dAtA[i] = 0x90 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.FragFails)) + } + if m.FragCreates != nil { + dAtA[i] = 0x98 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.FragCreates)) + } + return i, nil +} + +func (m *IcmpStatistics) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *IcmpStatistics) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.InMsgs != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InMsgs)) + } + if m.InErrors != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InErrors)) + } + if m.InCsumErrors != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InCsumErrors)) + } + if m.InDestUnreachs != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InDestUnreachs)) + } + if m.InTimeExcds != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InTimeExcds)) + } + if m.InParmProbs != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InParmProbs)) + } + if m.InSrcQuenchs != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InSrcQuenchs)) + } + if m.InRedirects != nil { + dAtA[i] = 0x40 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InRedirects)) + } + if m.InEchos != nil { + dAtA[i] = 0x48 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InEchos)) + } + if m.InEchoReps != nil { + dAtA[i] = 0x50 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InEchoReps)) + } + if m.InTimestamps != nil { + dAtA[i] = 0x58 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InTimestamps)) + } + if m.InTimestampReps != nil { + dAtA[i] = 0x60 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InTimestampReps)) + } + if m.InAddrMasks != nil { + dAtA[i] = 0x68 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InAddrMasks)) + } + if m.InAddrMaskReps != nil { + dAtA[i] = 0x70 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InAddrMaskReps)) + } + if m.OutMsgs != nil { + dAtA[i] = 0x78 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.OutMsgs)) + } + if m.OutErrors != nil { + dAtA[i] = 0x80 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.OutErrors)) + } + if m.OutDestUnreachs != nil { + dAtA[i] = 0x88 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.OutDestUnreachs)) + } + if m.OutTimeExcds != nil { + dAtA[i] = 0x90 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.OutTimeExcds)) + } + if m.OutParmProbs != nil { + dAtA[i] = 0x98 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.OutParmProbs)) + } + if m.OutSrcQuenchs != nil { + dAtA[i] = 0xa0 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.OutSrcQuenchs)) + } + if m.OutRedirects != nil { + dAtA[i] = 0xa8 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.OutRedirects)) + } + if m.OutEchos != nil { + dAtA[i] = 0xb0 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.OutEchos)) + } + if m.OutEchoReps != nil { + dAtA[i] = 0xb8 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.OutEchoReps)) + } + if m.OutTimestamps != nil { + dAtA[i] = 0xc0 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.OutTimestamps)) + } + if m.OutTimestampReps != nil { + dAtA[i] = 0xc8 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.OutTimestampReps)) + } + if m.OutAddrMasks != nil { + dAtA[i] = 0xd0 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.OutAddrMasks)) + } + if m.OutAddrMaskReps != nil { + dAtA[i] = 0xd8 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.OutAddrMaskReps)) + } + return i, nil +} + +func (m *TcpStatistics) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TcpStatistics) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.RtoAlgorithm != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.RtoAlgorithm)) + } + if m.RtoMin != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.RtoMin)) + } + if m.RtoMax != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.RtoMax)) + } + if m.MaxConn != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.MaxConn)) + } + if m.ActiveOpens != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.ActiveOpens)) + } + if m.PassiveOpens != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.PassiveOpens)) + } + if m.AttemptFails != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.AttemptFails)) + } + if m.EstabResets != nil { + dAtA[i] = 0x40 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.EstabResets)) + } + if m.CurrEstab != nil { + dAtA[i] = 0x48 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.CurrEstab)) + } + if m.InSegs != nil { + dAtA[i] = 0x50 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InSegs)) + } + if m.OutSegs != nil { + dAtA[i] = 0x58 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.OutSegs)) + } + if m.RetransSegs != nil { + dAtA[i] = 0x60 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.RetransSegs)) + } + if m.InErrs != nil { + dAtA[i] = 0x68 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InErrs)) + } + if m.OutRsts != nil { + dAtA[i] = 0x70 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.OutRsts)) + } + if m.InCsumErrors != nil { + dAtA[i] = 0x78 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InCsumErrors)) + } + return i, nil +} + +func (m *UdpStatistics) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UdpStatistics) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.InDatagrams != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InDatagrams)) + } + if m.NoPorts != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.NoPorts)) + } + if m.InErrors != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InErrors)) + } + if m.OutDatagrams != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.OutDatagrams)) + } + if m.RcvbufErrors != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.RcvbufErrors)) + } + if m.SndbufErrors != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.SndbufErrors)) + } + if m.InCsumErrors != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.InCsumErrors)) + } + if m.IgnoredMulti != nil { + dAtA[i] = 0x40 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.IgnoredMulti)) + } + return i, nil +} + +func (m *SNMPStatistics) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *SNMPStatistics) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.IPStats != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.IPStats.ProtoSize())) + n61, err := m.IPStats.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n61 + } + if m.ICMPStats != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.ICMPStats.ProtoSize())) + n62, err := m.ICMPStats.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n62 + } + if m.TCPStats != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.TCPStats.ProtoSize())) + n63, err := m.TCPStats.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n63 + } + if m.UDPStats != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.UDPStats.ProtoSize())) + n64, err := m.UDPStats.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n64 + } + return i, nil +} + +func (m *DiskStatistics) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DiskStatistics) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Source != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Source.ProtoSize())) + n65, err := m.Source.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n65 + } + if m.Persistence != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Persistence.ProtoSize())) + n66, err := m.Persistence.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n66 + } + if m.LimitBytes != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.LimitBytes)) + } + if m.UsedBytes != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.UsedBytes)) + } + return i, nil +} + +func (m *ResourceStatistics) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceStatistics) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x9 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(m.Timestamp)))) + if m.CPUsUserTimeSecs != nil { + dAtA[i] = 0x11 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.CPUsUserTimeSecs)))) + } + if m.CPUsSystemTimeSecs != nil { + dAtA[i] = 0x19 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.CPUsSystemTimeSecs)))) + } + if m.CPUsLimit != nil { + dAtA[i] = 0x21 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.CPUsLimit)))) + } + if m.MemRSSBytes != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.MemRSSBytes)) + } + if m.MemLimitBytes != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.MemLimitBytes)) + } + if m.CPUsNrPeriods != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.CPUsNrPeriods)) + } + if m.CPUsNrThrottled != nil { + dAtA[i] = 0x40 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.CPUsNrThrottled)) + } + if m.CPUsThrottledTimeSecs != nil { + dAtA[i] = 0x49 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.CPUsThrottledTimeSecs)))) + } + if m.MemFileBytes != nil { + dAtA[i] = 0x50 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.MemFileBytes)) + } + if m.MemAnonBytes != nil { + dAtA[i] = 0x58 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.MemAnonBytes)) + } + if m.MemMappedFileBytes != nil { + dAtA[i] = 0x60 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.MemMappedFileBytes)) + } + if m.Perf != nil { + dAtA[i] = 0x6a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Perf.ProtoSize())) + n67, err := m.Perf.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n67 + } + if m.NetRxPackets != nil { + dAtA[i] = 0x70 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.NetRxPackets)) + } + if m.NetRxBytes != nil { + dAtA[i] = 0x78 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.NetRxBytes)) + } + if m.NetRxErrors != nil { + dAtA[i] = 0x80 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.NetRxErrors)) + } + if m.NetRxDropped != nil { + dAtA[i] = 0x88 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.NetRxDropped)) + } + if m.NetTxPackets != nil { + dAtA[i] = 0x90 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.NetTxPackets)) + } + if m.NetTxBytes != nil { + dAtA[i] = 0x98 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.NetTxBytes)) + } + if m.NetTxErrors != nil { + dAtA[i] = 0xa0 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.NetTxErrors)) + } + if m.NetTxDropped != nil { + dAtA[i] = 0xa8 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.NetTxDropped)) + } + if m.NetTCPRttMicrosecsP50 != nil { + dAtA[i] = 0xb1 + i++ + dAtA[i] = 0x1 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.NetTCPRttMicrosecsP50)))) + } + if m.NetTCPRttMicrosecsP90 != nil { + dAtA[i] = 0xb9 + i++ + dAtA[i] = 0x1 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.NetTCPRttMicrosecsP90)))) + } + if m.NetTCPRttMicrosecsP95 != nil { + dAtA[i] = 0xc1 + i++ + dAtA[i] = 0x1 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.NetTCPRttMicrosecsP95)))) + } + if m.NetTCPRttMicrosecsP99 != nil { + dAtA[i] = 0xc9 + i++ + dAtA[i] = 0x1 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.NetTCPRttMicrosecsP99)))) + } + if m.DiskLimitBytes != nil { + dAtA[i] = 0xd0 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.DiskLimitBytes)) + } + if m.DiskUsedBytes != nil { + dAtA[i] = 0xd8 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.DiskUsedBytes)) + } + if m.NetTCPActiveConnections != nil { + dAtA[i] = 0xe1 + i++ + dAtA[i] = 0x1 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.NetTCPActiveConnections)))) + } + if m.NetTCPTimeWaitConnections != nil { + dAtA[i] = 0xe9 + i++ + dAtA[i] = 0x1 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.NetTCPTimeWaitConnections)))) + } + if m.Processes != nil { + dAtA[i] = 0xf0 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Processes)) + } + if m.Threads != nil { + dAtA[i] = 0xf8 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Threads)) + } + if m.MemLowPressureCounter != nil { + dAtA[i] = 0x80 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.MemLowPressureCounter)) + } + if m.MemMediumPressureCounter != nil { + dAtA[i] = 0x88 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.MemMediumPressureCounter)) + } + if m.MemCriticalPressureCounter != nil { + dAtA[i] = 0x90 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.MemCriticalPressureCounter)) + } + if len(m.NetTrafficControlStatistics) > 0 { + for _, msg := range m.NetTrafficControlStatistics { + dAtA[i] = 0x9a + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.MemTotalBytes != nil { + dAtA[i] = 0xa0 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.MemTotalBytes)) + } + if m.MemTotalMemswBytes != nil { + dAtA[i] = 0xa8 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.MemTotalMemswBytes)) + } + if m.MemSoftLimitBytes != nil { + dAtA[i] = 0xb0 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.MemSoftLimitBytes)) + } + if m.MemCacheBytes != nil { + dAtA[i] = 0xb8 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.MemCacheBytes)) + } + if m.MemSwapBytes != nil { + dAtA[i] = 0xc0 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.MemSwapBytes)) + } + if m.MemUnevictableBytes != nil { + dAtA[i] = 0xc8 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.MemUnevictableBytes)) + } + if m.NetSNMPStatistics != nil { + dAtA[i] = 0xd2 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.NetSNMPStatistics.ProtoSize())) + n68, err := m.NetSNMPStatistics.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n68 + } + if len(m.DiskStatistics) > 0 { + for _, msg := range m.DiskStatistics { + dAtA[i] = 0xda + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.BlkioStatistics != nil { + dAtA[i] = 0xe2 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.BlkioStatistics.ProtoSize())) + n69, err := m.BlkioStatistics.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n69 + } + return i, nil +} + +func (m *ResourceUsage) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceUsage) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Executors) > 0 { + for _, msg := range m.Executors { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Total) > 0 { + for _, msg := range m.Total { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ResourceUsage_Executor) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceUsage_Executor) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.ExecutorInfo.ProtoSize())) + n70, err := m.ExecutorInfo.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n70 + if len(m.Allocated) > 0 { + for _, msg := range m.Allocated { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Statistics != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Statistics.ProtoSize())) + n71, err := m.Statistics.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n71 + } + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.ContainerID.ProtoSize())) + n72, err := m.ContainerID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n72 + if len(m.Tasks) > 0 { + for _, msg := range m.Tasks { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *ResourceUsage_Executor_Task) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ResourceUsage_Executor_Task) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.ID.ProtoSize())) + n73, err := m.ID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n73 + if len(m.Resources) > 0 { + for _, msg := range m.Resources { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Labels != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Labels.ProtoSize())) + n74, err := m.Labels.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n74 + } + return i, nil +} + +func (m *PerfStatistics) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PerfStatistics) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x9 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(m.Timestamp)))) + dAtA[i] = 0x11 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(m.Duration)))) + if m.Cycles != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Cycles)) + } + if m.StalledCyclesFrontend != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.StalledCyclesFrontend)) + } + if m.StalledCyclesBackend != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.StalledCyclesBackend)) + } + if m.Instructions != nil { + dAtA[i] = 0x30 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Instructions)) + } + if m.CacheReferences != nil { + dAtA[i] = 0x38 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.CacheReferences)) + } + if m.CacheMisses != nil { + dAtA[i] = 0x40 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.CacheMisses)) + } + if m.Branches != nil { + dAtA[i] = 0x48 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Branches)) + } + if m.BranchMisses != nil { + dAtA[i] = 0x50 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.BranchMisses)) + } + if m.BusCycles != nil { + dAtA[i] = 0x58 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.BusCycles)) + } + if m.RefCycles != nil { + dAtA[i] = 0x60 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.RefCycles)) + } + if m.CPUClock != nil { + dAtA[i] = 0x69 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.CPUClock)))) + } + if m.TaskClock != nil { + dAtA[i] = 0x71 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.TaskClock)))) + } + if m.PageFaults != nil { + dAtA[i] = 0x78 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.PageFaults)) + } + if m.MinorFaults != nil { + dAtA[i] = 0x80 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.MinorFaults)) + } + if m.MajorFaults != nil { + dAtA[i] = 0x88 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.MajorFaults)) + } + if m.ContextSwitches != nil { + dAtA[i] = 0x90 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.ContextSwitches)) + } + if m.CPUMigrations != nil { + dAtA[i] = 0x98 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.CPUMigrations)) + } + if m.AlignmentFaults != nil { + dAtA[i] = 0xa0 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.AlignmentFaults)) + } + if m.EmulationFaults != nil { + dAtA[i] = 0xa8 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.EmulationFaults)) + } + if m.L1DcacheLoads != nil { + dAtA[i] = 0xb0 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.L1DcacheLoads)) + } + if m.L1DcacheLoadMisses != nil { + dAtA[i] = 0xb8 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.L1DcacheLoadMisses)) + } + if m.L1DcacheStores != nil { + dAtA[i] = 0xc0 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.L1DcacheStores)) + } + if m.L1DcacheStoreMisses != nil { + dAtA[i] = 0xc8 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.L1DcacheStoreMisses)) + } + if m.L1DcachePrefetches != nil { + dAtA[i] = 0xd0 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.L1DcachePrefetches)) + } + if m.L1DcachePrefetchMisses != nil { + dAtA[i] = 0xd8 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.L1DcachePrefetchMisses)) + } + if m.L1IcacheLoads != nil { + dAtA[i] = 0xe0 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.L1IcacheLoads)) + } + if m.L1IcacheLoadMisses != nil { + dAtA[i] = 0xe8 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.L1IcacheLoadMisses)) + } + if m.L1IcachePrefetches != nil { + dAtA[i] = 0xf0 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.L1IcachePrefetches)) + } + if m.L1IcachePrefetchMisses != nil { + dAtA[i] = 0xf8 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.L1IcachePrefetchMisses)) + } + if m.LLCLoads != nil { + dAtA[i] = 0x80 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.LLCLoads)) + } + if m.LLCLoadMisses != nil { + dAtA[i] = 0x88 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.LLCLoadMisses)) + } + if m.LLCStores != nil { + dAtA[i] = 0x90 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.LLCStores)) + } + if m.LLCStoreMisses != nil { + dAtA[i] = 0x98 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.LLCStoreMisses)) + } + if m.LLCPrefetches != nil { + dAtA[i] = 0xa0 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.LLCPrefetches)) + } + if m.LLCPrefetchMisses != nil { + dAtA[i] = 0xa8 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.LLCPrefetchMisses)) + } + if m.DTLBLoads != nil { + dAtA[i] = 0xb0 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.DTLBLoads)) + } + if m.DTLBLoadMisses != nil { + dAtA[i] = 0xb8 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.DTLBLoadMisses)) + } + if m.DTLBStores != nil { + dAtA[i] = 0xc0 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.DTLBStores)) + } + if m.DTLBStoreMisses != nil { + dAtA[i] = 0xc8 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.DTLBStoreMisses)) + } + if m.DTLBPrefetches != nil { + dAtA[i] = 0xd0 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.DTLBPrefetches)) + } + if m.DTLBPrefetchMisses != nil { + dAtA[i] = 0xd8 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.DTLBPrefetchMisses)) + } + if m.ITLBLoads != nil { + dAtA[i] = 0xe0 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.ITLBLoads)) + } + if m.ITLBLoadMisses != nil { + dAtA[i] = 0xe8 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.ITLBLoadMisses)) + } + if m.BranchLoads != nil { + dAtA[i] = 0xf0 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.BranchLoads)) + } + if m.BranchLoadMisses != nil { + dAtA[i] = 0xf8 + i++ + dAtA[i] = 0x2 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.BranchLoadMisses)) + } + if m.NodeLoads != nil { + dAtA[i] = 0x80 + i++ + dAtA[i] = 0x3 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.NodeLoads)) + } + if m.NodeLoadMisses != nil { + dAtA[i] = 0x88 + i++ + dAtA[i] = 0x3 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.NodeLoadMisses)) + } + if m.NodeStores != nil { + dAtA[i] = 0x90 + i++ + dAtA[i] = 0x3 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.NodeStores)) + } + if m.NodeStoreMisses != nil { + dAtA[i] = 0x98 + i++ + dAtA[i] = 0x3 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.NodeStoreMisses)) + } + if m.NodePrefetches != nil { + dAtA[i] = 0xa0 + i++ + dAtA[i] = 0x3 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.NodePrefetches)) + } + if m.NodePrefetchMisses != nil { + dAtA[i] = 0xa8 + i++ + dAtA[i] = 0x3 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.NodePrefetchMisses)) + } + return i, nil +} + +func (m *Request) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Request) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.AgentID != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.AgentID.ProtoSize())) + n75, err := m.AgentID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n75 + } + if len(m.Resources) > 0 { + for _, msg := range m.Resources { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Offer) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Offer) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.ID.ProtoSize())) + n76, err := m.ID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n76 + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.FrameworkID.ProtoSize())) + n77, err := m.FrameworkID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n77 + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.AgentID.ProtoSize())) + n78, err := m.AgentID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n78 + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Hostname))) + i += copy(dAtA[i:], m.Hostname) + if len(m.Resources) > 0 { + for _, msg := range m.Resources { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.ExecutorIDs) > 0 { + for _, msg := range m.ExecutorIDs { + dAtA[i] = 0x32 + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Attributes) > 0 { + for _, msg := range m.Attributes { + dAtA[i] = 0x3a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.URL != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.URL.ProtoSize())) + n79, err := m.URL.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n79 + } + if m.Unavailability != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Unavailability.ProtoSize())) + n80, err := m.Unavailability.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n80 + } + if m.AllocationInfo != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.AllocationInfo.ProtoSize())) + n81, err := m.AllocationInfo.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n81 + } + if m.Domain != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Domain.ProtoSize())) + n82, err := m.Domain.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n82 + } + return i, nil +} + +func (m *Offer_Operation) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Offer_Operation) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Type)) + if m.Launch != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Launch.ProtoSize())) + n83, err := m.Launch.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n83 + } + if m.Reserve != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Reserve.ProtoSize())) + n84, err := m.Reserve.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n84 + } + if m.Unreserve != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Unreserve.ProtoSize())) + n85, err := m.Unreserve.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n85 + } + if m.Create != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Create.ProtoSize())) + n86, err := m.Create.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n86 + } + if m.Destroy != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Destroy.ProtoSize())) + n87, err := m.Destroy.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n87 + } + if m.LaunchGroup != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.LaunchGroup.ProtoSize())) + n88, err := m.LaunchGroup.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n88 + } + if m.CreateVolume != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.CreateVolume.ProtoSize())) + n89, err := m.CreateVolume.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n89 + } + if m.DestroyVolume != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.DestroyVolume.ProtoSize())) + n90, err := m.DestroyVolume.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n90 + } + if m.CreateBlock != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.CreateBlock.ProtoSize())) + n91, err := m.CreateBlock.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n91 + } + if m.DestroyBlock != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.DestroyBlock.ProtoSize())) + n92, err := m.DestroyBlock.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n92 + } + if m.ID != nil { + dAtA[i] = 0x62 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.ID.ProtoSize())) + n93, err := m.ID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n93 + } + return i, nil +} + +func (m *Offer_Operation_Launch) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Offer_Operation_Launch) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.TaskInfos) > 0 { + for _, msg := range m.TaskInfos { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Offer_Operation_LaunchGroup) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Offer_Operation_LaunchGroup) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Executor.ProtoSize())) + n94, err := m.Executor.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n94 + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.TaskGroup.ProtoSize())) + n95, err := m.TaskGroup.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n95 + return i, nil +} + +func (m *Offer_Operation_Reserve) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Offer_Operation_Reserve) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Resources) > 0 { + for _, msg := range m.Resources { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Offer_Operation_Unreserve) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Offer_Operation_Unreserve) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Resources) > 0 { + for _, msg := range m.Resources { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Offer_Operation_Create) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Offer_Operation_Create) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Volumes) > 0 { + for _, msg := range m.Volumes { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Offer_Operation_Destroy) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Offer_Operation_Destroy) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Volumes) > 0 { + for _, msg := range m.Volumes { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Offer_Operation_CreateVolume) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Offer_Operation_CreateVolume) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Source.ProtoSize())) + n96, err := m.Source.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n96 + dAtA[i] = 0x10 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.TargetType)) + return i, nil +} + +func (m *Offer_Operation_DestroyVolume) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Offer_Operation_DestroyVolume) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Volume.ProtoSize())) + n97, err := m.Volume.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n97 + return i, nil +} + +func (m *Offer_Operation_CreateBlock) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Offer_Operation_CreateBlock) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Source.ProtoSize())) + n98, err := m.Source.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n98 + return i, nil +} + +func (m *Offer_Operation_DestroyBlock) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Offer_Operation_DestroyBlock) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Block.ProtoSize())) + n99, err := m.Block.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n99 + return i, nil +} + +func (m *InverseOffer) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *InverseOffer) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.OfferID.ProtoSize())) + n100, err := m.OfferID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n100 + if m.URL != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.URL.ProtoSize())) + n101, err := m.URL.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n101 + } + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.FrameworkID.ProtoSize())) + n102, err := m.FrameworkID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n102 + if m.AgentID != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.AgentID.ProtoSize())) + n103, err := m.AgentID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n103 + } + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Unavailability.ProtoSize())) + n104, err := m.Unavailability.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n104 + if len(m.Resources) > 0 { + for _, msg := range m.Resources { + dAtA[i] = 0x32 + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *TaskInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TaskInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.TaskID.ProtoSize())) + n105, err := m.TaskID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n105 + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.AgentID.ProtoSize())) + n106, err := m.AgentID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n106 + if len(m.Resources) > 0 { + for _, msg := range m.Resources { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Executor != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Executor.ProtoSize())) + n107, err := m.Executor.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n107 + } + if m.Data != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Data))) + i += copy(dAtA[i:], m.Data) + } + if m.Command != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Command.ProtoSize())) + n108, err := m.Command.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n108 + } + if m.HealthCheck != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.HealthCheck.ProtoSize())) + n109, err := m.HealthCheck.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n109 + } + if m.Container != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Container.ProtoSize())) + n110, err := m.Container.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n110 + } + if m.Labels != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Labels.ProtoSize())) + n111, err := m.Labels.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n111 + } + if m.Discovery != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Discovery.ProtoSize())) + n112, err := m.Discovery.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n112 + } + if m.KillPolicy != nil { + dAtA[i] = 0x62 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.KillPolicy.ProtoSize())) + n113, err := m.KillPolicy.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n113 + } + if m.Check != nil { + dAtA[i] = 0x6a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Check.ProtoSize())) + n114, err := m.Check.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n114 + } + return i, nil +} + +func (m *TaskGroupInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TaskGroupInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Tasks) > 0 { + for _, msg := range m.Tasks { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Task) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Task) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.TaskID.ProtoSize())) + n115, err := m.TaskID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n115 + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.FrameworkID.ProtoSize())) + n116, err := m.FrameworkID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n116 + if m.ExecutorID != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.ExecutorID.ProtoSize())) + n117, err := m.ExecutorID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n117 + } + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.AgentID.ProtoSize())) + n118, err := m.AgentID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n118 + if m.State == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("state") + } else { + dAtA[i] = 0x30 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.State)) + } + if len(m.Resources) > 0 { + for _, msg := range m.Resources { + dAtA[i] = 0x3a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Statuses) > 0 { + for _, msg := range m.Statuses { + dAtA[i] = 0x42 + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.StatusUpdateState != nil { + dAtA[i] = 0x48 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.StatusUpdateState)) + } + if m.StatusUpdateUUID != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.StatusUpdateUUID))) + i += copy(dAtA[i:], m.StatusUpdateUUID) + } + if m.Labels != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Labels.ProtoSize())) + n119, err := m.Labels.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n119 + } + if m.Discovery != nil { + dAtA[i] = 0x62 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Discovery.ProtoSize())) + n120, err := m.Discovery.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n120 + } + if m.Container != nil { + dAtA[i] = 0x6a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Container.ProtoSize())) + n121, err := m.Container.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n121 + } + if m.User != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.User))) + i += copy(dAtA[i:], *m.User) + } + return i, nil +} + +func (m *TaskResourceLimitation) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TaskResourceLimitation) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Resources) > 0 { + for _, msg := range m.Resources { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *UUID) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *UUID) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Value == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } else { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + } + return i, nil +} + +func (m *Operation) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Operation) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.FrameworkID != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.FrameworkID.ProtoSize())) + n122, err := m.FrameworkID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n122 + } + if m.AgentID != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.AgentID.ProtoSize())) + n123, err := m.AgentID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n123 + } + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Info.ProtoSize())) + n124, err := m.Info.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n124 + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.LatestStatus.ProtoSize())) + n125, err := m.LatestStatus.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n125 + if len(m.Statuses) > 0 { + for _, msg := range m.Statuses { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + dAtA[i] = 0x32 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.UUID.ProtoSize())) + n126, err := m.UUID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n126 + return i, nil +} + +func (m *OperationStatus) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OperationStatus) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.OperationID != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.OperationID.ProtoSize())) + n127, err := m.OperationID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n127 + } + dAtA[i] = 0x10 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.State)) + if m.Message != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Message))) + i += copy(dAtA[i:], *m.Message) + } + if len(m.ConvertedResources) > 0 { + for _, msg := range m.ConvertedResources { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.UUID != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.UUID.ProtoSize())) + n128, err := m.UUID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n128 + } + return i, nil +} + +func (m *CheckStatusInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CheckStatusInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Type != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Type)) + } + if m.Command != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Command.ProtoSize())) + n129, err := m.Command.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n129 + } + if m.HTTP != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.HTTP.ProtoSize())) + n130, err := m.HTTP.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n130 + } + if m.TCP != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.TCP.ProtoSize())) + n131, err := m.TCP.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n131 + } + return i, nil +} + +func (m *CheckStatusInfo_Command) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CheckStatusInfo_Command) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ExitCode != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.ExitCode)) + } + return i, nil +} + +func (m *CheckStatusInfo_Http) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CheckStatusInfo_Http) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.StatusCode != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.StatusCode)) + } + return i, nil +} + +func (m *CheckStatusInfo_Tcp) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CheckStatusInfo_Tcp) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Succeeded != nil { + dAtA[i] = 0x8 + i++ + if *m.Succeeded { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *TaskStatus) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TaskStatus) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.TaskID.ProtoSize())) + n132, err := m.TaskID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n132 + if m.State == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("state") + } else { + dAtA[i] = 0x10 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.State)) + } + if m.Data != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Data))) + i += copy(dAtA[i:], m.Data) + } + if m.Message != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Message))) + i += copy(dAtA[i:], *m.Message) + } + if m.AgentID != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.AgentID.ProtoSize())) + n133, err := m.AgentID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n133 + } + if m.Timestamp != nil { + dAtA[i] = 0x31 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.Timestamp)))) + } + if m.ExecutorID != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.ExecutorID.ProtoSize())) + n134, err := m.ExecutorID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n134 + } + if m.Healthy != nil { + dAtA[i] = 0x40 + i++ + if *m.Healthy { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Source != nil { + dAtA[i] = 0x48 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Source)) + } + if m.Reason != nil { + dAtA[i] = 0x50 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Reason)) + } + if m.UUID != nil { + dAtA[i] = 0x5a + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.UUID))) + i += copy(dAtA[i:], m.UUID) + } + if m.Labels != nil { + dAtA[i] = 0x62 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Labels.ProtoSize())) + n135, err := m.Labels.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n135 + } + if m.ContainerStatus != nil { + dAtA[i] = 0x6a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.ContainerStatus.ProtoSize())) + n136, err := m.ContainerStatus.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n136 + } + if m.UnreachableTime != nil { + dAtA[i] = 0x72 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.UnreachableTime.ProtoSize())) + n137, err := m.UnreachableTime.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n137 + } + if m.CheckStatus != nil { + dAtA[i] = 0x7a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.CheckStatus.ProtoSize())) + n138, err := m.CheckStatus.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n138 + } + if m.Limitation != nil { + dAtA[i] = 0x82 + i++ + dAtA[i] = 0x1 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Limitation.ProtoSize())) + n139, err := m.Limitation.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n139 + } + return i, nil +} + +func (m *Filters) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Filters) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.RefuseSeconds != nil { + dAtA[i] = 0x9 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.RefuseSeconds)))) + } + return i, nil +} + +func (m *Environment) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Environment) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Variables) > 0 { + for _, msg := range m.Variables { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Environment_Variable) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Environment_Variable) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + if m.Value != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Value))) + i += copy(dAtA[i:], *m.Value) + } + if m.Type != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Type)) + } + if m.Secret != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Secret.ProtoSize())) + n140, err := m.Secret.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n140 + } + return i, nil +} + +func (m *Parameter) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Parameter) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Key))) + i += copy(dAtA[i:], m.Key) + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Value))) + i += copy(dAtA[i:], m.Value) + return i, nil +} + +func (m *Parameters) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Parameters) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Parameter) > 0 { + for _, msg := range m.Parameter { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Credential) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Credential) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Principal))) + i += copy(dAtA[i:], m.Principal) + if m.Secret != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Secret))) + i += copy(dAtA[i:], *m.Secret) + } + return i, nil +} + +func (m *Credentials) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Credentials) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Credentials) > 0 { + for _, msg := range m.Credentials { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Secret) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Secret) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Type)) + if m.Reference != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Reference.ProtoSize())) + n141, err := m.Reference.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n141 + } + if m.Value != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Value.ProtoSize())) + n142, err := m.Value.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n142 + } + return i, nil +} + +func (m *Secret_Reference) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Secret_Reference) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + if m.Key != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Key))) + i += copy(dAtA[i:], *m.Key) + } + return i, nil +} + +func (m *Secret_Value) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Secret_Value) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Data == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("data") + } else { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Data))) + i += copy(dAtA[i:], m.Data) + } + return i, nil +} + +func (m *RateLimit) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RateLimit) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.QPS != nil { + dAtA[i] = 0x9 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.QPS)))) + } + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Principal))) + i += copy(dAtA[i:], m.Principal) + if m.Capacity != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Capacity)) + } + return i, nil +} + +func (m *RateLimits) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RateLimits) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Limits) > 0 { + for _, msg := range m.Limits { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.AggregateDefaultQPS != nil { + dAtA[i] = 0x11 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.AggregateDefaultQPS)))) + } + if m.AggregateDefaultCapacity != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.AggregateDefaultCapacity)) + } + return i, nil +} + +func (m *Image) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Image) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Type == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") + } else { + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Type)) + } + if m.Appc != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Appc.ProtoSize())) + n143, err := m.Appc.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n143 + } + if m.Docker != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Docker.ProtoSize())) + n144, err := m.Docker.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n144 + } + if m.Cached != nil { + dAtA[i] = 0x20 + i++ + if *m.Cached { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *Image_Appc) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Image_Appc) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + if m.ID != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.ID))) + i += copy(dAtA[i:], *m.ID) + } + if m.Labels != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Labels.ProtoSize())) + n145, err := m.Labels.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n145 + } + return i, nil +} + +func (m *Image_Docker) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Image_Docker) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + if m.Credential != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Credential.ProtoSize())) + n146, err := m.Credential.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n146 + } + if m.Config != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Config.ProtoSize())) + n147, err := m.Config.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n147 + } + return i, nil +} + +func (m *MountPropagation) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MountPropagation) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Mode != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Mode)) + } + return i, nil +} + +func (m *Volume) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Volume) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.ContainerPath))) + i += copy(dAtA[i:], m.ContainerPath) + if m.HostPath != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.HostPath))) + i += copy(dAtA[i:], *m.HostPath) + } + if m.Mode == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("mode") + } else { + dAtA[i] = 0x18 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Mode)) + } + if m.Image != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Image.ProtoSize())) + n148, err := m.Image.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n148 + } + if m.Source != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Source.ProtoSize())) + n149, err := m.Source.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n149 + } + return i, nil +} + +func (m *Volume_Source) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Volume_Source) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Type)) + if m.DockerVolume != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.DockerVolume.ProtoSize())) + n150, err := m.DockerVolume.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n150 + } + if m.SandboxPath != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.SandboxPath.ProtoSize())) + n151, err := m.SandboxPath.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n151 + } + if m.Secret != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Secret.ProtoSize())) + n152, err := m.Secret.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n152 + } + if m.HostPath != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.HostPath.ProtoSize())) + n153, err := m.HostPath.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n153 + } + return i, nil +} + +func (m *Volume_Source_DockerVolume) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Volume_Source_DockerVolume) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Driver != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Driver))) + i += copy(dAtA[i:], *m.Driver) + } + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + if m.DriverOptions != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.DriverOptions.ProtoSize())) + n154, err := m.DriverOptions.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n154 + } + return i, nil +} + +func (m *Volume_Source_HostPath) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Volume_Source_HostPath) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Path))) + i += copy(dAtA[i:], m.Path) + if m.MountPropagation != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.MountPropagation.ProtoSize())) + n155, err := m.MountPropagation.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n155 + } + return i, nil +} + +func (m *Volume_Source_SandboxPath) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Volume_Source_SandboxPath) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Type)) + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Path))) + i += copy(dAtA[i:], m.Path) + return i, nil +} + +func (m *NetworkInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NetworkInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Groups) > 0 { + for _, s := range m.Groups { + dAtA[i] = 0x1a + i++ + l = len(s) + for l >= 1<<7 { + dAtA[i] = uint8(uint64(l)&0x7f | 0x80) + l >>= 7 + i++ + } + dAtA[i] = uint8(l) + i++ + i += copy(dAtA[i:], s) + } + } + if m.Labels != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Labels.ProtoSize())) + n156, err := m.Labels.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n156 + } + if len(m.IPAddresses) > 0 { + for _, msg := range m.IPAddresses { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Name != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Name))) + i += copy(dAtA[i:], *m.Name) + } + if len(m.PortMappings) > 0 { + for _, msg := range m.PortMappings { + dAtA[i] = 0x3a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *NetworkInfo_IPAddress) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NetworkInfo_IPAddress) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Protocol != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Protocol)) + } + if m.IPAddress != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.IPAddress))) + i += copy(dAtA[i:], *m.IPAddress) + } + return i, nil +} + +func (m *NetworkInfo_PortMapping) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NetworkInfo_PortMapping) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.HostPort)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.ContainerPort)) + if m.Protocol != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Protocol))) + i += copy(dAtA[i:], *m.Protocol) + } + return i, nil +} + +func (m *CapabilityInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CapabilityInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Capabilities) > 0 { + for _, num := range m.Capabilities { + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(num)) + } + } + return i, nil +} + +func (m *LinuxInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *LinuxInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.CapabilityInfo != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.CapabilityInfo.ProtoSize())) + n157, err := m.CapabilityInfo.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n157 + } + if m.BoundingCapabilities != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.BoundingCapabilities.ProtoSize())) + n158, err := m.BoundingCapabilities.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n158 + } + if m.EffectiveCapabilities != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.EffectiveCapabilities.ProtoSize())) + n159, err := m.EffectiveCapabilities.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n159 + } + if m.SharePIDNamespace != nil { + dAtA[i] = 0x20 + i++ + if *m.SharePIDNamespace { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *RLimitInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RLimitInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Rlimits) > 0 { + for _, msg := range m.Rlimits { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *RLimitInfo_RLimit) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *RLimitInfo_RLimit) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Type)) + if m.Hard != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Hard)) + } + if m.Soft != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Soft)) + } + return i, nil +} + +func (m *TTYInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TTYInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.WindowSize != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.WindowSize.ProtoSize())) + n160, err := m.WindowSize.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n160 + } + return i, nil +} + +func (m *TTYInfo_WindowSize) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *TTYInfo_WindowSize) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Rows)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Columns)) + return i, nil +} + +func (m *ContainerInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContainerInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Type == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") + } else { + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Type)) + } + if len(m.Volumes) > 0 { + for _, msg := range m.Volumes { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Docker != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Docker.ProtoSize())) + n161, err := m.Docker.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n161 + } + if m.Hostname != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Hostname))) + i += copy(dAtA[i:], *m.Hostname) + } + if m.Mesos != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Mesos.ProtoSize())) + n162, err := m.Mesos.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n162 + } + if len(m.NetworkInfos) > 0 { + for _, msg := range m.NetworkInfos { + dAtA[i] = 0x3a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.LinuxInfo != nil { + dAtA[i] = 0x42 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.LinuxInfo.ProtoSize())) + n163, err := m.LinuxInfo.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n163 + } + if m.RlimitInfo != nil { + dAtA[i] = 0x4a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.RlimitInfo.ProtoSize())) + n164, err := m.RlimitInfo.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n164 + } + if m.TTYInfo != nil { + dAtA[i] = 0x52 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.TTYInfo.ProtoSize())) + n165, err := m.TTYInfo.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n165 + } + return i, nil +} + +func (m *ContainerInfo_DockerInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContainerInfo_DockerInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Image))) + i += copy(dAtA[i:], m.Image) + if m.Network != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Network)) + } + if len(m.PortMappings) > 0 { + for _, msg := range m.PortMappings { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.Privileged != nil { + dAtA[i] = 0x20 + i++ + if *m.Privileged { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if len(m.Parameters) > 0 { + for _, msg := range m.Parameters { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.ForcePullImage != nil { + dAtA[i] = 0x30 + i++ + if *m.ForcePullImage { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.VolumeDriver != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.VolumeDriver))) + i += copy(dAtA[i:], *m.VolumeDriver) + } + return i, nil +} + +func (m *ContainerInfo_DockerInfo_PortMapping) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContainerInfo_DockerInfo_PortMapping) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.HostPort)) + dAtA[i] = 0x10 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.ContainerPort)) + if m.Protocol != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Protocol))) + i += copy(dAtA[i:], *m.Protocol) + } + return i, nil +} + +func (m *ContainerInfo_MesosInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContainerInfo_MesosInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Image != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Image.ProtoSize())) + n166, err := m.Image.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n166 + } + return i, nil +} + +func (m *ContainerStatus) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ContainerStatus) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.NetworkInfos) > 0 { + for _, msg := range m.NetworkInfos { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if m.CgroupInfo != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.CgroupInfo.ProtoSize())) + n167, err := m.CgroupInfo.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n167 + } + if m.ExecutorPID != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.ExecutorPID)) + } + if m.ContainerID != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.ContainerID.ProtoSize())) + n168, err := m.ContainerID.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n168 + } + return i, nil +} + +func (m *CgroupInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CgroupInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.NetCLS != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.NetCLS.ProtoSize())) + n169, err := m.NetCLS.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n169 + } + return i, nil +} + +func (m *CgroupInfo_Blkio) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CgroupInfo_Blkio) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *CgroupInfo_Blkio_Value) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CgroupInfo_Blkio_Value) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Op != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Op)) + } + if m.Value != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Value)) + } + return i, nil +} + +func (m *CgroupInfo_Blkio_CFQ) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CgroupInfo_Blkio_CFQ) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *CgroupInfo_Blkio_CFQ_Statistics) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CgroupInfo_Blkio_CFQ_Statistics) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Device != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Device.ProtoSize())) + n170, err := m.Device.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n170 + } + if m.Sectors != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Sectors)) + } + if m.Time != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Time)) + } + if len(m.IOServiced) > 0 { + for _, msg := range m.IOServiced { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.IOServiceBytes) > 0 { + for _, msg := range m.IOServiceBytes { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.IOServiceTime) > 0 { + for _, msg := range m.IOServiceTime { + dAtA[i] = 0x32 + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.IOWaitTime) > 0 { + for _, msg := range m.IOWaitTime { + dAtA[i] = 0x3a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.IOMerged) > 0 { + for _, msg := range m.IOMerged { + dAtA[i] = 0x42 + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.IOQueued) > 0 { + for _, msg := range m.IOQueued { + dAtA[i] = 0x4a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *CgroupInfo_Blkio_Throttling) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CgroupInfo_Blkio_Throttling) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + return i, nil +} + +func (m *CgroupInfo_Blkio_Throttling_Statistics) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CgroupInfo_Blkio_Throttling_Statistics) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Device != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Device.ProtoSize())) + n171, err := m.Device.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n171 + } + if len(m.IOServiced) > 0 { + for _, msg := range m.IOServiced { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.IOServiceBytes) > 0 { + for _, msg := range m.IOServiceBytes { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *CgroupInfo_Blkio_Statistics) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CgroupInfo_Blkio_Statistics) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.CFQ) > 0 { + for _, msg := range m.CFQ { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.CFQRecursive) > 0 { + for _, msg := range m.CFQRecursive { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Throttling) > 0 { + for _, msg := range m.Throttling { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *CgroupInfo_NetCls) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *CgroupInfo_NetCls) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.ClassID != nil { + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.ClassID)) + } + return i, nil +} + +func (m *Labels) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Labels) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Labels) > 0 { + for _, msg := range m.Labels { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Label) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Label) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Key))) + i += copy(dAtA[i:], m.Key) + if m.Value != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Value))) + i += copy(dAtA[i:], *m.Value) + } + return i, nil +} + +func (m *Port) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Port) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Number)) + if m.Name != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Name))) + i += copy(dAtA[i:], *m.Name) + } + if m.Protocol != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Protocol))) + i += copy(dAtA[i:], *m.Protocol) + } + if m.Visibility != nil { + dAtA[i] = 0x20 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Visibility)) + } + if m.Labels != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Labels.ProtoSize())) + n172, err := m.Labels.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n172 + } + return i, nil +} + +func (m *Ports) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Ports) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.Ports) > 0 { + for _, msg := range m.Ports { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *DiscoveryInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DiscoveryInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Visibility)) + if m.Name != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Name))) + i += copy(dAtA[i:], *m.Name) + } + if m.Environment != nil { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Environment))) + i += copy(dAtA[i:], *m.Environment) + } + if m.Location != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Location))) + i += copy(dAtA[i:], *m.Location) + } + if m.Version != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Version))) + i += copy(dAtA[i:], *m.Version) + } + if m.Ports != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Ports.ProtoSize())) + n173, err := m.Ports.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n173 + } + if m.Labels != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Labels.ProtoSize())) + n174, err := m.Labels.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n174 + } + return i, nil +} + +func (m *WeightInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *WeightInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0x9 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(m.Weight)))) + if m.Role != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Role))) + i += copy(dAtA[i:], *m.Role) + } + return i, nil +} + +func (m *VersionInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *VersionInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Version))) + i += copy(dAtA[i:], m.Version) + if m.BuildDate != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.BuildDate))) + i += copy(dAtA[i:], *m.BuildDate) + } + if m.BuildTime != nil { + dAtA[i] = 0x19 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.BuildTime)))) + } + if m.BuildUser != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.BuildUser))) + i += copy(dAtA[i:], *m.BuildUser) + } + if m.GitSHA != nil { + dAtA[i] = 0x2a + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.GitSHA))) + i += copy(dAtA[i:], *m.GitSHA) + } + if m.GitBranch != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.GitBranch))) + i += copy(dAtA[i:], *m.GitBranch) + } + if m.GitTag != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.GitTag))) + i += copy(dAtA[i:], *m.GitTag) + } + return i, nil +} + +func (m *Flag) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Flag) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + if m.Value != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Value))) + i += copy(dAtA[i:], *m.Value) + } + return i, nil +} + +func (m *Role) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Role) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + dAtA[i] = 0x11 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(m.Weight)))) + if len(m.Frameworks) > 0 { + for _, msg := range m.Frameworks { + dAtA[i] = 0x1a + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + if len(m.Resources) > 0 { + for _, msg := range m.Resources { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func (m *Metric) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Metric) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Name))) + i += copy(dAtA[i:], m.Name) + if m.Value != nil { + dAtA[i] = 0x11 + i++ + i = encodeFixed64Mesos(dAtA, i, uint64(math.Float64bits(float64(*m.Value)))) + } + return i, nil +} + +func (m *FileInfo) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FileInfo) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(m.Path))) + i += copy(dAtA[i:], m.Path) + if m.Nlink != nil { + dAtA[i] = 0x10 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Nlink)) + } + if m.Size != nil { + dAtA[i] = 0x18 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Size)) + } + if m.Mtime != nil { + dAtA[i] = 0x22 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Mtime.ProtoSize())) + n175, err := m.Mtime.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n175 + } + if m.Mode != nil { + dAtA[i] = 0x28 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.Mode)) + } + if m.UID != nil { + dAtA[i] = 0x32 + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.UID))) + i += copy(dAtA[i:], *m.UID) + } + if m.GID != nil { + dAtA[i] = 0x3a + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.GID))) + i += copy(dAtA[i:], *m.GID) + } + return i, nil +} + +func (m *Device) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Device) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Path != nil { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(len(*m.Path))) + i += copy(dAtA[i:], *m.Path) + } + if m.Number != nil { + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Number.ProtoSize())) + n176, err := m.Number.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n176 + } + return i, nil +} + +func (m *Device_Number) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Device_Number) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.MajorNumber == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("major_number") + } else { + dAtA[i] = 0x8 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.MajorNumber)) + } + if m.MinorNumber == nil { + return 0, github_com_gogo_protobuf_proto.NewRequiredNotSetError("minor_number") + } else { + dAtA[i] = 0x10 + i++ + i = encodeVarintMesos(dAtA, i, uint64(*m.MinorNumber)) + } + return i, nil +} + +func (m *DeviceAccess) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceAccess) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Device.ProtoSize())) + n177, err := m.Device.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n177 + dAtA[i] = 0x12 + i++ + i = encodeVarintMesos(dAtA, i, uint64(m.Access.ProtoSize())) + n178, err := m.Access.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n178 + return i, nil +} + +func (m *DeviceAccess_Access) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceAccess_Access) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if m.Read != nil { + dAtA[i] = 0x8 + i++ + if *m.Read { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Write != nil { + dAtA[i] = 0x10 + i++ + if *m.Write { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + if m.Mknod != nil { + dAtA[i] = 0x18 + i++ + if *m.Mknod { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i++ + } + return i, nil +} + +func (m *DeviceWhitelist) Marshal() (dAtA []byte, err error) { + size := m.ProtoSize() + dAtA = make([]byte, size) + n, err := m.MarshalTo(dAtA) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DeviceWhitelist) MarshalTo(dAtA []byte) (int, error) { + var i int + _ = i + var l int + _ = l + if len(m.AllowedDevices) > 0 { + for _, msg := range m.AllowedDevices { + dAtA[i] = 0xa + i++ + i = encodeVarintMesos(dAtA, i, uint64(msg.ProtoSize())) + n, err := msg.MarshalTo(dAtA[i:]) + if err != nil { + return 0, err + } + i += n + } + } + return i, nil +} + +func encodeFixed64Mesos(dAtA []byte, offset int, v uint64) int { + dAtA[offset] = uint8(v) + dAtA[offset+1] = uint8(v >> 8) + dAtA[offset+2] = uint8(v >> 16) + dAtA[offset+3] = uint8(v >> 24) + dAtA[offset+4] = uint8(v >> 32) + dAtA[offset+5] = uint8(v >> 40) + dAtA[offset+6] = uint8(v >> 48) + dAtA[offset+7] = uint8(v >> 56) + return offset + 8 +} +func encodeFixed32Mesos(dAtA []byte, offset int, v uint32) int { + dAtA[offset] = uint8(v) + dAtA[offset+1] = uint8(v >> 8) + dAtA[offset+2] = uint8(v >> 16) + dAtA[offset+3] = uint8(v >> 24) + return offset + 4 +} +func encodeVarintMesos(dAtA []byte, offset int, v uint64) int { + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return offset + 1 +} +func NewPopulatedFrameworkID(r randyMesos, easy bool) *FrameworkID { + this := &FrameworkID{} + this.Value = string(randStringMesos(r)) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedOfferID(r randyMesos, easy bool) *OfferID { + this := &OfferID{} + this.Value = string(randStringMesos(r)) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedAgentID(r randyMesos, easy bool) *AgentID { + this := &AgentID{} + this.Value = string(randStringMesos(r)) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedTaskID(r randyMesos, easy bool) *TaskID { + this := &TaskID{} + this.Value = string(randStringMesos(r)) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedExecutorID(r randyMesos, easy bool) *ExecutorID { + this := &ExecutorID{} + this.Value = string(randStringMesos(r)) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedContainerID(r randyMesos, easy bool) *ContainerID { + this := &ContainerID{} + this.Value = string(randStringMesos(r)) + if r.Intn(10) == 0 { + this.Parent = NewPopulatedContainerID(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResourceProviderID(r randyMesos, easy bool) *ResourceProviderID { + this := &ResourceProviderID{} + this.Value = string(randStringMesos(r)) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedOperationID(r randyMesos, easy bool) *OperationID { + this := &OperationID{} + this.Value = string(randStringMesos(r)) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedTimeInfo(r randyMesos, easy bool) *TimeInfo { + this := &TimeInfo{} + this.Nanoseconds = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Nanoseconds *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedDurationInfo(r randyMesos, easy bool) *DurationInfo { + this := &DurationInfo{} + this.Nanoseconds = int64(r.Int63()) + if r.Intn(2) == 0 { + this.Nanoseconds *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedAddress(r randyMesos, easy bool) *Address { + this := &Address{} + if r.Intn(10) != 0 { + v1 := string(randStringMesos(r)) + this.Hostname = &v1 + } + if r.Intn(10) != 0 { + v2 := string(randStringMesos(r)) + this.IP = &v2 + } + this.Port = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Port *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedURL(r randyMesos, easy bool) *URL { + this := &URL{} + this.Scheme = string(randStringMesos(r)) + v3 := NewPopulatedAddress(r, easy) + this.Address = *v3 + if r.Intn(10) != 0 { + v4 := string(randStringMesos(r)) + this.Path = &v4 + } + if r.Intn(10) != 0 { + v5 := r.Intn(5) + this.Query = make([]Parameter, v5) + for i := 0; i < v5; i++ { + v6 := NewPopulatedParameter(r, easy) + this.Query[i] = *v6 + } + } + if r.Intn(10) != 0 { + v7 := string(randStringMesos(r)) + this.Fragment = &v7 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUnavailability(r randyMesos, easy bool) *Unavailability { + this := &Unavailability{} + v8 := NewPopulatedTimeInfo(r, easy) + this.Start = *v8 + if r.Intn(10) != 0 { + this.Duration = NewPopulatedDurationInfo(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedMachineID(r randyMesos, easy bool) *MachineID { + this := &MachineID{} + if r.Intn(10) != 0 { + v9 := string(randStringMesos(r)) + this.Hostname = &v9 + } + if r.Intn(10) != 0 { + v10 := string(randStringMesos(r)) + this.IP = &v10 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedMachineInfo(r randyMesos, easy bool) *MachineInfo { + this := &MachineInfo{} + v11 := NewPopulatedMachineID(r, easy) + this.ID = *v11 + if r.Intn(10) != 0 { + v12 := MachineInfo_Mode([]int32{1, 2, 3}[r.Intn(3)]) + this.Mode = &v12 + } + if r.Intn(10) != 0 { + this.Unavailability = NewPopulatedUnavailability(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedFrameworkInfo(r randyMesos, easy bool) *FrameworkInfo { + this := &FrameworkInfo{} + this.User = string(randStringMesos(r)) + this.Name = string(randStringMesos(r)) + if r.Intn(10) != 0 { + this.ID = NewPopulatedFrameworkID(r, easy) + } + if r.Intn(10) != 0 { + v13 := float64(r.Float64()) + if r.Intn(2) == 0 { + v13 *= -1 + } + this.FailoverTimeout = &v13 + } + if r.Intn(10) != 0 { + v14 := bool(bool(r.Intn(2) == 0)) + this.Checkpoint = &v14 + } + if r.Intn(10) != 0 { + v15 := string(randStringMesos(r)) + this.Role = &v15 + } + if r.Intn(10) != 0 { + v16 := string(randStringMesos(r)) + this.Hostname = &v16 + } + if r.Intn(10) != 0 { + v17 := string(randStringMesos(r)) + this.Principal = &v17 + } + if r.Intn(10) != 0 { + v18 := string(randStringMesos(r)) + this.WebUiURL = &v18 + } + if r.Intn(10) != 0 { + v19 := r.Intn(5) + this.Capabilities = make([]FrameworkInfo_Capability, v19) + for i := 0; i < v19; i++ { + v20 := NewPopulatedFrameworkInfo_Capability(r, easy) + this.Capabilities[i] = *v20 + } + } + if r.Intn(10) != 0 { + this.Labels = NewPopulatedLabels(r, easy) + } + if r.Intn(10) != 0 { + v21 := r.Intn(10) + this.Roles = make([]string, v21) + for i := 0; i < v21; i++ { + this.Roles[i] = string(randStringMesos(r)) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedFrameworkInfo_Capability(r randyMesos, easy bool) *FrameworkInfo_Capability { + this := &FrameworkInfo_Capability{} + this.Type = FrameworkInfo_Capability_Type([]int32{0, 1, 2, 3, 4, 5, 6, 7, 8}[r.Intn(9)]) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCheckInfo(r randyMesos, easy bool) *CheckInfo { + this := &CheckInfo{} + this.Type = CheckInfo_Type([]int32{0, 1, 2, 3}[r.Intn(4)]) + if r.Intn(10) != 0 { + this.Command = NewPopulatedCheckInfo_Command(r, easy) + } + if r.Intn(10) != 0 { + this.HTTP = NewPopulatedCheckInfo_Http(r, easy) + } + if r.Intn(10) != 0 { + v22 := float64(r.Float64()) + if r.Intn(2) == 0 { + v22 *= -1 + } + this.DelaySeconds = &v22 + } + if r.Intn(10) != 0 { + v23 := float64(r.Float64()) + if r.Intn(2) == 0 { + v23 *= -1 + } + this.IntervalSeconds = &v23 + } + if r.Intn(10) != 0 { + v24 := float64(r.Float64()) + if r.Intn(2) == 0 { + v24 *= -1 + } + this.TimeoutSeconds = &v24 + } + if r.Intn(10) != 0 { + this.TCP = NewPopulatedCheckInfo_Tcp(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCheckInfo_Command(r randyMesos, easy bool) *CheckInfo_Command { + this := &CheckInfo_Command{} + v25 := NewPopulatedCommandInfo(r, easy) + this.Command = *v25 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCheckInfo_Http(r randyMesos, easy bool) *CheckInfo_Http { + this := &CheckInfo_Http{} + this.Port = uint32(r.Uint32()) + if r.Intn(10) != 0 { + v26 := string(randStringMesos(r)) + this.Path = &v26 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCheckInfo_Tcp(r randyMesos, easy bool) *CheckInfo_Tcp { + this := &CheckInfo_Tcp{} + this.Port = uint32(r.Uint32()) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedHealthCheck(r randyMesos, easy bool) *HealthCheck { + this := &HealthCheck{} + if r.Intn(10) != 0 { + this.HTTP = NewPopulatedHealthCheck_HTTPCheckInfo(r, easy) + } + if r.Intn(10) != 0 { + v27 := float64(r.Float64()) + if r.Intn(2) == 0 { + v27 *= -1 + } + this.DelaySeconds = &v27 + } + if r.Intn(10) != 0 { + v28 := float64(r.Float64()) + if r.Intn(2) == 0 { + v28 *= -1 + } + this.IntervalSeconds = &v28 + } + if r.Intn(10) != 0 { + v29 := float64(r.Float64()) + if r.Intn(2) == 0 { + v29 *= -1 + } + this.TimeoutSeconds = &v29 + } + if r.Intn(10) != 0 { + v30 := uint32(r.Uint32()) + this.ConsecutiveFailures = &v30 + } + if r.Intn(10) != 0 { + v31 := float64(r.Float64()) + if r.Intn(2) == 0 { + v31 *= -1 + } + this.GracePeriodSeconds = &v31 + } + if r.Intn(10) != 0 { + this.Command = NewPopulatedCommandInfo(r, easy) + } + this.Type = HealthCheck_Type([]int32{0, 1, 2, 3}[r.Intn(4)]) + if r.Intn(10) != 0 { + this.TCP = NewPopulatedHealthCheck_TCPCheckInfo(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedHealthCheck_HTTPCheckInfo(r randyMesos, easy bool) *HealthCheck_HTTPCheckInfo { + this := &HealthCheck_HTTPCheckInfo{} + this.Port = uint32(r.Uint32()) + if r.Intn(10) != 0 { + v32 := string(randStringMesos(r)) + this.Path = &v32 + } + if r.Intn(10) != 0 { + v33 := string(randStringMesos(r)) + this.Scheme = &v33 + } + if r.Intn(10) != 0 { + v34 := r.Intn(10) + this.Statuses = make([]uint32, v34) + for i := 0; i < v34; i++ { + this.Statuses[i] = uint32(r.Uint32()) + } + } + if r.Intn(10) != 0 { + v35 := NetworkInfo_Protocol([]int32{1, 2}[r.Intn(2)]) + this.Protocol = &v35 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedHealthCheck_TCPCheckInfo(r randyMesos, easy bool) *HealthCheck_TCPCheckInfo { + this := &HealthCheck_TCPCheckInfo{} + this.Port = uint32(r.Uint32()) + if r.Intn(10) != 0 { + v36 := NetworkInfo_Protocol([]int32{1, 2}[r.Intn(2)]) + this.Protocol = &v36 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedKillPolicy(r randyMesos, easy bool) *KillPolicy { + this := &KillPolicy{} + if r.Intn(10) != 0 { + this.GracePeriod = NewPopulatedDurationInfo(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCommandInfo(r randyMesos, easy bool) *CommandInfo { + this := &CommandInfo{} + if r.Intn(10) != 0 { + v37 := r.Intn(5) + this.URIs = make([]CommandInfo_URI, v37) + for i := 0; i < v37; i++ { + v38 := NewPopulatedCommandInfo_URI(r, easy) + this.URIs[i] = *v38 + } + } + if r.Intn(10) != 0 { + this.Environment = NewPopulatedEnvironment(r, easy) + } + if r.Intn(10) != 0 { + v39 := string(randStringMesos(r)) + this.Value = &v39 + } + if r.Intn(10) != 0 { + v40 := string(randStringMesos(r)) + this.User = &v40 + } + if r.Intn(10) != 0 { + v41 := bool(bool(r.Intn(2) == 0)) + this.Shell = &v41 + } + if r.Intn(10) != 0 { + v42 := r.Intn(10) + this.Arguments = make([]string, v42) + for i := 0; i < v42; i++ { + this.Arguments[i] = string(randStringMesos(r)) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCommandInfo_URI(r randyMesos, easy bool) *CommandInfo_URI { + this := &CommandInfo_URI{} + this.Value = string(randStringMesos(r)) + if r.Intn(10) != 0 { + v43 := bool(bool(r.Intn(2) == 0)) + this.Executable = &v43 + } + if r.Intn(10) != 0 { + v44 := bool(bool(r.Intn(2) == 0)) + this.Extract = &v44 + } + if r.Intn(10) != 0 { + v45 := bool(bool(r.Intn(2) == 0)) + this.Cache = &v45 + } + if r.Intn(10) != 0 { + v46 := string(randStringMesos(r)) + this.OutputFile = &v46 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedExecutorInfo(r randyMesos, easy bool) *ExecutorInfo { + this := &ExecutorInfo{} + v47 := NewPopulatedExecutorID(r, easy) + this.ExecutorID = *v47 + if r.Intn(10) != 0 { + v48 := r.Intn(100) + this.Data = make([]byte, v48) + for i := 0; i < v48; i++ { + this.Data[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v49 := r.Intn(5) + this.Resources = make([]Resource, v49) + for i := 0; i < v49; i++ { + v50 := NewPopulatedResource(r, easy) + this.Resources[i] = *v50 + } + } + if r.Intn(10) != 0 { + this.Command = NewPopulatedCommandInfo(r, easy) + } + if r.Intn(10) != 0 { + this.FrameworkID = NewPopulatedFrameworkID(r, easy) + } + if r.Intn(10) != 0 { + v51 := string(randStringMesos(r)) + this.Name = &v51 + } + if r.Intn(10) != 0 { + v52 := string(randStringMesos(r)) + this.Source = &v52 + } + if r.Intn(10) != 0 { + this.Container = NewPopulatedContainerInfo(r, easy) + } + if r.Intn(10) != 0 { + this.Discovery = NewPopulatedDiscoveryInfo(r, easy) + } + if r.Intn(10) != 0 { + this.ShutdownGracePeriod = NewPopulatedDurationInfo(r, easy) + } + if r.Intn(10) != 0 { + this.Labels = NewPopulatedLabels(r, easy) + } + this.Type = ExecutorInfo_Type([]int32{0, 1, 2}[r.Intn(3)]) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedDomainInfo(r randyMesos, easy bool) *DomainInfo { + this := &DomainInfo{} + if r.Intn(10) != 0 { + this.FaultDomain = NewPopulatedDomainInfo_FaultDomain(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedDomainInfo_FaultDomain(r randyMesos, easy bool) *DomainInfo_FaultDomain { + this := &DomainInfo_FaultDomain{} + v53 := NewPopulatedDomainInfo_FaultDomain_RegionInfo(r, easy) + this.Region = *v53 + v54 := NewPopulatedDomainInfo_FaultDomain_ZoneInfo(r, easy) + this.Zone = *v54 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedDomainInfo_FaultDomain_RegionInfo(r randyMesos, easy bool) *DomainInfo_FaultDomain_RegionInfo { + this := &DomainInfo_FaultDomain_RegionInfo{} + this.Name = string(randStringMesos(r)) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedDomainInfo_FaultDomain_ZoneInfo(r randyMesos, easy bool) *DomainInfo_FaultDomain_ZoneInfo { + this := &DomainInfo_FaultDomain_ZoneInfo{} + this.Name = string(randStringMesos(r)) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedMasterInfo(r randyMesos, easy bool) *MasterInfo { + this := &MasterInfo{} + this.ID = string(randStringMesos(r)) + this.IP = uint32(r.Uint32()) + v55 := uint32(r.Uint32()) + this.Port = &v55 + if r.Intn(10) != 0 { + v56 := string(randStringMesos(r)) + this.PID = &v56 + } + if r.Intn(10) != 0 { + v57 := string(randStringMesos(r)) + this.Hostname = &v57 + } + if r.Intn(10) != 0 { + v58 := string(randStringMesos(r)) + this.Version = &v58 + } + if r.Intn(10) != 0 { + this.Address = NewPopulatedAddress(r, easy) + } + if r.Intn(10) != 0 { + this.Domain = NewPopulatedDomainInfo(r, easy) + } + if r.Intn(10) != 0 { + v59 := r.Intn(5) + this.Capabilities = make([]MasterInfo_Capability, v59) + for i := 0; i < v59; i++ { + v60 := NewPopulatedMasterInfo_Capability(r, easy) + this.Capabilities[i] = *v60 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedMasterInfo_Capability(r randyMesos, easy bool) *MasterInfo_Capability { + this := &MasterInfo_Capability{} + this.Type = MasterInfo_Capability_Type([]int32{0, 1}[r.Intn(2)]) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedAgentInfo(r randyMesos, easy bool) *AgentInfo { + this := &AgentInfo{} + this.Hostname = string(randStringMesos(r)) + if r.Intn(10) != 0 { + v61 := r.Intn(5) + this.Resources = make([]Resource, v61) + for i := 0; i < v61; i++ { + v62 := NewPopulatedResource(r, easy) + this.Resources[i] = *v62 + } + } + if r.Intn(10) != 0 { + v63 := r.Intn(5) + this.Attributes = make([]Attribute, v63) + for i := 0; i < v63; i++ { + v64 := NewPopulatedAttribute(r, easy) + this.Attributes[i] = *v64 + } + } + if r.Intn(10) != 0 { + this.ID = NewPopulatedAgentID(r, easy) + } + if r.Intn(10) != 0 { + v65 := int32(r.Int31()) + if r.Intn(2) == 0 { + v65 *= -1 + } + this.Port = &v65 + } + if r.Intn(10) != 0 { + this.Domain = NewPopulatedDomainInfo(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedAgentInfo_Capability(r randyMesos, easy bool) *AgentInfo_Capability { + this := &AgentInfo_Capability{} + this.Type = AgentInfo_Capability_Type([]int32{0, 1, 2, 3, 4}[r.Intn(5)]) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCSIPluginContainerInfo(r randyMesos, easy bool) *CSIPluginContainerInfo { + this := &CSIPluginContainerInfo{} + if r.Intn(10) != 0 { + v66 := r.Intn(10) + this.Services = make([]CSIPluginContainerInfo_Service, v66) + for i := 0; i < v66; i++ { + this.Services[i] = CSIPluginContainerInfo_Service([]int32{0, 1, 2}[r.Intn(3)]) + } + } + if r.Intn(10) != 0 { + this.Command = NewPopulatedCommandInfo(r, easy) + } + if r.Intn(10) != 0 { + v67 := r.Intn(5) + this.Resources = make([]Resource, v67) + for i := 0; i < v67; i++ { + v68 := NewPopulatedResource(r, easy) + this.Resources[i] = *v68 + } + } + if r.Intn(10) != 0 { + this.Container = NewPopulatedContainerInfo(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCSIPluginInfo(r randyMesos, easy bool) *CSIPluginInfo { + this := &CSIPluginInfo{} + this.Type = string(randStringMesos(r)) + this.Name = string(randStringMesos(r)) + if r.Intn(10) != 0 { + v69 := r.Intn(5) + this.Containers = make([]CSIPluginContainerInfo, v69) + for i := 0; i < v69; i++ { + v70 := NewPopulatedCSIPluginContainerInfo(r, easy) + this.Containers[i] = *v70 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResourceProviderInfo(r randyMesos, easy bool) *ResourceProviderInfo { + this := &ResourceProviderInfo{} + if r.Intn(10) != 0 { + this.ID = NewPopulatedResourceProviderID(r, easy) + } + if r.Intn(10) != 0 { + v71 := r.Intn(5) + this.Attributes = make([]Attribute, v71) + for i := 0; i < v71; i++ { + v72 := NewPopulatedAttribute(r, easy) + this.Attributes[i] = *v72 + } + } + this.Type = string(randStringMesos(r)) + this.Name = string(randStringMesos(r)) + if r.Intn(10) != 0 { + v73 := r.Intn(5) + this.DefaultReservations = make([]Resource_ReservationInfo, v73) + for i := 0; i < v73; i++ { + v74 := NewPopulatedResource_ReservationInfo(r, easy) + this.DefaultReservations[i] = *v74 + } + } + if r.Intn(10) != 0 { + this.Storage = NewPopulatedResourceProviderInfo_Storage(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResourceProviderInfo_Storage(r randyMesos, easy bool) *ResourceProviderInfo_Storage { + this := &ResourceProviderInfo_Storage{} + v75 := NewPopulatedCSIPluginInfo(r, easy) + this.Plugin = *v75 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedValue(r randyMesos, easy bool) *Value { + this := &Value{} + this.Type = Value_Type([]int32{0, 1, 2, 3}[r.Intn(4)]) + if r.Intn(10) != 0 { + this.Scalar = NewPopulatedValue_Scalar(r, easy) + } + if r.Intn(10) != 0 { + this.Ranges = NewPopulatedValue_Ranges(r, easy) + } + if r.Intn(10) != 0 { + this.Set = NewPopulatedValue_Set(r, easy) + } + if r.Intn(10) != 0 { + this.Text = NewPopulatedValue_Text(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedValue_Scalar(r randyMesos, easy bool) *Value_Scalar { + this := &Value_Scalar{} + this.Value = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Value *= -1 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedValue_Range(r randyMesos, easy bool) *Value_Range { + this := &Value_Range{} + this.Begin = uint64(uint64(r.Uint32())) + this.End = uint64(uint64(r.Uint32())) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedValue_Ranges(r randyMesos, easy bool) *Value_Ranges { + this := &Value_Ranges{} + if r.Intn(10) != 0 { + v76 := r.Intn(5) + this.Range = make([]Value_Range, v76) + for i := 0; i < v76; i++ { + v77 := NewPopulatedValue_Range(r, easy) + this.Range[i] = *v77 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedValue_Set(r randyMesos, easy bool) *Value_Set { + this := &Value_Set{} + if r.Intn(10) != 0 { + v78 := r.Intn(10) + this.Item = make([]string, v78) + for i := 0; i < v78; i++ { + this.Item[i] = string(randStringMesos(r)) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedValue_Text(r randyMesos, easy bool) *Value_Text { + this := &Value_Text{} + this.Value = string(randStringMesos(r)) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedAttribute(r randyMesos, easy bool) *Attribute { + this := &Attribute{} + this.Name = string(randStringMesos(r)) + this.Type = Value_Type([]int32{0, 1, 2, 3}[r.Intn(4)]) + if r.Intn(10) != 0 { + this.Scalar = NewPopulatedValue_Scalar(r, easy) + } + if r.Intn(10) != 0 { + this.Ranges = NewPopulatedValue_Ranges(r, easy) + } + if r.Intn(10) != 0 { + this.Text = NewPopulatedValue_Text(r, easy) + } + if r.Intn(10) != 0 { + this.Set = NewPopulatedValue_Set(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResource(r randyMesos, easy bool) *Resource { + this := &Resource{} + this.Name = string(randStringMesos(r)) + v79 := Value_Type([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.Type = &v79 + if r.Intn(10) != 0 { + this.Scalar = NewPopulatedValue_Scalar(r, easy) + } + if r.Intn(10) != 0 { + this.Ranges = NewPopulatedValue_Ranges(r, easy) + } + if r.Intn(10) != 0 { + this.Set = NewPopulatedValue_Set(r, easy) + } + if r.Intn(10) != 0 { + v80 := string(randStringMesos(r)) + this.Role = &v80 + } + if r.Intn(10) != 0 { + this.Disk = NewPopulatedResource_DiskInfo(r, easy) + } + if r.Intn(10) != 0 { + this.Reservation = NewPopulatedResource_ReservationInfo(r, easy) + } + if r.Intn(10) != 0 { + this.Revocable = NewPopulatedResource_RevocableInfo(r, easy) + } + if r.Intn(10) != 0 { + this.Shared = NewPopulatedResource_SharedInfo(r, easy) + } + if r.Intn(10) != 0 { + this.AllocationInfo = NewPopulatedResource_AllocationInfo(r, easy) + } + if r.Intn(10) != 0 { + this.ProviderID = NewPopulatedResourceProviderID(r, easy) + } + if r.Intn(10) != 0 { + v81 := r.Intn(5) + this.Reservations = make([]Resource_ReservationInfo, v81) + for i := 0; i < v81; i++ { + v82 := NewPopulatedResource_ReservationInfo(r, easy) + this.Reservations[i] = *v82 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResource_AllocationInfo(r randyMesos, easy bool) *Resource_AllocationInfo { + this := &Resource_AllocationInfo{} + if r.Intn(10) != 0 { + v83 := string(randStringMesos(r)) + this.Role = &v83 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResource_ReservationInfo(r randyMesos, easy bool) *Resource_ReservationInfo { + this := &Resource_ReservationInfo{} + if r.Intn(10) != 0 { + v84 := string(randStringMesos(r)) + this.Principal = &v84 + } + if r.Intn(10) != 0 { + this.Labels = NewPopulatedLabels(r, easy) + } + if r.Intn(10) != 0 { + v85 := string(randStringMesos(r)) + this.Role = &v85 + } + if r.Intn(10) != 0 { + v86 := Resource_ReservationInfo_Type([]int32{0, 1, 2}[r.Intn(3)]) + this.Type = &v86 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResource_DiskInfo(r randyMesos, easy bool) *Resource_DiskInfo { + this := &Resource_DiskInfo{} + if r.Intn(10) != 0 { + this.Persistence = NewPopulatedResource_DiskInfo_Persistence(r, easy) + } + if r.Intn(10) != 0 { + this.Volume = NewPopulatedVolume(r, easy) + } + if r.Intn(10) != 0 { + this.Source = NewPopulatedResource_DiskInfo_Source(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResource_DiskInfo_Persistence(r randyMesos, easy bool) *Resource_DiskInfo_Persistence { + this := &Resource_DiskInfo_Persistence{} + this.ID = string(randStringMesos(r)) + if r.Intn(10) != 0 { + v87 := string(randStringMesos(r)) + this.Principal = &v87 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResource_DiskInfo_Source(r randyMesos, easy bool) *Resource_DiskInfo_Source { + this := &Resource_DiskInfo_Source{} + this.Type = Resource_DiskInfo_Source_Type([]int32{0, 1, 2, 3, 4}[r.Intn(5)]) + if r.Intn(10) != 0 { + this.Path = NewPopulatedResource_DiskInfo_Source_Path(r, easy) + } + if r.Intn(10) != 0 { + this.Mount = NewPopulatedResource_DiskInfo_Source_Mount(r, easy) + } + if r.Intn(10) != 0 { + v88 := string(randStringMesos(r)) + this.ID = &v88 + } + if r.Intn(10) != 0 { + this.Metadata = NewPopulatedLabels(r, easy) + } + if r.Intn(10) != 0 { + v89 := string(randStringMesos(r)) + this.Profile = &v89 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResource_DiskInfo_Source_Path(r randyMesos, easy bool) *Resource_DiskInfo_Source_Path { + this := &Resource_DiskInfo_Source_Path{} + if r.Intn(10) != 0 { + v90 := string(randStringMesos(r)) + this.Root = &v90 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResource_DiskInfo_Source_Mount(r randyMesos, easy bool) *Resource_DiskInfo_Source_Mount { + this := &Resource_DiskInfo_Source_Mount{} + if r.Intn(10) != 0 { + v91 := string(randStringMesos(r)) + this.Root = &v91 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResource_RevocableInfo(r randyMesos, easy bool) *Resource_RevocableInfo { + this := &Resource_RevocableInfo{} + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResource_SharedInfo(r randyMesos, easy bool) *Resource_SharedInfo { + this := &Resource_SharedInfo{} + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedTrafficControlStatistics(r randyMesos, easy bool) *TrafficControlStatistics { + this := &TrafficControlStatistics{} + this.ID = string(randStringMesos(r)) + if r.Intn(10) != 0 { + v92 := uint64(uint64(r.Uint32())) + this.Backlog = &v92 + } + if r.Intn(10) != 0 { + v93 := uint64(uint64(r.Uint32())) + this.Bytes = &v93 + } + if r.Intn(10) != 0 { + v94 := uint64(uint64(r.Uint32())) + this.Drops = &v94 + } + if r.Intn(10) != 0 { + v95 := uint64(uint64(r.Uint32())) + this.Overlimits = &v95 + } + if r.Intn(10) != 0 { + v96 := uint64(uint64(r.Uint32())) + this.Packets = &v96 + } + if r.Intn(10) != 0 { + v97 := uint64(uint64(r.Uint32())) + this.Qlen = &v97 + } + if r.Intn(10) != 0 { + v98 := uint64(uint64(r.Uint32())) + this.RateBPS = &v98 + } + if r.Intn(10) != 0 { + v99 := uint64(uint64(r.Uint32())) + this.RatePPS = &v99 + } + if r.Intn(10) != 0 { + v100 := uint64(uint64(r.Uint32())) + this.Requeues = &v100 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedIpStatistics(r randyMesos, easy bool) *IpStatistics { + this := &IpStatistics{} + if r.Intn(10) != 0 { + v101 := int64(r.Int63()) + if r.Intn(2) == 0 { + v101 *= -1 + } + this.Forwarding = &v101 + } + if r.Intn(10) != 0 { + v102 := int64(r.Int63()) + if r.Intn(2) == 0 { + v102 *= -1 + } + this.DefaultTTL = &v102 + } + if r.Intn(10) != 0 { + v103 := int64(r.Int63()) + if r.Intn(2) == 0 { + v103 *= -1 + } + this.InReceives = &v103 + } + if r.Intn(10) != 0 { + v104 := int64(r.Int63()) + if r.Intn(2) == 0 { + v104 *= -1 + } + this.InHdrErrors = &v104 + } + if r.Intn(10) != 0 { + v105 := int64(r.Int63()) + if r.Intn(2) == 0 { + v105 *= -1 + } + this.InAddrErrors = &v105 + } + if r.Intn(10) != 0 { + v106 := int64(r.Int63()) + if r.Intn(2) == 0 { + v106 *= -1 + } + this.ForwDatagrams = &v106 + } + if r.Intn(10) != 0 { + v107 := int64(r.Int63()) + if r.Intn(2) == 0 { + v107 *= -1 + } + this.InUnknownProtos = &v107 + } + if r.Intn(10) != 0 { + v108 := int64(r.Int63()) + if r.Intn(2) == 0 { + v108 *= -1 + } + this.InDiscards = &v108 + } + if r.Intn(10) != 0 { + v109 := int64(r.Int63()) + if r.Intn(2) == 0 { + v109 *= -1 + } + this.InDelivers = &v109 + } + if r.Intn(10) != 0 { + v110 := int64(r.Int63()) + if r.Intn(2) == 0 { + v110 *= -1 + } + this.OutRequests = &v110 + } + if r.Intn(10) != 0 { + v111 := int64(r.Int63()) + if r.Intn(2) == 0 { + v111 *= -1 + } + this.OutDiscards = &v111 + } + if r.Intn(10) != 0 { + v112 := int64(r.Int63()) + if r.Intn(2) == 0 { + v112 *= -1 + } + this.OutNoRoutes = &v112 + } + if r.Intn(10) != 0 { + v113 := int64(r.Int63()) + if r.Intn(2) == 0 { + v113 *= -1 + } + this.ReasmTimeout = &v113 + } + if r.Intn(10) != 0 { + v114 := int64(r.Int63()) + if r.Intn(2) == 0 { + v114 *= -1 + } + this.ReasmReqds = &v114 + } + if r.Intn(10) != 0 { + v115 := int64(r.Int63()) + if r.Intn(2) == 0 { + v115 *= -1 + } + this.ReasmOKs = &v115 + } + if r.Intn(10) != 0 { + v116 := int64(r.Int63()) + if r.Intn(2) == 0 { + v116 *= -1 + } + this.ReasmFails = &v116 + } + if r.Intn(10) != 0 { + v117 := int64(r.Int63()) + if r.Intn(2) == 0 { + v117 *= -1 + } + this.FragOKs = &v117 + } + if r.Intn(10) != 0 { + v118 := int64(r.Int63()) + if r.Intn(2) == 0 { + v118 *= -1 + } + this.FragFails = &v118 + } + if r.Intn(10) != 0 { + v119 := int64(r.Int63()) + if r.Intn(2) == 0 { + v119 *= -1 + } + this.FragCreates = &v119 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedIcmpStatistics(r randyMesos, easy bool) *IcmpStatistics { + this := &IcmpStatistics{} + if r.Intn(10) != 0 { + v120 := int64(r.Int63()) + if r.Intn(2) == 0 { + v120 *= -1 + } + this.InMsgs = &v120 + } + if r.Intn(10) != 0 { + v121 := int64(r.Int63()) + if r.Intn(2) == 0 { + v121 *= -1 + } + this.InErrors = &v121 + } + if r.Intn(10) != 0 { + v122 := int64(r.Int63()) + if r.Intn(2) == 0 { + v122 *= -1 + } + this.InCsumErrors = &v122 + } + if r.Intn(10) != 0 { + v123 := int64(r.Int63()) + if r.Intn(2) == 0 { + v123 *= -1 + } + this.InDestUnreachs = &v123 + } + if r.Intn(10) != 0 { + v124 := int64(r.Int63()) + if r.Intn(2) == 0 { + v124 *= -1 + } + this.InTimeExcds = &v124 + } + if r.Intn(10) != 0 { + v125 := int64(r.Int63()) + if r.Intn(2) == 0 { + v125 *= -1 + } + this.InParmProbs = &v125 + } + if r.Intn(10) != 0 { + v126 := int64(r.Int63()) + if r.Intn(2) == 0 { + v126 *= -1 + } + this.InSrcQuenchs = &v126 + } + if r.Intn(10) != 0 { + v127 := int64(r.Int63()) + if r.Intn(2) == 0 { + v127 *= -1 + } + this.InRedirects = &v127 + } + if r.Intn(10) != 0 { + v128 := int64(r.Int63()) + if r.Intn(2) == 0 { + v128 *= -1 + } + this.InEchos = &v128 + } + if r.Intn(10) != 0 { + v129 := int64(r.Int63()) + if r.Intn(2) == 0 { + v129 *= -1 + } + this.InEchoReps = &v129 + } + if r.Intn(10) != 0 { + v130 := int64(r.Int63()) + if r.Intn(2) == 0 { + v130 *= -1 + } + this.InTimestamps = &v130 + } + if r.Intn(10) != 0 { + v131 := int64(r.Int63()) + if r.Intn(2) == 0 { + v131 *= -1 + } + this.InTimestampReps = &v131 + } + if r.Intn(10) != 0 { + v132 := int64(r.Int63()) + if r.Intn(2) == 0 { + v132 *= -1 + } + this.InAddrMasks = &v132 + } + if r.Intn(10) != 0 { + v133 := int64(r.Int63()) + if r.Intn(2) == 0 { + v133 *= -1 + } + this.InAddrMaskReps = &v133 + } + if r.Intn(10) != 0 { + v134 := int64(r.Int63()) + if r.Intn(2) == 0 { + v134 *= -1 + } + this.OutMsgs = &v134 + } + if r.Intn(10) != 0 { + v135 := int64(r.Int63()) + if r.Intn(2) == 0 { + v135 *= -1 + } + this.OutErrors = &v135 + } + if r.Intn(10) != 0 { + v136 := int64(r.Int63()) + if r.Intn(2) == 0 { + v136 *= -1 + } + this.OutDestUnreachs = &v136 + } + if r.Intn(10) != 0 { + v137 := int64(r.Int63()) + if r.Intn(2) == 0 { + v137 *= -1 + } + this.OutTimeExcds = &v137 + } + if r.Intn(10) != 0 { + v138 := int64(r.Int63()) + if r.Intn(2) == 0 { + v138 *= -1 + } + this.OutParmProbs = &v138 + } + if r.Intn(10) != 0 { + v139 := int64(r.Int63()) + if r.Intn(2) == 0 { + v139 *= -1 + } + this.OutSrcQuenchs = &v139 + } + if r.Intn(10) != 0 { + v140 := int64(r.Int63()) + if r.Intn(2) == 0 { + v140 *= -1 + } + this.OutRedirects = &v140 + } + if r.Intn(10) != 0 { + v141 := int64(r.Int63()) + if r.Intn(2) == 0 { + v141 *= -1 + } + this.OutEchos = &v141 + } + if r.Intn(10) != 0 { + v142 := int64(r.Int63()) + if r.Intn(2) == 0 { + v142 *= -1 + } + this.OutEchoReps = &v142 + } + if r.Intn(10) != 0 { + v143 := int64(r.Int63()) + if r.Intn(2) == 0 { + v143 *= -1 + } + this.OutTimestamps = &v143 + } + if r.Intn(10) != 0 { + v144 := int64(r.Int63()) + if r.Intn(2) == 0 { + v144 *= -1 + } + this.OutTimestampReps = &v144 + } + if r.Intn(10) != 0 { + v145 := int64(r.Int63()) + if r.Intn(2) == 0 { + v145 *= -1 + } + this.OutAddrMasks = &v145 + } + if r.Intn(10) != 0 { + v146 := int64(r.Int63()) + if r.Intn(2) == 0 { + v146 *= -1 + } + this.OutAddrMaskReps = &v146 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedTcpStatistics(r randyMesos, easy bool) *TcpStatistics { + this := &TcpStatistics{} + if r.Intn(10) != 0 { + v147 := int64(r.Int63()) + if r.Intn(2) == 0 { + v147 *= -1 + } + this.RtoAlgorithm = &v147 + } + if r.Intn(10) != 0 { + v148 := int64(r.Int63()) + if r.Intn(2) == 0 { + v148 *= -1 + } + this.RtoMin = &v148 + } + if r.Intn(10) != 0 { + v149 := int64(r.Int63()) + if r.Intn(2) == 0 { + v149 *= -1 + } + this.RtoMax = &v149 + } + if r.Intn(10) != 0 { + v150 := int64(r.Int63()) + if r.Intn(2) == 0 { + v150 *= -1 + } + this.MaxConn = &v150 + } + if r.Intn(10) != 0 { + v151 := int64(r.Int63()) + if r.Intn(2) == 0 { + v151 *= -1 + } + this.ActiveOpens = &v151 + } + if r.Intn(10) != 0 { + v152 := int64(r.Int63()) + if r.Intn(2) == 0 { + v152 *= -1 + } + this.PassiveOpens = &v152 + } + if r.Intn(10) != 0 { + v153 := int64(r.Int63()) + if r.Intn(2) == 0 { + v153 *= -1 + } + this.AttemptFails = &v153 + } + if r.Intn(10) != 0 { + v154 := int64(r.Int63()) + if r.Intn(2) == 0 { + v154 *= -1 + } + this.EstabResets = &v154 + } + if r.Intn(10) != 0 { + v155 := int64(r.Int63()) + if r.Intn(2) == 0 { + v155 *= -1 + } + this.CurrEstab = &v155 + } + if r.Intn(10) != 0 { + v156 := int64(r.Int63()) + if r.Intn(2) == 0 { + v156 *= -1 + } + this.InSegs = &v156 + } + if r.Intn(10) != 0 { + v157 := int64(r.Int63()) + if r.Intn(2) == 0 { + v157 *= -1 + } + this.OutSegs = &v157 + } + if r.Intn(10) != 0 { + v158 := int64(r.Int63()) + if r.Intn(2) == 0 { + v158 *= -1 + } + this.RetransSegs = &v158 + } + if r.Intn(10) != 0 { + v159 := int64(r.Int63()) + if r.Intn(2) == 0 { + v159 *= -1 + } + this.InErrs = &v159 + } + if r.Intn(10) != 0 { + v160 := int64(r.Int63()) + if r.Intn(2) == 0 { + v160 *= -1 + } + this.OutRsts = &v160 + } + if r.Intn(10) != 0 { + v161 := int64(r.Int63()) + if r.Intn(2) == 0 { + v161 *= -1 + } + this.InCsumErrors = &v161 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUdpStatistics(r randyMesos, easy bool) *UdpStatistics { + this := &UdpStatistics{} + if r.Intn(10) != 0 { + v162 := int64(r.Int63()) + if r.Intn(2) == 0 { + v162 *= -1 + } + this.InDatagrams = &v162 + } + if r.Intn(10) != 0 { + v163 := int64(r.Int63()) + if r.Intn(2) == 0 { + v163 *= -1 + } + this.NoPorts = &v163 + } + if r.Intn(10) != 0 { + v164 := int64(r.Int63()) + if r.Intn(2) == 0 { + v164 *= -1 + } + this.InErrors = &v164 + } + if r.Intn(10) != 0 { + v165 := int64(r.Int63()) + if r.Intn(2) == 0 { + v165 *= -1 + } + this.OutDatagrams = &v165 + } + if r.Intn(10) != 0 { + v166 := int64(r.Int63()) + if r.Intn(2) == 0 { + v166 *= -1 + } + this.RcvbufErrors = &v166 + } + if r.Intn(10) != 0 { + v167 := int64(r.Int63()) + if r.Intn(2) == 0 { + v167 *= -1 + } + this.SndbufErrors = &v167 + } + if r.Intn(10) != 0 { + v168 := int64(r.Int63()) + if r.Intn(2) == 0 { + v168 *= -1 + } + this.InCsumErrors = &v168 + } + if r.Intn(10) != 0 { + v169 := int64(r.Int63()) + if r.Intn(2) == 0 { + v169 *= -1 + } + this.IgnoredMulti = &v169 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedSNMPStatistics(r randyMesos, easy bool) *SNMPStatistics { + this := &SNMPStatistics{} + if r.Intn(10) != 0 { + this.IPStats = NewPopulatedIpStatistics(r, easy) + } + if r.Intn(10) != 0 { + this.ICMPStats = NewPopulatedIcmpStatistics(r, easy) + } + if r.Intn(10) != 0 { + this.TCPStats = NewPopulatedTcpStatistics(r, easy) + } + if r.Intn(10) != 0 { + this.UDPStats = NewPopulatedUdpStatistics(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedDiskStatistics(r randyMesos, easy bool) *DiskStatistics { + this := &DiskStatistics{} + if r.Intn(10) != 0 { + this.Source = NewPopulatedResource_DiskInfo_Source(r, easy) + } + if r.Intn(10) != 0 { + this.Persistence = NewPopulatedResource_DiskInfo_Persistence(r, easy) + } + if r.Intn(10) != 0 { + v170 := uint64(uint64(r.Uint32())) + this.LimitBytes = &v170 + } + if r.Intn(10) != 0 { + v171 := uint64(uint64(r.Uint32())) + this.UsedBytes = &v171 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResourceStatistics(r randyMesos, easy bool) *ResourceStatistics { + this := &ResourceStatistics{} + this.Timestamp = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Timestamp *= -1 + } + if r.Intn(10) != 0 { + v172 := float64(r.Float64()) + if r.Intn(2) == 0 { + v172 *= -1 + } + this.CPUsUserTimeSecs = &v172 + } + if r.Intn(10) != 0 { + v173 := float64(r.Float64()) + if r.Intn(2) == 0 { + v173 *= -1 + } + this.CPUsSystemTimeSecs = &v173 + } + if r.Intn(10) != 0 { + v174 := float64(r.Float64()) + if r.Intn(2) == 0 { + v174 *= -1 + } + this.CPUsLimit = &v174 + } + if r.Intn(10) != 0 { + v175 := uint64(uint64(r.Uint32())) + this.MemRSSBytes = &v175 + } + if r.Intn(10) != 0 { + v176 := uint64(uint64(r.Uint32())) + this.MemLimitBytes = &v176 + } + if r.Intn(10) != 0 { + v177 := uint32(r.Uint32()) + this.CPUsNrPeriods = &v177 + } + if r.Intn(10) != 0 { + v178 := uint32(r.Uint32()) + this.CPUsNrThrottled = &v178 + } + if r.Intn(10) != 0 { + v179 := float64(r.Float64()) + if r.Intn(2) == 0 { + v179 *= -1 + } + this.CPUsThrottledTimeSecs = &v179 + } + if r.Intn(10) != 0 { + v180 := uint64(uint64(r.Uint32())) + this.MemFileBytes = &v180 + } + if r.Intn(10) != 0 { + v181 := uint64(uint64(r.Uint32())) + this.MemAnonBytes = &v181 + } + if r.Intn(10) != 0 { + v182 := uint64(uint64(r.Uint32())) + this.MemMappedFileBytes = &v182 + } + if r.Intn(10) != 0 { + this.Perf = NewPopulatedPerfStatistics(r, easy) + } + if r.Intn(10) != 0 { + v183 := uint64(uint64(r.Uint32())) + this.NetRxPackets = &v183 + } + if r.Intn(10) != 0 { + v184 := uint64(uint64(r.Uint32())) + this.NetRxBytes = &v184 + } + if r.Intn(10) != 0 { + v185 := uint64(uint64(r.Uint32())) + this.NetRxErrors = &v185 + } + if r.Intn(10) != 0 { + v186 := uint64(uint64(r.Uint32())) + this.NetRxDropped = &v186 + } + if r.Intn(10) != 0 { + v187 := uint64(uint64(r.Uint32())) + this.NetTxPackets = &v187 + } + if r.Intn(10) != 0 { + v188 := uint64(uint64(r.Uint32())) + this.NetTxBytes = &v188 + } + if r.Intn(10) != 0 { + v189 := uint64(uint64(r.Uint32())) + this.NetTxErrors = &v189 + } + if r.Intn(10) != 0 { + v190 := uint64(uint64(r.Uint32())) + this.NetTxDropped = &v190 + } + if r.Intn(10) != 0 { + v191 := float64(r.Float64()) + if r.Intn(2) == 0 { + v191 *= -1 + } + this.NetTCPRttMicrosecsP50 = &v191 + } + if r.Intn(10) != 0 { + v192 := float64(r.Float64()) + if r.Intn(2) == 0 { + v192 *= -1 + } + this.NetTCPRttMicrosecsP90 = &v192 + } + if r.Intn(10) != 0 { + v193 := float64(r.Float64()) + if r.Intn(2) == 0 { + v193 *= -1 + } + this.NetTCPRttMicrosecsP95 = &v193 + } + if r.Intn(10) != 0 { + v194 := float64(r.Float64()) + if r.Intn(2) == 0 { + v194 *= -1 + } + this.NetTCPRttMicrosecsP99 = &v194 + } + if r.Intn(10) != 0 { + v195 := uint64(uint64(r.Uint32())) + this.DiskLimitBytes = &v195 + } + if r.Intn(10) != 0 { + v196 := uint64(uint64(r.Uint32())) + this.DiskUsedBytes = &v196 + } + if r.Intn(10) != 0 { + v197 := float64(r.Float64()) + if r.Intn(2) == 0 { + v197 *= -1 + } + this.NetTCPActiveConnections = &v197 + } + if r.Intn(10) != 0 { + v198 := float64(r.Float64()) + if r.Intn(2) == 0 { + v198 *= -1 + } + this.NetTCPTimeWaitConnections = &v198 + } + if r.Intn(10) != 0 { + v199 := uint32(r.Uint32()) + this.Processes = &v199 + } + if r.Intn(10) != 0 { + v200 := uint32(r.Uint32()) + this.Threads = &v200 + } + if r.Intn(10) != 0 { + v201 := uint64(uint64(r.Uint32())) + this.MemLowPressureCounter = &v201 + } + if r.Intn(10) != 0 { + v202 := uint64(uint64(r.Uint32())) + this.MemMediumPressureCounter = &v202 + } + if r.Intn(10) != 0 { + v203 := uint64(uint64(r.Uint32())) + this.MemCriticalPressureCounter = &v203 + } + if r.Intn(10) != 0 { + v204 := r.Intn(5) + this.NetTrafficControlStatistics = make([]TrafficControlStatistics, v204) + for i := 0; i < v204; i++ { + v205 := NewPopulatedTrafficControlStatistics(r, easy) + this.NetTrafficControlStatistics[i] = *v205 + } + } + if r.Intn(10) != 0 { + v206 := uint64(uint64(r.Uint32())) + this.MemTotalBytes = &v206 + } + if r.Intn(10) != 0 { + v207 := uint64(uint64(r.Uint32())) + this.MemTotalMemswBytes = &v207 + } + if r.Intn(10) != 0 { + v208 := uint64(uint64(r.Uint32())) + this.MemSoftLimitBytes = &v208 + } + if r.Intn(10) != 0 { + v209 := uint64(uint64(r.Uint32())) + this.MemCacheBytes = &v209 + } + if r.Intn(10) != 0 { + v210 := uint64(uint64(r.Uint32())) + this.MemSwapBytes = &v210 + } + if r.Intn(10) != 0 { + v211 := uint64(uint64(r.Uint32())) + this.MemUnevictableBytes = &v211 + } + if r.Intn(10) != 0 { + this.NetSNMPStatistics = NewPopulatedSNMPStatistics(r, easy) + } + if r.Intn(10) != 0 { + v212 := r.Intn(5) + this.DiskStatistics = make([]DiskStatistics, v212) + for i := 0; i < v212; i++ { + v213 := NewPopulatedDiskStatistics(r, easy) + this.DiskStatistics[i] = *v213 + } + } + if r.Intn(10) != 0 { + this.BlkioStatistics = NewPopulatedCgroupInfo_Blkio_Statistics(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResourceUsage(r randyMesos, easy bool) *ResourceUsage { + this := &ResourceUsage{} + if r.Intn(10) == 0 { + v214 := r.Intn(5) + this.Executors = make([]ResourceUsage_Executor, v214) + for i := 0; i < v214; i++ { + v215 := NewPopulatedResourceUsage_Executor(r, easy) + this.Executors[i] = *v215 + } + } + if r.Intn(10) != 0 { + v216 := r.Intn(5) + this.Total = make([]Resource, v216) + for i := 0; i < v216; i++ { + v217 := NewPopulatedResource(r, easy) + this.Total[i] = *v217 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResourceUsage_Executor(r randyMesos, easy bool) *ResourceUsage_Executor { + this := &ResourceUsage_Executor{} + v218 := NewPopulatedExecutorInfo(r, easy) + this.ExecutorInfo = *v218 + if r.Intn(10) != 0 { + v219 := r.Intn(5) + this.Allocated = make([]Resource, v219) + for i := 0; i < v219; i++ { + v220 := NewPopulatedResource(r, easy) + this.Allocated[i] = *v220 + } + } + if r.Intn(10) != 0 { + this.Statistics = NewPopulatedResourceStatistics(r, easy) + } + v221 := NewPopulatedContainerID(r, easy) + this.ContainerID = *v221 + if r.Intn(10) != 0 { + v222 := r.Intn(5) + this.Tasks = make([]ResourceUsage_Executor_Task, v222) + for i := 0; i < v222; i++ { + v223 := NewPopulatedResourceUsage_Executor_Task(r, easy) + this.Tasks[i] = *v223 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedResourceUsage_Executor_Task(r randyMesos, easy bool) *ResourceUsage_Executor_Task { + this := &ResourceUsage_Executor_Task{} + this.Name = string(randStringMesos(r)) + v224 := NewPopulatedTaskID(r, easy) + this.ID = *v224 + if r.Intn(10) != 0 { + v225 := r.Intn(5) + this.Resources = make([]Resource, v225) + for i := 0; i < v225; i++ { + v226 := NewPopulatedResource(r, easy) + this.Resources[i] = *v226 + } + } + if r.Intn(10) != 0 { + this.Labels = NewPopulatedLabels(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedPerfStatistics(r randyMesos, easy bool) *PerfStatistics { + this := &PerfStatistics{} + this.Timestamp = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Timestamp *= -1 + } + this.Duration = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Duration *= -1 + } + if r.Intn(10) != 0 { + v227 := uint64(uint64(r.Uint32())) + this.Cycles = &v227 + } + if r.Intn(10) != 0 { + v228 := uint64(uint64(r.Uint32())) + this.StalledCyclesFrontend = &v228 + } + if r.Intn(10) != 0 { + v229 := uint64(uint64(r.Uint32())) + this.StalledCyclesBackend = &v229 + } + if r.Intn(10) != 0 { + v230 := uint64(uint64(r.Uint32())) + this.Instructions = &v230 + } + if r.Intn(10) != 0 { + v231 := uint64(uint64(r.Uint32())) + this.CacheReferences = &v231 + } + if r.Intn(10) != 0 { + v232 := uint64(uint64(r.Uint32())) + this.CacheMisses = &v232 + } + if r.Intn(10) != 0 { + v233 := uint64(uint64(r.Uint32())) + this.Branches = &v233 + } + if r.Intn(10) != 0 { + v234 := uint64(uint64(r.Uint32())) + this.BranchMisses = &v234 + } + if r.Intn(10) != 0 { + v235 := uint64(uint64(r.Uint32())) + this.BusCycles = &v235 + } + if r.Intn(10) != 0 { + v236 := uint64(uint64(r.Uint32())) + this.RefCycles = &v236 + } + if r.Intn(10) != 0 { + v237 := float64(r.Float64()) + if r.Intn(2) == 0 { + v237 *= -1 + } + this.CPUClock = &v237 + } + if r.Intn(10) != 0 { + v238 := float64(r.Float64()) + if r.Intn(2) == 0 { + v238 *= -1 + } + this.TaskClock = &v238 + } + if r.Intn(10) != 0 { + v239 := uint64(uint64(r.Uint32())) + this.PageFaults = &v239 + } + if r.Intn(10) != 0 { + v240 := uint64(uint64(r.Uint32())) + this.MinorFaults = &v240 + } + if r.Intn(10) != 0 { + v241 := uint64(uint64(r.Uint32())) + this.MajorFaults = &v241 + } + if r.Intn(10) != 0 { + v242 := uint64(uint64(r.Uint32())) + this.ContextSwitches = &v242 + } + if r.Intn(10) != 0 { + v243 := uint64(uint64(r.Uint32())) + this.CPUMigrations = &v243 + } + if r.Intn(10) != 0 { + v244 := uint64(uint64(r.Uint32())) + this.AlignmentFaults = &v244 + } + if r.Intn(10) != 0 { + v245 := uint64(uint64(r.Uint32())) + this.EmulationFaults = &v245 + } + if r.Intn(10) != 0 { + v246 := uint64(uint64(r.Uint32())) + this.L1DcacheLoads = &v246 + } + if r.Intn(10) != 0 { + v247 := uint64(uint64(r.Uint32())) + this.L1DcacheLoadMisses = &v247 + } + if r.Intn(10) != 0 { + v248 := uint64(uint64(r.Uint32())) + this.L1DcacheStores = &v248 + } + if r.Intn(10) != 0 { + v249 := uint64(uint64(r.Uint32())) + this.L1DcacheStoreMisses = &v249 + } + if r.Intn(10) != 0 { + v250 := uint64(uint64(r.Uint32())) + this.L1DcachePrefetches = &v250 + } + if r.Intn(10) != 0 { + v251 := uint64(uint64(r.Uint32())) + this.L1DcachePrefetchMisses = &v251 + } + if r.Intn(10) != 0 { + v252 := uint64(uint64(r.Uint32())) + this.L1IcacheLoads = &v252 + } + if r.Intn(10) != 0 { + v253 := uint64(uint64(r.Uint32())) + this.L1IcacheLoadMisses = &v253 + } + if r.Intn(10) != 0 { + v254 := uint64(uint64(r.Uint32())) + this.L1IcachePrefetches = &v254 + } + if r.Intn(10) != 0 { + v255 := uint64(uint64(r.Uint32())) + this.L1IcachePrefetchMisses = &v255 + } + if r.Intn(10) != 0 { + v256 := uint64(uint64(r.Uint32())) + this.LLCLoads = &v256 + } + if r.Intn(10) != 0 { + v257 := uint64(uint64(r.Uint32())) + this.LLCLoadMisses = &v257 + } + if r.Intn(10) != 0 { + v258 := uint64(uint64(r.Uint32())) + this.LLCStores = &v258 + } + if r.Intn(10) != 0 { + v259 := uint64(uint64(r.Uint32())) + this.LLCStoreMisses = &v259 + } + if r.Intn(10) != 0 { + v260 := uint64(uint64(r.Uint32())) + this.LLCPrefetches = &v260 + } + if r.Intn(10) != 0 { + v261 := uint64(uint64(r.Uint32())) + this.LLCPrefetchMisses = &v261 + } + if r.Intn(10) != 0 { + v262 := uint64(uint64(r.Uint32())) + this.DTLBLoads = &v262 + } + if r.Intn(10) != 0 { + v263 := uint64(uint64(r.Uint32())) + this.DTLBLoadMisses = &v263 + } + if r.Intn(10) != 0 { + v264 := uint64(uint64(r.Uint32())) + this.DTLBStores = &v264 + } + if r.Intn(10) != 0 { + v265 := uint64(uint64(r.Uint32())) + this.DTLBStoreMisses = &v265 + } + if r.Intn(10) != 0 { + v266 := uint64(uint64(r.Uint32())) + this.DTLBPrefetches = &v266 + } + if r.Intn(10) != 0 { + v267 := uint64(uint64(r.Uint32())) + this.DTLBPrefetchMisses = &v267 + } + if r.Intn(10) != 0 { + v268 := uint64(uint64(r.Uint32())) + this.ITLBLoads = &v268 + } + if r.Intn(10) != 0 { + v269 := uint64(uint64(r.Uint32())) + this.ITLBLoadMisses = &v269 + } + if r.Intn(10) != 0 { + v270 := uint64(uint64(r.Uint32())) + this.BranchLoads = &v270 + } + if r.Intn(10) != 0 { + v271 := uint64(uint64(r.Uint32())) + this.BranchLoadMisses = &v271 + } + if r.Intn(10) != 0 { + v272 := uint64(uint64(r.Uint32())) + this.NodeLoads = &v272 + } + if r.Intn(10) != 0 { + v273 := uint64(uint64(r.Uint32())) + this.NodeLoadMisses = &v273 + } + if r.Intn(10) != 0 { + v274 := uint64(uint64(r.Uint32())) + this.NodeStores = &v274 + } + if r.Intn(10) != 0 { + v275 := uint64(uint64(r.Uint32())) + this.NodeStoreMisses = &v275 + } + if r.Intn(10) != 0 { + v276 := uint64(uint64(r.Uint32())) + this.NodePrefetches = &v276 + } + if r.Intn(10) != 0 { + v277 := uint64(uint64(r.Uint32())) + this.NodePrefetchMisses = &v277 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedRequest(r randyMesos, easy bool) *Request { + this := &Request{} + if r.Intn(10) != 0 { + this.AgentID = NewPopulatedAgentID(r, easy) + } + if r.Intn(10) != 0 { + v278 := r.Intn(5) + this.Resources = make([]Resource, v278) + for i := 0; i < v278; i++ { + v279 := NewPopulatedResource(r, easy) + this.Resources[i] = *v279 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedOffer(r randyMesos, easy bool) *Offer { + this := &Offer{} + v280 := NewPopulatedOfferID(r, easy) + this.ID = *v280 + v281 := NewPopulatedFrameworkID(r, easy) + this.FrameworkID = *v281 + v282 := NewPopulatedAgentID(r, easy) + this.AgentID = *v282 + this.Hostname = string(randStringMesos(r)) + if r.Intn(10) != 0 { + v283 := r.Intn(5) + this.Resources = make([]Resource, v283) + for i := 0; i < v283; i++ { + v284 := NewPopulatedResource(r, easy) + this.Resources[i] = *v284 + } + } + if r.Intn(10) != 0 { + v285 := r.Intn(5) + this.ExecutorIDs = make([]ExecutorID, v285) + for i := 0; i < v285; i++ { + v286 := NewPopulatedExecutorID(r, easy) + this.ExecutorIDs[i] = *v286 + } + } + if r.Intn(10) != 0 { + v287 := r.Intn(5) + this.Attributes = make([]Attribute, v287) + for i := 0; i < v287; i++ { + v288 := NewPopulatedAttribute(r, easy) + this.Attributes[i] = *v288 + } + } + if r.Intn(10) != 0 { + this.URL = NewPopulatedURL(r, easy) + } + if r.Intn(10) != 0 { + this.Unavailability = NewPopulatedUnavailability(r, easy) + } + if r.Intn(10) != 0 { + this.AllocationInfo = NewPopulatedResource_AllocationInfo(r, easy) + } + if r.Intn(10) != 0 { + this.Domain = NewPopulatedDomainInfo(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedOffer_Operation(r randyMesos, easy bool) *Offer_Operation { + this := &Offer_Operation{} + this.Type = Offer_Operation_Type([]int32{0, 1, 6, 2, 3, 4, 5, 7, 8, 9, 10}[r.Intn(11)]) + if r.Intn(10) != 0 { + this.Launch = NewPopulatedOffer_Operation_Launch(r, easy) + } + if r.Intn(10) != 0 { + this.Reserve = NewPopulatedOffer_Operation_Reserve(r, easy) + } + if r.Intn(10) != 0 { + this.Unreserve = NewPopulatedOffer_Operation_Unreserve(r, easy) + } + if r.Intn(10) != 0 { + this.Create = NewPopulatedOffer_Operation_Create(r, easy) + } + if r.Intn(10) != 0 { + this.Destroy = NewPopulatedOffer_Operation_Destroy(r, easy) + } + if r.Intn(10) != 0 { + this.LaunchGroup = NewPopulatedOffer_Operation_LaunchGroup(r, easy) + } + if r.Intn(10) != 0 { + this.CreateVolume = NewPopulatedOffer_Operation_CreateVolume(r, easy) + } + if r.Intn(10) != 0 { + this.DestroyVolume = NewPopulatedOffer_Operation_DestroyVolume(r, easy) + } + if r.Intn(10) != 0 { + this.CreateBlock = NewPopulatedOffer_Operation_CreateBlock(r, easy) + } + if r.Intn(10) != 0 { + this.DestroyBlock = NewPopulatedOffer_Operation_DestroyBlock(r, easy) + } + if r.Intn(10) != 0 { + this.ID = NewPopulatedOperationID(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedOffer_Operation_Launch(r randyMesos, easy bool) *Offer_Operation_Launch { + this := &Offer_Operation_Launch{} + if r.Intn(10) != 0 { + v289 := r.Intn(5) + this.TaskInfos = make([]TaskInfo, v289) + for i := 0; i < v289; i++ { + v290 := NewPopulatedTaskInfo(r, easy) + this.TaskInfos[i] = *v290 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedOffer_Operation_LaunchGroup(r randyMesos, easy bool) *Offer_Operation_LaunchGroup { + this := &Offer_Operation_LaunchGroup{} + v291 := NewPopulatedExecutorInfo(r, easy) + this.Executor = *v291 + v292 := NewPopulatedTaskGroupInfo(r, easy) + this.TaskGroup = *v292 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedOffer_Operation_Reserve(r randyMesos, easy bool) *Offer_Operation_Reserve { + this := &Offer_Operation_Reserve{} + if r.Intn(10) != 0 { + v293 := r.Intn(5) + this.Resources = make([]Resource, v293) + for i := 0; i < v293; i++ { + v294 := NewPopulatedResource(r, easy) + this.Resources[i] = *v294 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedOffer_Operation_Unreserve(r randyMesos, easy bool) *Offer_Operation_Unreserve { + this := &Offer_Operation_Unreserve{} + if r.Intn(10) != 0 { + v295 := r.Intn(5) + this.Resources = make([]Resource, v295) + for i := 0; i < v295; i++ { + v296 := NewPopulatedResource(r, easy) + this.Resources[i] = *v296 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedOffer_Operation_Create(r randyMesos, easy bool) *Offer_Operation_Create { + this := &Offer_Operation_Create{} + if r.Intn(10) != 0 { + v297 := r.Intn(5) + this.Volumes = make([]Resource, v297) + for i := 0; i < v297; i++ { + v298 := NewPopulatedResource(r, easy) + this.Volumes[i] = *v298 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedOffer_Operation_Destroy(r randyMesos, easy bool) *Offer_Operation_Destroy { + this := &Offer_Operation_Destroy{} + if r.Intn(10) != 0 { + v299 := r.Intn(5) + this.Volumes = make([]Resource, v299) + for i := 0; i < v299; i++ { + v300 := NewPopulatedResource(r, easy) + this.Volumes[i] = *v300 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedOffer_Operation_CreateVolume(r randyMesos, easy bool) *Offer_Operation_CreateVolume { + this := &Offer_Operation_CreateVolume{} + v301 := NewPopulatedResource(r, easy) + this.Source = *v301 + this.TargetType = Resource_DiskInfo_Source_Type([]int32{0, 1, 2, 3, 4}[r.Intn(5)]) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedOffer_Operation_DestroyVolume(r randyMesos, easy bool) *Offer_Operation_DestroyVolume { + this := &Offer_Operation_DestroyVolume{} + v302 := NewPopulatedResource(r, easy) + this.Volume = *v302 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedOffer_Operation_CreateBlock(r randyMesos, easy bool) *Offer_Operation_CreateBlock { + this := &Offer_Operation_CreateBlock{} + v303 := NewPopulatedResource(r, easy) + this.Source = *v303 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedOffer_Operation_DestroyBlock(r randyMesos, easy bool) *Offer_Operation_DestroyBlock { + this := &Offer_Operation_DestroyBlock{} + v304 := NewPopulatedResource(r, easy) + this.Block = *v304 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedInverseOffer(r randyMesos, easy bool) *InverseOffer { + this := &InverseOffer{} + v305 := NewPopulatedOfferID(r, easy) + this.OfferID = *v305 + if r.Intn(10) != 0 { + this.URL = NewPopulatedURL(r, easy) + } + v306 := NewPopulatedFrameworkID(r, easy) + this.FrameworkID = *v306 + if r.Intn(10) != 0 { + this.AgentID = NewPopulatedAgentID(r, easy) + } + v307 := NewPopulatedUnavailability(r, easy) + this.Unavailability = *v307 + if r.Intn(10) != 0 { + v308 := r.Intn(5) + this.Resources = make([]Resource, v308) + for i := 0; i < v308; i++ { + v309 := NewPopulatedResource(r, easy) + this.Resources[i] = *v309 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedTaskInfo(r randyMesos, easy bool) *TaskInfo { + this := &TaskInfo{} + this.Name = string(randStringMesos(r)) + v310 := NewPopulatedTaskID(r, easy) + this.TaskID = *v310 + v311 := NewPopulatedAgentID(r, easy) + this.AgentID = *v311 + if r.Intn(10) != 0 { + v312 := r.Intn(5) + this.Resources = make([]Resource, v312) + for i := 0; i < v312; i++ { + v313 := NewPopulatedResource(r, easy) + this.Resources[i] = *v313 + } + } + if r.Intn(10) != 0 { + this.Executor = NewPopulatedExecutorInfo(r, easy) + } + if r.Intn(10) != 0 { + v314 := r.Intn(100) + this.Data = make([]byte, v314) + for i := 0; i < v314; i++ { + this.Data[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + this.Command = NewPopulatedCommandInfo(r, easy) + } + if r.Intn(10) != 0 { + this.HealthCheck = NewPopulatedHealthCheck(r, easy) + } + if r.Intn(10) != 0 { + this.Container = NewPopulatedContainerInfo(r, easy) + } + if r.Intn(10) != 0 { + this.Labels = NewPopulatedLabels(r, easy) + } + if r.Intn(10) != 0 { + this.Discovery = NewPopulatedDiscoveryInfo(r, easy) + } + if r.Intn(10) != 0 { + this.KillPolicy = NewPopulatedKillPolicy(r, easy) + } + if r.Intn(10) != 0 { + this.Check = NewPopulatedCheckInfo(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedTaskGroupInfo(r randyMesos, easy bool) *TaskGroupInfo { + this := &TaskGroupInfo{} + if r.Intn(10) != 0 { + v315 := r.Intn(5) + this.Tasks = make([]TaskInfo, v315) + for i := 0; i < v315; i++ { + v316 := NewPopulatedTaskInfo(r, easy) + this.Tasks[i] = *v316 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedTask(r randyMesos, easy bool) *Task { + this := &Task{} + this.Name = string(randStringMesos(r)) + v317 := NewPopulatedTaskID(r, easy) + this.TaskID = *v317 + v318 := NewPopulatedFrameworkID(r, easy) + this.FrameworkID = *v318 + if r.Intn(10) != 0 { + this.ExecutorID = NewPopulatedExecutorID(r, easy) + } + v319 := NewPopulatedAgentID(r, easy) + this.AgentID = *v319 + v320 := TaskState([]int32{6, 0, 1, 8, 2, 3, 4, 7, 5, 9, 10, 11, 12, 13}[r.Intn(14)]) + this.State = &v320 + if r.Intn(10) != 0 { + v321 := r.Intn(5) + this.Resources = make([]Resource, v321) + for i := 0; i < v321; i++ { + v322 := NewPopulatedResource(r, easy) + this.Resources[i] = *v322 + } + } + if r.Intn(10) == 0 { + v323 := r.Intn(5) + this.Statuses = make([]TaskStatus, v323) + for i := 0; i < v323; i++ { + v324 := NewPopulatedTaskStatus(r, easy) + this.Statuses[i] = *v324 + } + } + if r.Intn(10) != 0 { + v325 := TaskState([]int32{6, 0, 1, 8, 2, 3, 4, 7, 5, 9, 10, 11, 12, 13}[r.Intn(14)]) + this.StatusUpdateState = &v325 + } + if r.Intn(10) != 0 { + v326 := r.Intn(100) + this.StatusUpdateUUID = make([]byte, v326) + for i := 0; i < v326; i++ { + this.StatusUpdateUUID[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + this.Labels = NewPopulatedLabels(r, easy) + } + if r.Intn(10) != 0 { + this.Discovery = NewPopulatedDiscoveryInfo(r, easy) + } + if r.Intn(10) != 0 { + this.Container = NewPopulatedContainerInfo(r, easy) + } + if r.Intn(10) != 0 { + v327 := string(randStringMesos(r)) + this.User = &v327 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedTaskResourceLimitation(r randyMesos, easy bool) *TaskResourceLimitation { + this := &TaskResourceLimitation{} + if r.Intn(10) != 0 { + v328 := r.Intn(5) + this.Resources = make([]Resource, v328) + for i := 0; i < v328; i++ { + v329 := NewPopulatedResource(r, easy) + this.Resources[i] = *v329 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedUUID(r randyMesos, easy bool) *UUID { + this := &UUID{} + v330 := r.Intn(100) + this.Value = make([]byte, v330) + for i := 0; i < v330; i++ { + this.Value[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedOperation(r randyMesos, easy bool) *Operation { + this := &Operation{} + if r.Intn(10) != 0 { + this.FrameworkID = NewPopulatedFrameworkID(r, easy) + } + if r.Intn(10) != 0 { + this.AgentID = NewPopulatedAgentID(r, easy) + } + v331 := NewPopulatedOffer_Operation(r, easy) + this.Info = *v331 + v332 := NewPopulatedOperationStatus(r, easy) + this.LatestStatus = *v332 + if r.Intn(10) != 0 { + v333 := r.Intn(5) + this.Statuses = make([]OperationStatus, v333) + for i := 0; i < v333; i++ { + v334 := NewPopulatedOperationStatus(r, easy) + this.Statuses[i] = *v334 + } + } + v335 := NewPopulatedUUID(r, easy) + this.UUID = *v335 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedOperationStatus(r randyMesos, easy bool) *OperationStatus { + this := &OperationStatus{} + if r.Intn(10) != 0 { + this.OperationID = NewPopulatedOperationID(r, easy) + } + this.State = OperationState([]int32{0, 1, 2, 3, 4, 5}[r.Intn(6)]) + if r.Intn(10) != 0 { + v336 := string(randStringMesos(r)) + this.Message = &v336 + } + if r.Intn(10) != 0 { + v337 := r.Intn(5) + this.ConvertedResources = make([]Resource, v337) + for i := 0; i < v337; i++ { + v338 := NewPopulatedResource(r, easy) + this.ConvertedResources[i] = *v338 + } + } + if r.Intn(10) != 0 { + this.UUID = NewPopulatedUUID(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCheckStatusInfo(r randyMesos, easy bool) *CheckStatusInfo { + this := &CheckStatusInfo{} + if r.Intn(10) != 0 { + v339 := CheckInfo_Type([]int32{0, 1, 2, 3}[r.Intn(4)]) + this.Type = &v339 + } + if r.Intn(10) != 0 { + this.Command = NewPopulatedCheckStatusInfo_Command(r, easy) + } + if r.Intn(10) != 0 { + this.HTTP = NewPopulatedCheckStatusInfo_Http(r, easy) + } + if r.Intn(10) != 0 { + this.TCP = NewPopulatedCheckStatusInfo_Tcp(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCheckStatusInfo_Command(r randyMesos, easy bool) *CheckStatusInfo_Command { + this := &CheckStatusInfo_Command{} + if r.Intn(10) != 0 { + v340 := int32(r.Int31()) + if r.Intn(2) == 0 { + v340 *= -1 + } + this.ExitCode = &v340 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCheckStatusInfo_Http(r randyMesos, easy bool) *CheckStatusInfo_Http { + this := &CheckStatusInfo_Http{} + if r.Intn(10) != 0 { + v341 := uint32(r.Uint32()) + this.StatusCode = &v341 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCheckStatusInfo_Tcp(r randyMesos, easy bool) *CheckStatusInfo_Tcp { + this := &CheckStatusInfo_Tcp{} + if r.Intn(10) != 0 { + v342 := bool(bool(r.Intn(2) == 0)) + this.Succeeded = &v342 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedTaskStatus(r randyMesos, easy bool) *TaskStatus { + this := &TaskStatus{} + v343 := NewPopulatedTaskID(r, easy) + this.TaskID = *v343 + v344 := TaskState([]int32{6, 0, 1, 8, 2, 3, 4, 7, 5, 9, 10, 11, 12, 13}[r.Intn(14)]) + this.State = &v344 + if r.Intn(10) != 0 { + v345 := r.Intn(100) + this.Data = make([]byte, v345) + for i := 0; i < v345; i++ { + this.Data[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + v346 := string(randStringMesos(r)) + this.Message = &v346 + } + if r.Intn(10) != 0 { + this.AgentID = NewPopulatedAgentID(r, easy) + } + if r.Intn(10) != 0 { + v347 := float64(r.Float64()) + if r.Intn(2) == 0 { + v347 *= -1 + } + this.Timestamp = &v347 + } + if r.Intn(10) != 0 { + this.ExecutorID = NewPopulatedExecutorID(r, easy) + } + if r.Intn(10) != 0 { + v348 := bool(bool(r.Intn(2) == 0)) + this.Healthy = &v348 + } + if r.Intn(10) != 0 { + v349 := TaskStatus_Source([]int32{0, 1, 2}[r.Intn(3)]) + this.Source = &v349 + } + if r.Intn(10) != 0 { + v350 := TaskStatus_Reason([]int32{0, 21, 19, 20, 8, 17, 22, 23, 24, 1, 2, 3, 4, 5, 6, 27, 7, 9, 18, 10, 11, 31, 32, 12, 13, 30, 28, 29, 25, 26, 14, 15, 16}[r.Intn(33)]) + this.Reason = &v350 + } + if r.Intn(10) != 0 { + v351 := r.Intn(100) + this.UUID = make([]byte, v351) + for i := 0; i < v351; i++ { + this.UUID[i] = byte(r.Intn(256)) + } + } + if r.Intn(10) != 0 { + this.Labels = NewPopulatedLabels(r, easy) + } + if r.Intn(10) == 0 { + this.ContainerStatus = NewPopulatedContainerStatus(r, easy) + } + if r.Intn(10) != 0 { + this.UnreachableTime = NewPopulatedTimeInfo(r, easy) + } + if r.Intn(10) != 0 { + this.CheckStatus = NewPopulatedCheckStatusInfo(r, easy) + } + if r.Intn(10) != 0 { + this.Limitation = NewPopulatedTaskResourceLimitation(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedFilters(r randyMesos, easy bool) *Filters { + this := &Filters{} + if r.Intn(10) != 0 { + v352 := float64(r.Float64()) + if r.Intn(2) == 0 { + v352 *= -1 + } + this.RefuseSeconds = &v352 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedEnvironment(r randyMesos, easy bool) *Environment { + this := &Environment{} + if r.Intn(10) != 0 { + v353 := r.Intn(5) + this.Variables = make([]Environment_Variable, v353) + for i := 0; i < v353; i++ { + v354 := NewPopulatedEnvironment_Variable(r, easy) + this.Variables[i] = *v354 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedEnvironment_Variable(r randyMesos, easy bool) *Environment_Variable { + this := &Environment_Variable{} + this.Name = string(randStringMesos(r)) + if r.Intn(10) != 0 { + v355 := string(randStringMesos(r)) + this.Value = &v355 + } + if r.Intn(10) != 0 { + v356 := Environment_Variable_Type([]int32{0, 1, 2}[r.Intn(3)]) + this.Type = &v356 + } + if r.Intn(10) != 0 { + this.Secret = NewPopulatedSecret(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedParameter(r randyMesos, easy bool) *Parameter { + this := &Parameter{} + this.Key = string(randStringMesos(r)) + this.Value = string(randStringMesos(r)) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedParameters(r randyMesos, easy bool) *Parameters { + this := &Parameters{} + if r.Intn(10) != 0 { + v357 := r.Intn(5) + this.Parameter = make([]Parameter, v357) + for i := 0; i < v357; i++ { + v358 := NewPopulatedParameter(r, easy) + this.Parameter[i] = *v358 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCredential(r randyMesos, easy bool) *Credential { + this := &Credential{} + this.Principal = string(randStringMesos(r)) + if r.Intn(10) != 0 { + v359 := string(randStringMesos(r)) + this.Secret = &v359 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCredentials(r randyMesos, easy bool) *Credentials { + this := &Credentials{} + if r.Intn(10) != 0 { + v360 := r.Intn(5) + this.Credentials = make([]Credential, v360) + for i := 0; i < v360; i++ { + v361 := NewPopulatedCredential(r, easy) + this.Credentials[i] = *v361 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedSecret(r randyMesos, easy bool) *Secret { + this := &Secret{} + this.Type = Secret_Type([]int32{0, 1, 2}[r.Intn(3)]) + if r.Intn(10) != 0 { + this.Reference = NewPopulatedSecret_Reference(r, easy) + } + if r.Intn(10) != 0 { + this.Value = NewPopulatedSecret_Value(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedSecret_Reference(r randyMesos, easy bool) *Secret_Reference { + this := &Secret_Reference{} + this.Name = string(randStringMesos(r)) + if r.Intn(10) != 0 { + v362 := string(randStringMesos(r)) + this.Key = &v362 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedSecret_Value(r randyMesos, easy bool) *Secret_Value { + this := &Secret_Value{} + v363 := r.Intn(100) + this.Data = make([]byte, v363) + for i := 0; i < v363; i++ { + this.Data[i] = byte(r.Intn(256)) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedRateLimit(r randyMesos, easy bool) *RateLimit { + this := &RateLimit{} + if r.Intn(10) != 0 { + v364 := float64(r.Float64()) + if r.Intn(2) == 0 { + v364 *= -1 + } + this.QPS = &v364 + } + this.Principal = string(randStringMesos(r)) + if r.Intn(10) != 0 { + v365 := uint64(uint64(r.Uint32())) + this.Capacity = &v365 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedRateLimits(r randyMesos, easy bool) *RateLimits { + this := &RateLimits{} + if r.Intn(10) != 0 { + v366 := r.Intn(5) + this.Limits = make([]RateLimit, v366) + for i := 0; i < v366; i++ { + v367 := NewPopulatedRateLimit(r, easy) + this.Limits[i] = *v367 + } + } + if r.Intn(10) != 0 { + v368 := float64(r.Float64()) + if r.Intn(2) == 0 { + v368 *= -1 + } + this.AggregateDefaultQPS = &v368 + } + if r.Intn(10) != 0 { + v369 := uint64(uint64(r.Uint32())) + this.AggregateDefaultCapacity = &v369 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedImage(r randyMesos, easy bool) *Image { + this := &Image{} + v370 := Image_Type([]int32{1, 2}[r.Intn(2)]) + this.Type = &v370 + if r.Intn(10) != 0 { + this.Appc = NewPopulatedImage_Appc(r, easy) + } + if r.Intn(10) != 0 { + this.Docker = NewPopulatedImage_Docker(r, easy) + } + if r.Intn(10) != 0 { + v371 := bool(bool(r.Intn(2) == 0)) + this.Cached = &v371 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedImage_Appc(r randyMesos, easy bool) *Image_Appc { + this := &Image_Appc{} + this.Name = string(randStringMesos(r)) + if r.Intn(10) != 0 { + v372 := string(randStringMesos(r)) + this.ID = &v372 + } + if r.Intn(10) != 0 { + this.Labels = NewPopulatedLabels(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedImage_Docker(r randyMesos, easy bool) *Image_Docker { + this := &Image_Docker{} + this.Name = string(randStringMesos(r)) + if r.Intn(10) != 0 { + this.Credential = NewPopulatedCredential(r, easy) + } + if r.Intn(10) != 0 { + this.Config = NewPopulatedSecret(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedMountPropagation(r randyMesos, easy bool) *MountPropagation { + this := &MountPropagation{} + if r.Intn(10) != 0 { + v373 := MountPropagation_Mode([]int32{0, 1, 2}[r.Intn(3)]) + this.Mode = &v373 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedVolume(r randyMesos, easy bool) *Volume { + this := &Volume{} + this.ContainerPath = string(randStringMesos(r)) + if r.Intn(10) != 0 { + v374 := string(randStringMesos(r)) + this.HostPath = &v374 + } + v375 := Volume_Mode([]int32{1, 2}[r.Intn(2)]) + this.Mode = &v375 + if r.Intn(10) != 0 { + this.Image = NewPopulatedImage(r, easy) + } + if r.Intn(10) != 0 { + this.Source = NewPopulatedVolume_Source(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedVolume_Source(r randyMesos, easy bool) *Volume_Source { + this := &Volume_Source{} + this.Type = Volume_Source_Type([]int32{0, 1, 4, 2, 3}[r.Intn(5)]) + if r.Intn(10) != 0 { + this.DockerVolume = NewPopulatedVolume_Source_DockerVolume(r, easy) + } + if r.Intn(10) != 0 { + this.SandboxPath = NewPopulatedVolume_Source_SandboxPath(r, easy) + } + if r.Intn(10) != 0 { + this.Secret = NewPopulatedSecret(r, easy) + } + if r.Intn(10) != 0 { + this.HostPath = NewPopulatedVolume_Source_HostPath(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedVolume_Source_DockerVolume(r randyMesos, easy bool) *Volume_Source_DockerVolume { + this := &Volume_Source_DockerVolume{} + if r.Intn(10) != 0 { + v376 := string(randStringMesos(r)) + this.Driver = &v376 + } + this.Name = string(randStringMesos(r)) + if r.Intn(10) != 0 { + this.DriverOptions = NewPopulatedParameters(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedVolume_Source_HostPath(r randyMesos, easy bool) *Volume_Source_HostPath { + this := &Volume_Source_HostPath{} + this.Path = string(randStringMesos(r)) + if r.Intn(10) != 0 { + this.MountPropagation = NewPopulatedMountPropagation(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedVolume_Source_SandboxPath(r randyMesos, easy bool) *Volume_Source_SandboxPath { + this := &Volume_Source_SandboxPath{} + this.Type = Volume_Source_SandboxPath_Type([]int32{0, 1, 2}[r.Intn(3)]) + this.Path = string(randStringMesos(r)) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNetworkInfo(r randyMesos, easy bool) *NetworkInfo { + this := &NetworkInfo{} + if r.Intn(10) != 0 { + v377 := r.Intn(10) + this.Groups = make([]string, v377) + for i := 0; i < v377; i++ { + this.Groups[i] = string(randStringMesos(r)) + } + } + if r.Intn(10) != 0 { + this.Labels = NewPopulatedLabels(r, easy) + } + if r.Intn(10) != 0 { + v378 := r.Intn(5) + this.IPAddresses = make([]NetworkInfo_IPAddress, v378) + for i := 0; i < v378; i++ { + v379 := NewPopulatedNetworkInfo_IPAddress(r, easy) + this.IPAddresses[i] = *v379 + } + } + if r.Intn(10) != 0 { + v380 := string(randStringMesos(r)) + this.Name = &v380 + } + if r.Intn(10) != 0 { + v381 := r.Intn(5) + this.PortMappings = make([]NetworkInfo_PortMapping, v381) + for i := 0; i < v381; i++ { + v382 := NewPopulatedNetworkInfo_PortMapping(r, easy) + this.PortMappings[i] = *v382 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNetworkInfo_IPAddress(r randyMesos, easy bool) *NetworkInfo_IPAddress { + this := &NetworkInfo_IPAddress{} + if r.Intn(10) != 0 { + v383 := NetworkInfo_Protocol([]int32{1, 2}[r.Intn(2)]) + this.Protocol = &v383 + } + if r.Intn(10) != 0 { + v384 := string(randStringMesos(r)) + this.IPAddress = &v384 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedNetworkInfo_PortMapping(r randyMesos, easy bool) *NetworkInfo_PortMapping { + this := &NetworkInfo_PortMapping{} + this.HostPort = uint32(r.Uint32()) + this.ContainerPort = uint32(r.Uint32()) + if r.Intn(10) != 0 { + v385 := string(randStringMesos(r)) + this.Protocol = &v385 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCapabilityInfo(r randyMesos, easy bool) *CapabilityInfo { + this := &CapabilityInfo{} + if r.Intn(10) != 0 { + v386 := r.Intn(10) + this.Capabilities = make([]CapabilityInfo_Capability, v386) + for i := 0; i < v386; i++ { + this.Capabilities[i] = CapabilityInfo_Capability([]int32{0, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037}[r.Intn(39)]) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedLinuxInfo(r randyMesos, easy bool) *LinuxInfo { + this := &LinuxInfo{} + if r.Intn(10) != 0 { + this.CapabilityInfo = NewPopulatedCapabilityInfo(r, easy) + } + if r.Intn(10) != 0 { + this.BoundingCapabilities = NewPopulatedCapabilityInfo(r, easy) + } + if r.Intn(10) != 0 { + this.EffectiveCapabilities = NewPopulatedCapabilityInfo(r, easy) + } + if r.Intn(10) != 0 { + v387 := bool(bool(r.Intn(2) == 0)) + this.SharePIDNamespace = &v387 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedRLimitInfo(r randyMesos, easy bool) *RLimitInfo { + this := &RLimitInfo{} + if r.Intn(10) != 0 { + v388 := r.Intn(5) + this.Rlimits = make([]RLimitInfo_RLimit, v388) + for i := 0; i < v388; i++ { + v389 := NewPopulatedRLimitInfo_RLimit(r, easy) + this.Rlimits[i] = *v389 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedRLimitInfo_RLimit(r randyMesos, easy bool) *RLimitInfo_RLimit { + this := &RLimitInfo_RLimit{} + this.Type = RLimitInfo_RLimit_Type([]int32{0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}[r.Intn(17)]) + if r.Intn(10) != 0 { + v390 := uint64(uint64(r.Uint32())) + this.Hard = &v390 + } + if r.Intn(10) != 0 { + v391 := uint64(uint64(r.Uint32())) + this.Soft = &v391 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedTTYInfo(r randyMesos, easy bool) *TTYInfo { + this := &TTYInfo{} + if r.Intn(10) != 0 { + this.WindowSize = NewPopulatedTTYInfo_WindowSize(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedTTYInfo_WindowSize(r randyMesos, easy bool) *TTYInfo_WindowSize { + this := &TTYInfo_WindowSize{} + this.Rows = uint32(r.Uint32()) + this.Columns = uint32(r.Uint32()) + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedContainerInfo(r randyMesos, easy bool) *ContainerInfo { + this := &ContainerInfo{} + v392 := ContainerInfo_Type([]int32{1, 2}[r.Intn(2)]) + this.Type = &v392 + if r.Intn(10) != 0 { + v393 := r.Intn(5) + this.Volumes = make([]Volume, v393) + for i := 0; i < v393; i++ { + v394 := NewPopulatedVolume(r, easy) + this.Volumes[i] = *v394 + } + } + if r.Intn(10) != 0 { + this.Docker = NewPopulatedContainerInfo_DockerInfo(r, easy) + } + if r.Intn(10) != 0 { + v395 := string(randStringMesos(r)) + this.Hostname = &v395 + } + if r.Intn(10) != 0 { + this.Mesos = NewPopulatedContainerInfo_MesosInfo(r, easy) + } + if r.Intn(10) != 0 { + v396 := r.Intn(5) + this.NetworkInfos = make([]NetworkInfo, v396) + for i := 0; i < v396; i++ { + v397 := NewPopulatedNetworkInfo(r, easy) + this.NetworkInfos[i] = *v397 + } + } + if r.Intn(10) != 0 { + this.LinuxInfo = NewPopulatedLinuxInfo(r, easy) + } + if r.Intn(10) != 0 { + this.RlimitInfo = NewPopulatedRLimitInfo(r, easy) + } + if r.Intn(10) != 0 { + this.TTYInfo = NewPopulatedTTYInfo(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedContainerInfo_DockerInfo(r randyMesos, easy bool) *ContainerInfo_DockerInfo { + this := &ContainerInfo_DockerInfo{} + this.Image = string(randStringMesos(r)) + if r.Intn(10) != 0 { + v398 := ContainerInfo_DockerInfo_Network([]int32{1, 2, 3, 4}[r.Intn(4)]) + this.Network = &v398 + } + if r.Intn(10) != 0 { + v399 := r.Intn(5) + this.PortMappings = make([]ContainerInfo_DockerInfo_PortMapping, v399) + for i := 0; i < v399; i++ { + v400 := NewPopulatedContainerInfo_DockerInfo_PortMapping(r, easy) + this.PortMappings[i] = *v400 + } + } + if r.Intn(10) != 0 { + v401 := bool(bool(r.Intn(2) == 0)) + this.Privileged = &v401 + } + if r.Intn(10) != 0 { + v402 := r.Intn(5) + this.Parameters = make([]Parameter, v402) + for i := 0; i < v402; i++ { + v403 := NewPopulatedParameter(r, easy) + this.Parameters[i] = *v403 + } + } + if r.Intn(10) != 0 { + v404 := bool(bool(r.Intn(2) == 0)) + this.ForcePullImage = &v404 + } + if r.Intn(10) != 0 { + v405 := string(randStringMesos(r)) + this.VolumeDriver = &v405 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedContainerInfo_DockerInfo_PortMapping(r randyMesos, easy bool) *ContainerInfo_DockerInfo_PortMapping { + this := &ContainerInfo_DockerInfo_PortMapping{} + this.HostPort = uint32(r.Uint32()) + this.ContainerPort = uint32(r.Uint32()) + if r.Intn(10) != 0 { + v406 := string(randStringMesos(r)) + this.Protocol = &v406 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedContainerInfo_MesosInfo(r randyMesos, easy bool) *ContainerInfo_MesosInfo { + this := &ContainerInfo_MesosInfo{} + if r.Intn(10) != 0 { + this.Image = NewPopulatedImage(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedContainerStatus(r randyMesos, easy bool) *ContainerStatus { + this := &ContainerStatus{} + if r.Intn(10) != 0 { + v407 := r.Intn(5) + this.NetworkInfos = make([]NetworkInfo, v407) + for i := 0; i < v407; i++ { + v408 := NewPopulatedNetworkInfo(r, easy) + this.NetworkInfos[i] = *v408 + } + } + if r.Intn(10) != 0 { + this.CgroupInfo = NewPopulatedCgroupInfo(r, easy) + } + if r.Intn(10) != 0 { + v409 := uint32(r.Uint32()) + this.ExecutorPID = &v409 + } + if r.Intn(10) == 0 { + this.ContainerID = NewPopulatedContainerID(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCgroupInfo(r randyMesos, easy bool) *CgroupInfo { + this := &CgroupInfo{} + if r.Intn(10) != 0 { + this.NetCLS = NewPopulatedCgroupInfo_NetCls(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCgroupInfo_Blkio(r randyMesos, easy bool) *CgroupInfo_Blkio { + this := &CgroupInfo_Blkio{} + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCgroupInfo_Blkio_Value(r randyMesos, easy bool) *CgroupInfo_Blkio_Value { + this := &CgroupInfo_Blkio_Value{} + if r.Intn(10) != 0 { + v410 := CgroupInfo_Blkio_Operation([]int32{0, 1, 2, 3, 4, 5}[r.Intn(6)]) + this.Op = &v410 + } + if r.Intn(10) != 0 { + v411 := uint64(uint64(r.Uint32())) + this.Value = &v411 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCgroupInfo_Blkio_CFQ(r randyMesos, easy bool) *CgroupInfo_Blkio_CFQ { + this := &CgroupInfo_Blkio_CFQ{} + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCgroupInfo_Blkio_CFQ_Statistics(r randyMesos, easy bool) *CgroupInfo_Blkio_CFQ_Statistics { + this := &CgroupInfo_Blkio_CFQ_Statistics{} + if r.Intn(10) != 0 { + this.Device = NewPopulatedDevice_Number(r, easy) + } + if r.Intn(10) != 0 { + v412 := uint64(uint64(r.Uint32())) + this.Sectors = &v412 + } + if r.Intn(10) != 0 { + v413 := uint64(uint64(r.Uint32())) + this.Time = &v413 + } + if r.Intn(10) != 0 { + v414 := r.Intn(5) + this.IOServiced = make([]CgroupInfo_Blkio_Value, v414) + for i := 0; i < v414; i++ { + v415 := NewPopulatedCgroupInfo_Blkio_Value(r, easy) + this.IOServiced[i] = *v415 + } + } + if r.Intn(10) != 0 { + v416 := r.Intn(5) + this.IOServiceBytes = make([]CgroupInfo_Blkio_Value, v416) + for i := 0; i < v416; i++ { + v417 := NewPopulatedCgroupInfo_Blkio_Value(r, easy) + this.IOServiceBytes[i] = *v417 + } + } + if r.Intn(10) != 0 { + v418 := r.Intn(5) + this.IOServiceTime = make([]CgroupInfo_Blkio_Value, v418) + for i := 0; i < v418; i++ { + v419 := NewPopulatedCgroupInfo_Blkio_Value(r, easy) + this.IOServiceTime[i] = *v419 + } + } + if r.Intn(10) != 0 { + v420 := r.Intn(5) + this.IOWaitTime = make([]CgroupInfo_Blkio_Value, v420) + for i := 0; i < v420; i++ { + v421 := NewPopulatedCgroupInfo_Blkio_Value(r, easy) + this.IOWaitTime[i] = *v421 + } + } + if r.Intn(10) != 0 { + v422 := r.Intn(5) + this.IOMerged = make([]CgroupInfo_Blkio_Value, v422) + for i := 0; i < v422; i++ { + v423 := NewPopulatedCgroupInfo_Blkio_Value(r, easy) + this.IOMerged[i] = *v423 + } + } + if r.Intn(10) != 0 { + v424 := r.Intn(5) + this.IOQueued = make([]CgroupInfo_Blkio_Value, v424) + for i := 0; i < v424; i++ { + v425 := NewPopulatedCgroupInfo_Blkio_Value(r, easy) + this.IOQueued[i] = *v425 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCgroupInfo_Blkio_Throttling(r randyMesos, easy bool) *CgroupInfo_Blkio_Throttling { + this := &CgroupInfo_Blkio_Throttling{} + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCgroupInfo_Blkio_Throttling_Statistics(r randyMesos, easy bool) *CgroupInfo_Blkio_Throttling_Statistics { + this := &CgroupInfo_Blkio_Throttling_Statistics{} + if r.Intn(10) != 0 { + this.Device = NewPopulatedDevice_Number(r, easy) + } + if r.Intn(10) != 0 { + v426 := r.Intn(5) + this.IOServiced = make([]CgroupInfo_Blkio_Value, v426) + for i := 0; i < v426; i++ { + v427 := NewPopulatedCgroupInfo_Blkio_Value(r, easy) + this.IOServiced[i] = *v427 + } + } + if r.Intn(10) != 0 { + v428 := r.Intn(5) + this.IOServiceBytes = make([]CgroupInfo_Blkio_Value, v428) + for i := 0; i < v428; i++ { + v429 := NewPopulatedCgroupInfo_Blkio_Value(r, easy) + this.IOServiceBytes[i] = *v429 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCgroupInfo_Blkio_Statistics(r randyMesos, easy bool) *CgroupInfo_Blkio_Statistics { + this := &CgroupInfo_Blkio_Statistics{} + if r.Intn(10) != 0 { + v430 := r.Intn(5) + this.CFQ = make([]CgroupInfo_Blkio_CFQ_Statistics, v430) + for i := 0; i < v430; i++ { + v431 := NewPopulatedCgroupInfo_Blkio_CFQ_Statistics(r, easy) + this.CFQ[i] = *v431 + } + } + if r.Intn(10) != 0 { + v432 := r.Intn(5) + this.CFQRecursive = make([]CgroupInfo_Blkio_CFQ_Statistics, v432) + for i := 0; i < v432; i++ { + v433 := NewPopulatedCgroupInfo_Blkio_CFQ_Statistics(r, easy) + this.CFQRecursive[i] = *v433 + } + } + if r.Intn(10) != 0 { + v434 := r.Intn(5) + this.Throttling = make([]*CgroupInfo_Blkio_Throttling_Statistics, v434) + for i := 0; i < v434; i++ { + this.Throttling[i] = NewPopulatedCgroupInfo_Blkio_Throttling_Statistics(r, easy) + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedCgroupInfo_NetCls(r randyMesos, easy bool) *CgroupInfo_NetCls { + this := &CgroupInfo_NetCls{} + if r.Intn(10) != 0 { + v435 := uint32(r.Uint32()) + this.ClassID = &v435 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedLabels(r randyMesos, easy bool) *Labels { + this := &Labels{} + if r.Intn(10) != 0 { + v436 := r.Intn(5) + this.Labels = make([]Label, v436) + for i := 0; i < v436; i++ { + v437 := NewPopulatedLabel(r, easy) + this.Labels[i] = *v437 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedLabel(r randyMesos, easy bool) *Label { + this := &Label{} + this.Key = string(randStringMesos(r)) + if r.Intn(10) != 0 { + v438 := string(randStringMesos(r)) + this.Value = &v438 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedPort(r randyMesos, easy bool) *Port { + this := &Port{} + this.Number = uint32(r.Uint32()) + if r.Intn(10) != 0 { + v439 := string(randStringMesos(r)) + this.Name = &v439 + } + if r.Intn(10) != 0 { + v440 := string(randStringMesos(r)) + this.Protocol = &v440 + } + if r.Intn(10) != 0 { + v441 := DiscoveryInfo_Visibility([]int32{0, 1, 2}[r.Intn(3)]) + this.Visibility = &v441 + } + if r.Intn(10) != 0 { + this.Labels = NewPopulatedLabels(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedPorts(r randyMesos, easy bool) *Ports { + this := &Ports{} + if r.Intn(10) != 0 { + v442 := r.Intn(5) + this.Ports = make([]Port, v442) + for i := 0; i < v442; i++ { + v443 := NewPopulatedPort(r, easy) + this.Ports[i] = *v443 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedDiscoveryInfo(r randyMesos, easy bool) *DiscoveryInfo { + this := &DiscoveryInfo{} + this.Visibility = DiscoveryInfo_Visibility([]int32{0, 1, 2}[r.Intn(3)]) + if r.Intn(10) != 0 { + v444 := string(randStringMesos(r)) + this.Name = &v444 + } + if r.Intn(10) != 0 { + v445 := string(randStringMesos(r)) + this.Environment = &v445 + } + if r.Intn(10) != 0 { + v446 := string(randStringMesos(r)) + this.Location = &v446 + } + if r.Intn(10) != 0 { + v447 := string(randStringMesos(r)) + this.Version = &v447 + } + if r.Intn(10) != 0 { + this.Ports = NewPopulatedPorts(r, easy) + } + if r.Intn(10) != 0 { + this.Labels = NewPopulatedLabels(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedWeightInfo(r randyMesos, easy bool) *WeightInfo { + this := &WeightInfo{} + this.Weight = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Weight *= -1 + } + if r.Intn(10) != 0 { + v448 := string(randStringMesos(r)) + this.Role = &v448 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedVersionInfo(r randyMesos, easy bool) *VersionInfo { + this := &VersionInfo{} + this.Version = string(randStringMesos(r)) + if r.Intn(10) != 0 { + v449 := string(randStringMesos(r)) + this.BuildDate = &v449 + } + if r.Intn(10) != 0 { + v450 := float64(r.Float64()) + if r.Intn(2) == 0 { + v450 *= -1 + } + this.BuildTime = &v450 + } + if r.Intn(10) != 0 { + v451 := string(randStringMesos(r)) + this.BuildUser = &v451 + } + if r.Intn(10) != 0 { + v452 := string(randStringMesos(r)) + this.GitSHA = &v452 + } + if r.Intn(10) != 0 { + v453 := string(randStringMesos(r)) + this.GitBranch = &v453 + } + if r.Intn(10) != 0 { + v454 := string(randStringMesos(r)) + this.GitTag = &v454 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedFlag(r randyMesos, easy bool) *Flag { + this := &Flag{} + this.Name = string(randStringMesos(r)) + if r.Intn(10) != 0 { + v455 := string(randStringMesos(r)) + this.Value = &v455 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedRole(r randyMesos, easy bool) *Role { + this := &Role{} + this.Name = string(randStringMesos(r)) + this.Weight = float64(r.Float64()) + if r.Intn(2) == 0 { + this.Weight *= -1 + } + if r.Intn(10) != 0 { + v456 := r.Intn(5) + this.Frameworks = make([]FrameworkID, v456) + for i := 0; i < v456; i++ { + v457 := NewPopulatedFrameworkID(r, easy) + this.Frameworks[i] = *v457 + } + } + if r.Intn(10) != 0 { + v458 := r.Intn(5) + this.Resources = make([]Resource, v458) + for i := 0; i < v458; i++ { + v459 := NewPopulatedResource(r, easy) + this.Resources[i] = *v459 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedMetric(r randyMesos, easy bool) *Metric { + this := &Metric{} + this.Name = string(randStringMesos(r)) + if r.Intn(10) != 0 { + v460 := float64(r.Float64()) + if r.Intn(2) == 0 { + v460 *= -1 + } + this.Value = &v460 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedFileInfo(r randyMesos, easy bool) *FileInfo { + this := &FileInfo{} + this.Path = string(randStringMesos(r)) + if r.Intn(10) != 0 { + v461 := int32(r.Int31()) + if r.Intn(2) == 0 { + v461 *= -1 + } + this.Nlink = &v461 + } + if r.Intn(10) != 0 { + v462 := uint64(uint64(r.Uint32())) + this.Size = &v462 + } + if r.Intn(10) != 0 { + this.Mtime = NewPopulatedTimeInfo(r, easy) + } + if r.Intn(10) != 0 { + v463 := uint32(r.Uint32()) + this.Mode = &v463 + } + if r.Intn(10) != 0 { + v464 := string(randStringMesos(r)) + this.UID = &v464 + } + if r.Intn(10) != 0 { + v465 := string(randStringMesos(r)) + this.GID = &v465 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedDevice(r randyMesos, easy bool) *Device { + this := &Device{} + if r.Intn(10) != 0 { + v466 := string(randStringMesos(r)) + this.Path = &v466 + } + if r.Intn(10) != 0 { + this.Number = NewPopulatedDevice_Number(r, easy) + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedDevice_Number(r randyMesos, easy bool) *Device_Number { + this := &Device_Number{} + v467 := uint64(uint64(r.Uint32())) + this.MajorNumber = &v467 + v468 := uint64(uint64(r.Uint32())) + this.MinorNumber = &v468 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedDeviceAccess(r randyMesos, easy bool) *DeviceAccess { + this := &DeviceAccess{} + v469 := NewPopulatedDevice(r, easy) + this.Device = *v469 + v470 := NewPopulatedDeviceAccess_Access(r, easy) + this.Access = *v470 + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedDeviceAccess_Access(r randyMesos, easy bool) *DeviceAccess_Access { + this := &DeviceAccess_Access{} + if r.Intn(10) != 0 { + v471 := bool(bool(r.Intn(2) == 0)) + this.Read = &v471 + } + if r.Intn(10) != 0 { + v472 := bool(bool(r.Intn(2) == 0)) + this.Write = &v472 + } + if r.Intn(10) != 0 { + v473 := bool(bool(r.Intn(2) == 0)) + this.Mknod = &v473 + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +func NewPopulatedDeviceWhitelist(r randyMesos, easy bool) *DeviceWhitelist { + this := &DeviceWhitelist{} + if r.Intn(10) != 0 { + v474 := r.Intn(5) + this.AllowedDevices = make([]DeviceAccess, v474) + for i := 0; i < v474; i++ { + v475 := NewPopulatedDeviceAccess(r, easy) + this.AllowedDevices[i] = *v475 + } + } + if !easy && r.Intn(10) != 0 { + } + return this +} + +type randyMesos interface { + Float32() float32 + Float64() float64 + Int63() int64 + Int31() int32 + Uint32() uint32 + Intn(n int) int +} + +func randUTF8RuneMesos(r randyMesos) rune { + ru := r.Intn(62) + if ru < 10 { + return rune(ru + 48) + } else if ru < 36 { + return rune(ru + 55) + } + return rune(ru + 61) +} +func randStringMesos(r randyMesos) string { + v476 := r.Intn(100) + tmps := make([]rune, v476) + for i := 0; i < v476; i++ { + tmps[i] = randUTF8RuneMesos(r) + } + return string(tmps) +} +func randUnrecognizedMesos(r randyMesos, maxFieldNumber int) (dAtA []byte) { + l := r.Intn(5) + for i := 0; i < l; i++ { + wire := r.Intn(4) + if wire == 3 { + wire = 5 + } + fieldNumber := maxFieldNumber + r.Intn(100) + dAtA = randFieldMesos(dAtA, r, fieldNumber, wire) + } + return dAtA +} +func randFieldMesos(dAtA []byte, r randyMesos, fieldNumber int, wire int) []byte { + key := uint32(fieldNumber)<<3 | uint32(wire) + switch wire { + case 0: + dAtA = encodeVarintPopulateMesos(dAtA, uint64(key)) + v477 := r.Int63() + if r.Intn(2) == 0 { + v477 *= -1 + } + dAtA = encodeVarintPopulateMesos(dAtA, uint64(v477)) + case 1: + dAtA = encodeVarintPopulateMesos(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + case 2: + dAtA = encodeVarintPopulateMesos(dAtA, uint64(key)) + ll := r.Intn(100) + dAtA = encodeVarintPopulateMesos(dAtA, uint64(ll)) + for j := 0; j < ll; j++ { + dAtA = append(dAtA, byte(r.Intn(256))) + } + default: + dAtA = encodeVarintPopulateMesos(dAtA, uint64(key)) + dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) + } + return dAtA +} +func encodeVarintPopulateMesos(dAtA []byte, v uint64) []byte { + for v >= 1<<7 { + dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) + v >>= 7 + } + dAtA = append(dAtA, uint8(v)) + return dAtA +} +func (m *FrameworkID) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Value) + n += 1 + l + sovMesos(uint64(l)) + return n +} + +func (m *OfferID) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Value) + n += 1 + l + sovMesos(uint64(l)) + return n +} + +func (m *AgentID) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Value) + n += 1 + l + sovMesos(uint64(l)) + return n +} + +func (m *TaskID) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Value) + n += 1 + l + sovMesos(uint64(l)) + return n +} + +func (m *ExecutorID) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Value) + n += 1 + l + sovMesos(uint64(l)) + return n +} + +func (m *ContainerID) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Value) + n += 1 + l + sovMesos(uint64(l)) + if m.Parent != nil { + l = m.Parent.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *ResourceProviderID) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Value) + n += 1 + l + sovMesos(uint64(l)) + return n +} + +func (m *OperationID) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Value) + n += 1 + l + sovMesos(uint64(l)) + return n +} + +func (m *TimeInfo) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Nanoseconds)) + return n +} + +func (m *DurationInfo) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Nanoseconds)) + return n +} + +func (m *Address) ProtoSize() (n int) { + var l int + _ = l + if m.Hostname != nil { + l = len(*m.Hostname) + n += 1 + l + sovMesos(uint64(l)) + } + if m.IP != nil { + l = len(*m.IP) + n += 1 + l + sovMesos(uint64(l)) + } + n += 1 + sovMesos(uint64(m.Port)) + return n +} + +func (m *URL) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Scheme) + n += 1 + l + sovMesos(uint64(l)) + l = m.Address.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + if m.Path != nil { + l = len(*m.Path) + n += 1 + l + sovMesos(uint64(l)) + } + if len(m.Query) > 0 { + for _, e := range m.Query { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.Fragment != nil { + l = len(*m.Fragment) + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Unavailability) ProtoSize() (n int) { + var l int + _ = l + l = m.Start.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + if m.Duration != nil { + l = m.Duration.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *MachineID) ProtoSize() (n int) { + var l int + _ = l + if m.Hostname != nil { + l = len(*m.Hostname) + n += 1 + l + sovMesos(uint64(l)) + } + if m.IP != nil { + l = len(*m.IP) + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *MachineInfo) ProtoSize() (n int) { + var l int + _ = l + l = m.ID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + if m.Mode != nil { + n += 1 + sovMesos(uint64(*m.Mode)) + } + if m.Unavailability != nil { + l = m.Unavailability.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *FrameworkInfo) ProtoSize() (n int) { + var l int + _ = l + l = len(m.User) + n += 1 + l + sovMesos(uint64(l)) + l = len(m.Name) + n += 1 + l + sovMesos(uint64(l)) + if m.ID != nil { + l = m.ID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.FailoverTimeout != nil { + n += 9 + } + if m.Checkpoint != nil { + n += 2 + } + if m.Role != nil { + l = len(*m.Role) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Hostname != nil { + l = len(*m.Hostname) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Principal != nil { + l = len(*m.Principal) + n += 1 + l + sovMesos(uint64(l)) + } + if m.WebUiURL != nil { + l = len(*m.WebUiURL) + n += 1 + l + sovMesos(uint64(l)) + } + if len(m.Capabilities) > 0 { + for _, e := range m.Capabilities { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.Labels != nil { + l = m.Labels.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if len(m.Roles) > 0 { + for _, s := range m.Roles { + l = len(s) + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *FrameworkInfo_Capability) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Type)) + return n +} + +func (m *CheckInfo) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Type)) + if m.Command != nil { + l = m.Command.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.HTTP != nil { + l = m.HTTP.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.DelaySeconds != nil { + n += 9 + } + if m.IntervalSeconds != nil { + n += 9 + } + if m.TimeoutSeconds != nil { + n += 9 + } + if m.TCP != nil { + l = m.TCP.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *CheckInfo_Command) ProtoSize() (n int) { + var l int + _ = l + l = m.Command.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + return n +} + +func (m *CheckInfo_Http) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Port)) + if m.Path != nil { + l = len(*m.Path) + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *CheckInfo_Tcp) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Port)) + return n +} + +func (m *HealthCheck) ProtoSize() (n int) { + var l int + _ = l + if m.HTTP != nil { + l = m.HTTP.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.DelaySeconds != nil { + n += 9 + } + if m.IntervalSeconds != nil { + n += 9 + } + if m.TimeoutSeconds != nil { + n += 9 + } + if m.ConsecutiveFailures != nil { + n += 1 + sovMesos(uint64(*m.ConsecutiveFailures)) + } + if m.GracePeriodSeconds != nil { + n += 9 + } + if m.Command != nil { + l = m.Command.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + n += 1 + sovMesos(uint64(m.Type)) + if m.TCP != nil { + l = m.TCP.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *HealthCheck_HTTPCheckInfo) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Port)) + if m.Path != nil { + l = len(*m.Path) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Scheme != nil { + l = len(*m.Scheme) + n += 1 + l + sovMesos(uint64(l)) + } + if len(m.Statuses) > 0 { + for _, e := range m.Statuses { + n += 1 + sovMesos(uint64(e)) + } + } + if m.Protocol != nil { + n += 1 + sovMesos(uint64(*m.Protocol)) + } + return n +} + +func (m *HealthCheck_TCPCheckInfo) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Port)) + if m.Protocol != nil { + n += 1 + sovMesos(uint64(*m.Protocol)) + } + return n +} + +func (m *KillPolicy) ProtoSize() (n int) { + var l int + _ = l + if m.GracePeriod != nil { + l = m.GracePeriod.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *CommandInfo) ProtoSize() (n int) { + var l int + _ = l + if len(m.URIs) > 0 { + for _, e := range m.URIs { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.Environment != nil { + l = m.Environment.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Value != nil { + l = len(*m.Value) + n += 1 + l + sovMesos(uint64(l)) + } + if m.User != nil { + l = len(*m.User) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Shell != nil { + n += 2 + } + if len(m.Arguments) > 0 { + for _, s := range m.Arguments { + l = len(s) + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *CommandInfo_URI) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Value) + n += 1 + l + sovMesos(uint64(l)) + if m.Executable != nil { + n += 2 + } + if m.Extract != nil { + n += 2 + } + if m.Cache != nil { + n += 2 + } + if m.OutputFile != nil { + l = len(*m.OutputFile) + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *ExecutorInfo) ProtoSize() (n int) { + var l int + _ = l + l = m.ExecutorID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovMesos(uint64(l)) + } + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.Command != nil { + l = m.Command.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.FrameworkID != nil { + l = m.FrameworkID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Name != nil { + l = len(*m.Name) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Source != nil { + l = len(*m.Source) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Container != nil { + l = m.Container.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Discovery != nil { + l = m.Discovery.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.ShutdownGracePeriod != nil { + l = m.ShutdownGracePeriod.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Labels != nil { + l = m.Labels.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + n += 1 + sovMesos(uint64(m.Type)) + return n +} + +func (m *DomainInfo) ProtoSize() (n int) { + var l int + _ = l + if m.FaultDomain != nil { + l = m.FaultDomain.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *DomainInfo_FaultDomain) ProtoSize() (n int) { + var l int + _ = l + l = m.Region.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + l = m.Zone.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + return n +} + +func (m *DomainInfo_FaultDomain_RegionInfo) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovMesos(uint64(l)) + return n +} + +func (m *DomainInfo_FaultDomain_ZoneInfo) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovMesos(uint64(l)) + return n +} + +func (m *MasterInfo) ProtoSize() (n int) { + var l int + _ = l + l = len(m.ID) + n += 1 + l + sovMesos(uint64(l)) + n += 1 + sovMesos(uint64(m.IP)) + if m.Port != nil { + n += 1 + sovMesos(uint64(*m.Port)) + } + if m.PID != nil { + l = len(*m.PID) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Hostname != nil { + l = len(*m.Hostname) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Version != nil { + l = len(*m.Version) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Address != nil { + l = m.Address.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Domain != nil { + l = m.Domain.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if len(m.Capabilities) > 0 { + for _, e := range m.Capabilities { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *MasterInfo_Capability) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Type)) + return n +} + +func (m *AgentInfo) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Hostname) + n += 1 + l + sovMesos(uint64(l)) + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.ID != nil { + l = m.ID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Port != nil { + n += 1 + sovMesos(uint64(*m.Port)) + } + if m.Domain != nil { + l = m.Domain.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *AgentInfo_Capability) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Type)) + return n +} + +func (m *CSIPluginContainerInfo) ProtoSize() (n int) { + var l int + _ = l + if len(m.Services) > 0 { + for _, e := range m.Services { + n += 1 + sovMesos(uint64(e)) + } + } + if m.Command != nil { + l = m.Command.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.Container != nil { + l = m.Container.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *CSIPluginInfo) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Type) + n += 1 + l + sovMesos(uint64(l)) + l = len(m.Name) + n += 1 + l + sovMesos(uint64(l)) + if len(m.Containers) > 0 { + for _, e := range m.Containers { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *ResourceProviderInfo) ProtoSize() (n int) { + var l int + _ = l + if m.ID != nil { + l = m.ID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + l = len(m.Type) + n += 1 + l + sovMesos(uint64(l)) + l = len(m.Name) + n += 1 + l + sovMesos(uint64(l)) + if len(m.DefaultReservations) > 0 { + for _, e := range m.DefaultReservations { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.Storage != nil { + l = m.Storage.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *ResourceProviderInfo_Storage) ProtoSize() (n int) { + var l int + _ = l + l = m.Plugin.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + return n +} + +func (m *Value) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Type)) + if m.Scalar != nil { + l = m.Scalar.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Ranges != nil { + l = m.Ranges.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Set != nil { + l = m.Set.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Text != nil { + l = m.Text.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Value_Scalar) ProtoSize() (n int) { + var l int + _ = l + n += 9 + return n +} + +func (m *Value_Range) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Begin)) + n += 1 + sovMesos(uint64(m.End)) + return n +} + +func (m *Value_Ranges) ProtoSize() (n int) { + var l int + _ = l + if len(m.Range) > 0 { + for _, e := range m.Range { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *Value_Set) ProtoSize() (n int) { + var l int + _ = l + if len(m.Item) > 0 { + for _, s := range m.Item { + l = len(s) + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *Value_Text) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Value) + n += 1 + l + sovMesos(uint64(l)) + return n +} + +func (m *Attribute) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovMesos(uint64(l)) + n += 1 + sovMesos(uint64(m.Type)) + if m.Scalar != nil { + l = m.Scalar.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Ranges != nil { + l = m.Ranges.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Text != nil { + l = m.Text.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Set != nil { + l = m.Set.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Resource) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovMesos(uint64(l)) + if m.Type != nil { + n += 1 + sovMesos(uint64(*m.Type)) + } + if m.Scalar != nil { + l = m.Scalar.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Ranges != nil { + l = m.Ranges.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Set != nil { + l = m.Set.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Role != nil { + l = len(*m.Role) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Disk != nil { + l = m.Disk.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Reservation != nil { + l = m.Reservation.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Revocable != nil { + l = m.Revocable.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Shared != nil { + l = m.Shared.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.AllocationInfo != nil { + l = m.AllocationInfo.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.ProviderID != nil { + l = m.ProviderID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if len(m.Reservations) > 0 { + for _, e := range m.Reservations { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *Resource_AllocationInfo) ProtoSize() (n int) { + var l int + _ = l + if m.Role != nil { + l = len(*m.Role) + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Resource_ReservationInfo) ProtoSize() (n int) { + var l int + _ = l + if m.Principal != nil { + l = len(*m.Principal) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Labels != nil { + l = m.Labels.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Role != nil { + l = len(*m.Role) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Type != nil { + n += 1 + sovMesos(uint64(*m.Type)) + } + return n +} + +func (m *Resource_DiskInfo) ProtoSize() (n int) { + var l int + _ = l + if m.Persistence != nil { + l = m.Persistence.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Volume != nil { + l = m.Volume.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Source != nil { + l = m.Source.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Resource_DiskInfo_Persistence) ProtoSize() (n int) { + var l int + _ = l + l = len(m.ID) + n += 1 + l + sovMesos(uint64(l)) + if m.Principal != nil { + l = len(*m.Principal) + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Resource_DiskInfo_Source) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Type)) + if m.Path != nil { + l = m.Path.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Mount != nil { + l = m.Mount.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.ID != nil { + l = len(*m.ID) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Metadata != nil { + l = m.Metadata.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Profile != nil { + l = len(*m.Profile) + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Resource_DiskInfo_Source_Path) ProtoSize() (n int) { + var l int + _ = l + if m.Root != nil { + l = len(*m.Root) + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Resource_DiskInfo_Source_Mount) ProtoSize() (n int) { + var l int + _ = l + if m.Root != nil { + l = len(*m.Root) + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Resource_RevocableInfo) ProtoSize() (n int) { + var l int + _ = l + return n +} + +func (m *Resource_SharedInfo) ProtoSize() (n int) { + var l int + _ = l + return n +} + +func (m *TrafficControlStatistics) ProtoSize() (n int) { + var l int + _ = l + l = len(m.ID) + n += 1 + l + sovMesos(uint64(l)) + if m.Backlog != nil { + n += 1 + sovMesos(uint64(*m.Backlog)) + } + if m.Bytes != nil { + n += 1 + sovMesos(uint64(*m.Bytes)) + } + if m.Drops != nil { + n += 1 + sovMesos(uint64(*m.Drops)) + } + if m.Overlimits != nil { + n += 1 + sovMesos(uint64(*m.Overlimits)) + } + if m.Packets != nil { + n += 1 + sovMesos(uint64(*m.Packets)) + } + if m.Qlen != nil { + n += 1 + sovMesos(uint64(*m.Qlen)) + } + if m.RateBPS != nil { + n += 1 + sovMesos(uint64(*m.RateBPS)) + } + if m.RatePPS != nil { + n += 1 + sovMesos(uint64(*m.RatePPS)) + } + if m.Requeues != nil { + n += 1 + sovMesos(uint64(*m.Requeues)) + } + return n +} + +func (m *IpStatistics) ProtoSize() (n int) { + var l int + _ = l + if m.Forwarding != nil { + n += 1 + sovMesos(uint64(*m.Forwarding)) + } + if m.DefaultTTL != nil { + n += 1 + sovMesos(uint64(*m.DefaultTTL)) + } + if m.InReceives != nil { + n += 1 + sovMesos(uint64(*m.InReceives)) + } + if m.InHdrErrors != nil { + n += 1 + sovMesos(uint64(*m.InHdrErrors)) + } + if m.InAddrErrors != nil { + n += 1 + sovMesos(uint64(*m.InAddrErrors)) + } + if m.ForwDatagrams != nil { + n += 1 + sovMesos(uint64(*m.ForwDatagrams)) + } + if m.InUnknownProtos != nil { + n += 1 + sovMesos(uint64(*m.InUnknownProtos)) + } + if m.InDiscards != nil { + n += 1 + sovMesos(uint64(*m.InDiscards)) + } + if m.InDelivers != nil { + n += 1 + sovMesos(uint64(*m.InDelivers)) + } + if m.OutRequests != nil { + n += 1 + sovMesos(uint64(*m.OutRequests)) + } + if m.OutDiscards != nil { + n += 1 + sovMesos(uint64(*m.OutDiscards)) + } + if m.OutNoRoutes != nil { + n += 1 + sovMesos(uint64(*m.OutNoRoutes)) + } + if m.ReasmTimeout != nil { + n += 1 + sovMesos(uint64(*m.ReasmTimeout)) + } + if m.ReasmReqds != nil { + n += 1 + sovMesos(uint64(*m.ReasmReqds)) + } + if m.ReasmOKs != nil { + n += 1 + sovMesos(uint64(*m.ReasmOKs)) + } + if m.ReasmFails != nil { + n += 2 + sovMesos(uint64(*m.ReasmFails)) + } + if m.FragOKs != nil { + n += 2 + sovMesos(uint64(*m.FragOKs)) + } + if m.FragFails != nil { + n += 2 + sovMesos(uint64(*m.FragFails)) + } + if m.FragCreates != nil { + n += 2 + sovMesos(uint64(*m.FragCreates)) + } + return n +} + +func (m *IcmpStatistics) ProtoSize() (n int) { + var l int + _ = l + if m.InMsgs != nil { + n += 1 + sovMesos(uint64(*m.InMsgs)) + } + if m.InErrors != nil { + n += 1 + sovMesos(uint64(*m.InErrors)) + } + if m.InCsumErrors != nil { + n += 1 + sovMesos(uint64(*m.InCsumErrors)) + } + if m.InDestUnreachs != nil { + n += 1 + sovMesos(uint64(*m.InDestUnreachs)) + } + if m.InTimeExcds != nil { + n += 1 + sovMesos(uint64(*m.InTimeExcds)) + } + if m.InParmProbs != nil { + n += 1 + sovMesos(uint64(*m.InParmProbs)) + } + if m.InSrcQuenchs != nil { + n += 1 + sovMesos(uint64(*m.InSrcQuenchs)) + } + if m.InRedirects != nil { + n += 1 + sovMesos(uint64(*m.InRedirects)) + } + if m.InEchos != nil { + n += 1 + sovMesos(uint64(*m.InEchos)) + } + if m.InEchoReps != nil { + n += 1 + sovMesos(uint64(*m.InEchoReps)) + } + if m.InTimestamps != nil { + n += 1 + sovMesos(uint64(*m.InTimestamps)) + } + if m.InTimestampReps != nil { + n += 1 + sovMesos(uint64(*m.InTimestampReps)) + } + if m.InAddrMasks != nil { + n += 1 + sovMesos(uint64(*m.InAddrMasks)) + } + if m.InAddrMaskReps != nil { + n += 1 + sovMesos(uint64(*m.InAddrMaskReps)) + } + if m.OutMsgs != nil { + n += 1 + sovMesos(uint64(*m.OutMsgs)) + } + if m.OutErrors != nil { + n += 2 + sovMesos(uint64(*m.OutErrors)) + } + if m.OutDestUnreachs != nil { + n += 2 + sovMesos(uint64(*m.OutDestUnreachs)) + } + if m.OutTimeExcds != nil { + n += 2 + sovMesos(uint64(*m.OutTimeExcds)) + } + if m.OutParmProbs != nil { + n += 2 + sovMesos(uint64(*m.OutParmProbs)) + } + if m.OutSrcQuenchs != nil { + n += 2 + sovMesos(uint64(*m.OutSrcQuenchs)) + } + if m.OutRedirects != nil { + n += 2 + sovMesos(uint64(*m.OutRedirects)) + } + if m.OutEchos != nil { + n += 2 + sovMesos(uint64(*m.OutEchos)) + } + if m.OutEchoReps != nil { + n += 2 + sovMesos(uint64(*m.OutEchoReps)) + } + if m.OutTimestamps != nil { + n += 2 + sovMesos(uint64(*m.OutTimestamps)) + } + if m.OutTimestampReps != nil { + n += 2 + sovMesos(uint64(*m.OutTimestampReps)) + } + if m.OutAddrMasks != nil { + n += 2 + sovMesos(uint64(*m.OutAddrMasks)) + } + if m.OutAddrMaskReps != nil { + n += 2 + sovMesos(uint64(*m.OutAddrMaskReps)) + } + return n +} + +func (m *TcpStatistics) ProtoSize() (n int) { + var l int + _ = l + if m.RtoAlgorithm != nil { + n += 1 + sovMesos(uint64(*m.RtoAlgorithm)) + } + if m.RtoMin != nil { + n += 1 + sovMesos(uint64(*m.RtoMin)) + } + if m.RtoMax != nil { + n += 1 + sovMesos(uint64(*m.RtoMax)) + } + if m.MaxConn != nil { + n += 1 + sovMesos(uint64(*m.MaxConn)) + } + if m.ActiveOpens != nil { + n += 1 + sovMesos(uint64(*m.ActiveOpens)) + } + if m.PassiveOpens != nil { + n += 1 + sovMesos(uint64(*m.PassiveOpens)) + } + if m.AttemptFails != nil { + n += 1 + sovMesos(uint64(*m.AttemptFails)) + } + if m.EstabResets != nil { + n += 1 + sovMesos(uint64(*m.EstabResets)) + } + if m.CurrEstab != nil { + n += 1 + sovMesos(uint64(*m.CurrEstab)) + } + if m.InSegs != nil { + n += 1 + sovMesos(uint64(*m.InSegs)) + } + if m.OutSegs != nil { + n += 1 + sovMesos(uint64(*m.OutSegs)) + } + if m.RetransSegs != nil { + n += 1 + sovMesos(uint64(*m.RetransSegs)) + } + if m.InErrs != nil { + n += 1 + sovMesos(uint64(*m.InErrs)) + } + if m.OutRsts != nil { + n += 1 + sovMesos(uint64(*m.OutRsts)) + } + if m.InCsumErrors != nil { + n += 1 + sovMesos(uint64(*m.InCsumErrors)) + } + return n +} + +func (m *UdpStatistics) ProtoSize() (n int) { + var l int + _ = l + if m.InDatagrams != nil { + n += 1 + sovMesos(uint64(*m.InDatagrams)) + } + if m.NoPorts != nil { + n += 1 + sovMesos(uint64(*m.NoPorts)) + } + if m.InErrors != nil { + n += 1 + sovMesos(uint64(*m.InErrors)) + } + if m.OutDatagrams != nil { + n += 1 + sovMesos(uint64(*m.OutDatagrams)) + } + if m.RcvbufErrors != nil { + n += 1 + sovMesos(uint64(*m.RcvbufErrors)) + } + if m.SndbufErrors != nil { + n += 1 + sovMesos(uint64(*m.SndbufErrors)) + } + if m.InCsumErrors != nil { + n += 1 + sovMesos(uint64(*m.InCsumErrors)) + } + if m.IgnoredMulti != nil { + n += 1 + sovMesos(uint64(*m.IgnoredMulti)) + } + return n +} + +func (m *SNMPStatistics) ProtoSize() (n int) { + var l int + _ = l + if m.IPStats != nil { + l = m.IPStats.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.ICMPStats != nil { + l = m.ICMPStats.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.TCPStats != nil { + l = m.TCPStats.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.UDPStats != nil { + l = m.UDPStats.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *DiskStatistics) ProtoSize() (n int) { + var l int + _ = l + if m.Source != nil { + l = m.Source.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Persistence != nil { + l = m.Persistence.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.LimitBytes != nil { + n += 1 + sovMesos(uint64(*m.LimitBytes)) + } + if m.UsedBytes != nil { + n += 1 + sovMesos(uint64(*m.UsedBytes)) + } + return n +} + +func (m *ResourceStatistics) ProtoSize() (n int) { + var l int + _ = l + n += 9 + if m.CPUsUserTimeSecs != nil { + n += 9 + } + if m.CPUsSystemTimeSecs != nil { + n += 9 + } + if m.CPUsLimit != nil { + n += 9 + } + if m.MemRSSBytes != nil { + n += 1 + sovMesos(uint64(*m.MemRSSBytes)) + } + if m.MemLimitBytes != nil { + n += 1 + sovMesos(uint64(*m.MemLimitBytes)) + } + if m.CPUsNrPeriods != nil { + n += 1 + sovMesos(uint64(*m.CPUsNrPeriods)) + } + if m.CPUsNrThrottled != nil { + n += 1 + sovMesos(uint64(*m.CPUsNrThrottled)) + } + if m.CPUsThrottledTimeSecs != nil { + n += 9 + } + if m.MemFileBytes != nil { + n += 1 + sovMesos(uint64(*m.MemFileBytes)) + } + if m.MemAnonBytes != nil { + n += 1 + sovMesos(uint64(*m.MemAnonBytes)) + } + if m.MemMappedFileBytes != nil { + n += 1 + sovMesos(uint64(*m.MemMappedFileBytes)) + } + if m.Perf != nil { + l = m.Perf.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.NetRxPackets != nil { + n += 1 + sovMesos(uint64(*m.NetRxPackets)) + } + if m.NetRxBytes != nil { + n += 1 + sovMesos(uint64(*m.NetRxBytes)) + } + if m.NetRxErrors != nil { + n += 2 + sovMesos(uint64(*m.NetRxErrors)) + } + if m.NetRxDropped != nil { + n += 2 + sovMesos(uint64(*m.NetRxDropped)) + } + if m.NetTxPackets != nil { + n += 2 + sovMesos(uint64(*m.NetTxPackets)) + } + if m.NetTxBytes != nil { + n += 2 + sovMesos(uint64(*m.NetTxBytes)) + } + if m.NetTxErrors != nil { + n += 2 + sovMesos(uint64(*m.NetTxErrors)) + } + if m.NetTxDropped != nil { + n += 2 + sovMesos(uint64(*m.NetTxDropped)) + } + if m.NetTCPRttMicrosecsP50 != nil { + n += 10 + } + if m.NetTCPRttMicrosecsP90 != nil { + n += 10 + } + if m.NetTCPRttMicrosecsP95 != nil { + n += 10 + } + if m.NetTCPRttMicrosecsP99 != nil { + n += 10 + } + if m.DiskLimitBytes != nil { + n += 2 + sovMesos(uint64(*m.DiskLimitBytes)) + } + if m.DiskUsedBytes != nil { + n += 2 + sovMesos(uint64(*m.DiskUsedBytes)) + } + if m.NetTCPActiveConnections != nil { + n += 10 + } + if m.NetTCPTimeWaitConnections != nil { + n += 10 + } + if m.Processes != nil { + n += 2 + sovMesos(uint64(*m.Processes)) + } + if m.Threads != nil { + n += 2 + sovMesos(uint64(*m.Threads)) + } + if m.MemLowPressureCounter != nil { + n += 2 + sovMesos(uint64(*m.MemLowPressureCounter)) + } + if m.MemMediumPressureCounter != nil { + n += 2 + sovMesos(uint64(*m.MemMediumPressureCounter)) + } + if m.MemCriticalPressureCounter != nil { + n += 2 + sovMesos(uint64(*m.MemCriticalPressureCounter)) + } + if len(m.NetTrafficControlStatistics) > 0 { + for _, e := range m.NetTrafficControlStatistics { + l = e.ProtoSize() + n += 2 + l + sovMesos(uint64(l)) + } + } + if m.MemTotalBytes != nil { + n += 2 + sovMesos(uint64(*m.MemTotalBytes)) + } + if m.MemTotalMemswBytes != nil { + n += 2 + sovMesos(uint64(*m.MemTotalMemswBytes)) + } + if m.MemSoftLimitBytes != nil { + n += 2 + sovMesos(uint64(*m.MemSoftLimitBytes)) + } + if m.MemCacheBytes != nil { + n += 2 + sovMesos(uint64(*m.MemCacheBytes)) + } + if m.MemSwapBytes != nil { + n += 2 + sovMesos(uint64(*m.MemSwapBytes)) + } + if m.MemUnevictableBytes != nil { + n += 2 + sovMesos(uint64(*m.MemUnevictableBytes)) + } + if m.NetSNMPStatistics != nil { + l = m.NetSNMPStatistics.ProtoSize() + n += 2 + l + sovMesos(uint64(l)) + } + if len(m.DiskStatistics) > 0 { + for _, e := range m.DiskStatistics { + l = e.ProtoSize() + n += 2 + l + sovMesos(uint64(l)) + } + } + if m.BlkioStatistics != nil { + l = m.BlkioStatistics.ProtoSize() + n += 2 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *ResourceUsage) ProtoSize() (n int) { + var l int + _ = l + if len(m.Executors) > 0 { + for _, e := range m.Executors { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if len(m.Total) > 0 { + for _, e := range m.Total { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *ResourceUsage_Executor) ProtoSize() (n int) { + var l int + _ = l + l = m.ExecutorInfo.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + if len(m.Allocated) > 0 { + for _, e := range m.Allocated { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.Statistics != nil { + l = m.Statistics.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + l = m.ContainerID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + if len(m.Tasks) > 0 { + for _, e := range m.Tasks { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *ResourceUsage_Executor_Task) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovMesos(uint64(l)) + l = m.ID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.Labels != nil { + l = m.Labels.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *PerfStatistics) ProtoSize() (n int) { + var l int + _ = l + n += 9 + n += 9 + if m.Cycles != nil { + n += 1 + sovMesos(uint64(*m.Cycles)) + } + if m.StalledCyclesFrontend != nil { + n += 1 + sovMesos(uint64(*m.StalledCyclesFrontend)) + } + if m.StalledCyclesBackend != nil { + n += 1 + sovMesos(uint64(*m.StalledCyclesBackend)) + } + if m.Instructions != nil { + n += 1 + sovMesos(uint64(*m.Instructions)) + } + if m.CacheReferences != nil { + n += 1 + sovMesos(uint64(*m.CacheReferences)) + } + if m.CacheMisses != nil { + n += 1 + sovMesos(uint64(*m.CacheMisses)) + } + if m.Branches != nil { + n += 1 + sovMesos(uint64(*m.Branches)) + } + if m.BranchMisses != nil { + n += 1 + sovMesos(uint64(*m.BranchMisses)) + } + if m.BusCycles != nil { + n += 1 + sovMesos(uint64(*m.BusCycles)) + } + if m.RefCycles != nil { + n += 1 + sovMesos(uint64(*m.RefCycles)) + } + if m.CPUClock != nil { + n += 9 + } + if m.TaskClock != nil { + n += 9 + } + if m.PageFaults != nil { + n += 1 + sovMesos(uint64(*m.PageFaults)) + } + if m.MinorFaults != nil { + n += 2 + sovMesos(uint64(*m.MinorFaults)) + } + if m.MajorFaults != nil { + n += 2 + sovMesos(uint64(*m.MajorFaults)) + } + if m.ContextSwitches != nil { + n += 2 + sovMesos(uint64(*m.ContextSwitches)) + } + if m.CPUMigrations != nil { + n += 2 + sovMesos(uint64(*m.CPUMigrations)) + } + if m.AlignmentFaults != nil { + n += 2 + sovMesos(uint64(*m.AlignmentFaults)) + } + if m.EmulationFaults != nil { + n += 2 + sovMesos(uint64(*m.EmulationFaults)) + } + if m.L1DcacheLoads != nil { + n += 2 + sovMesos(uint64(*m.L1DcacheLoads)) + } + if m.L1DcacheLoadMisses != nil { + n += 2 + sovMesos(uint64(*m.L1DcacheLoadMisses)) + } + if m.L1DcacheStores != nil { + n += 2 + sovMesos(uint64(*m.L1DcacheStores)) + } + if m.L1DcacheStoreMisses != nil { + n += 2 + sovMesos(uint64(*m.L1DcacheStoreMisses)) + } + if m.L1DcachePrefetches != nil { + n += 2 + sovMesos(uint64(*m.L1DcachePrefetches)) + } + if m.L1DcachePrefetchMisses != nil { + n += 2 + sovMesos(uint64(*m.L1DcachePrefetchMisses)) + } + if m.L1IcacheLoads != nil { + n += 2 + sovMesos(uint64(*m.L1IcacheLoads)) + } + if m.L1IcacheLoadMisses != nil { + n += 2 + sovMesos(uint64(*m.L1IcacheLoadMisses)) + } + if m.L1IcachePrefetches != nil { + n += 2 + sovMesos(uint64(*m.L1IcachePrefetches)) + } + if m.L1IcachePrefetchMisses != nil { + n += 2 + sovMesos(uint64(*m.L1IcachePrefetchMisses)) + } + if m.LLCLoads != nil { + n += 2 + sovMesos(uint64(*m.LLCLoads)) + } + if m.LLCLoadMisses != nil { + n += 2 + sovMesos(uint64(*m.LLCLoadMisses)) + } + if m.LLCStores != nil { + n += 2 + sovMesos(uint64(*m.LLCStores)) + } + if m.LLCStoreMisses != nil { + n += 2 + sovMesos(uint64(*m.LLCStoreMisses)) + } + if m.LLCPrefetches != nil { + n += 2 + sovMesos(uint64(*m.LLCPrefetches)) + } + if m.LLCPrefetchMisses != nil { + n += 2 + sovMesos(uint64(*m.LLCPrefetchMisses)) + } + if m.DTLBLoads != nil { + n += 2 + sovMesos(uint64(*m.DTLBLoads)) + } + if m.DTLBLoadMisses != nil { + n += 2 + sovMesos(uint64(*m.DTLBLoadMisses)) + } + if m.DTLBStores != nil { + n += 2 + sovMesos(uint64(*m.DTLBStores)) + } + if m.DTLBStoreMisses != nil { + n += 2 + sovMesos(uint64(*m.DTLBStoreMisses)) + } + if m.DTLBPrefetches != nil { + n += 2 + sovMesos(uint64(*m.DTLBPrefetches)) + } + if m.DTLBPrefetchMisses != nil { + n += 2 + sovMesos(uint64(*m.DTLBPrefetchMisses)) + } + if m.ITLBLoads != nil { + n += 2 + sovMesos(uint64(*m.ITLBLoads)) + } + if m.ITLBLoadMisses != nil { + n += 2 + sovMesos(uint64(*m.ITLBLoadMisses)) + } + if m.BranchLoads != nil { + n += 2 + sovMesos(uint64(*m.BranchLoads)) + } + if m.BranchLoadMisses != nil { + n += 2 + sovMesos(uint64(*m.BranchLoadMisses)) + } + if m.NodeLoads != nil { + n += 2 + sovMesos(uint64(*m.NodeLoads)) + } + if m.NodeLoadMisses != nil { + n += 2 + sovMesos(uint64(*m.NodeLoadMisses)) + } + if m.NodeStores != nil { + n += 2 + sovMesos(uint64(*m.NodeStores)) + } + if m.NodeStoreMisses != nil { + n += 2 + sovMesos(uint64(*m.NodeStoreMisses)) + } + if m.NodePrefetches != nil { + n += 2 + sovMesos(uint64(*m.NodePrefetches)) + } + if m.NodePrefetchMisses != nil { + n += 2 + sovMesos(uint64(*m.NodePrefetchMisses)) + } + return n +} + +func (m *Request) ProtoSize() (n int) { + var l int + _ = l + if m.AgentID != nil { + l = m.AgentID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *Offer) ProtoSize() (n int) { + var l int + _ = l + l = m.ID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + l = m.FrameworkID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + l = m.AgentID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + l = len(m.Hostname) + n += 1 + l + sovMesos(uint64(l)) + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if len(m.ExecutorIDs) > 0 { + for _, e := range m.ExecutorIDs { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if len(m.Attributes) > 0 { + for _, e := range m.Attributes { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.URL != nil { + l = m.URL.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Unavailability != nil { + l = m.Unavailability.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.AllocationInfo != nil { + l = m.AllocationInfo.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Domain != nil { + l = m.Domain.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Offer_Operation) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Type)) + if m.Launch != nil { + l = m.Launch.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Reserve != nil { + l = m.Reserve.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Unreserve != nil { + l = m.Unreserve.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Create != nil { + l = m.Create.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Destroy != nil { + l = m.Destroy.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.LaunchGroup != nil { + l = m.LaunchGroup.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.CreateVolume != nil { + l = m.CreateVolume.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.DestroyVolume != nil { + l = m.DestroyVolume.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.CreateBlock != nil { + l = m.CreateBlock.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.DestroyBlock != nil { + l = m.DestroyBlock.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.ID != nil { + l = m.ID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Offer_Operation_Launch) ProtoSize() (n int) { + var l int + _ = l + if len(m.TaskInfos) > 0 { + for _, e := range m.TaskInfos { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *Offer_Operation_LaunchGroup) ProtoSize() (n int) { + var l int + _ = l + l = m.Executor.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + l = m.TaskGroup.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + return n +} + +func (m *Offer_Operation_Reserve) ProtoSize() (n int) { + var l int + _ = l + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *Offer_Operation_Unreserve) ProtoSize() (n int) { + var l int + _ = l + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *Offer_Operation_Create) ProtoSize() (n int) { + var l int + _ = l + if len(m.Volumes) > 0 { + for _, e := range m.Volumes { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *Offer_Operation_Destroy) ProtoSize() (n int) { + var l int + _ = l + if len(m.Volumes) > 0 { + for _, e := range m.Volumes { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *Offer_Operation_CreateVolume) ProtoSize() (n int) { + var l int + _ = l + l = m.Source.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + n += 1 + sovMesos(uint64(m.TargetType)) + return n +} + +func (m *Offer_Operation_DestroyVolume) ProtoSize() (n int) { + var l int + _ = l + l = m.Volume.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + return n +} + +func (m *Offer_Operation_CreateBlock) ProtoSize() (n int) { + var l int + _ = l + l = m.Source.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + return n +} + +func (m *Offer_Operation_DestroyBlock) ProtoSize() (n int) { + var l int + _ = l + l = m.Block.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + return n +} + +func (m *InverseOffer) ProtoSize() (n int) { + var l int + _ = l + l = m.OfferID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + if m.URL != nil { + l = m.URL.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + l = m.FrameworkID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + if m.AgentID != nil { + l = m.AgentID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + l = m.Unavailability.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *TaskInfo) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovMesos(uint64(l)) + l = m.TaskID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + l = m.AgentID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.Executor != nil { + l = m.Executor.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Command != nil { + l = m.Command.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.HealthCheck != nil { + l = m.HealthCheck.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Container != nil { + l = m.Container.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Labels != nil { + l = m.Labels.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Discovery != nil { + l = m.Discovery.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.KillPolicy != nil { + l = m.KillPolicy.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Check != nil { + l = m.Check.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *TaskGroupInfo) ProtoSize() (n int) { + var l int + _ = l + if len(m.Tasks) > 0 { + for _, e := range m.Tasks { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *Task) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovMesos(uint64(l)) + l = m.TaskID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + l = m.FrameworkID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + if m.ExecutorID != nil { + l = m.ExecutorID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + l = m.AgentID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + if m.State != nil { + n += 1 + sovMesos(uint64(*m.State)) + } + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if len(m.Statuses) > 0 { + for _, e := range m.Statuses { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.StatusUpdateState != nil { + n += 1 + sovMesos(uint64(*m.StatusUpdateState)) + } + if m.StatusUpdateUUID != nil { + l = len(m.StatusUpdateUUID) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Labels != nil { + l = m.Labels.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Discovery != nil { + l = m.Discovery.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Container != nil { + l = m.Container.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.User != nil { + l = len(*m.User) + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *TaskResourceLimitation) ProtoSize() (n int) { + var l int + _ = l + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *UUID) ProtoSize() (n int) { + var l int + _ = l + if m.Value != nil { + l = len(m.Value) + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Operation) ProtoSize() (n int) { + var l int + _ = l + if m.FrameworkID != nil { + l = m.FrameworkID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.AgentID != nil { + l = m.AgentID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + l = m.Info.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + l = m.LatestStatus.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + if len(m.Statuses) > 0 { + for _, e := range m.Statuses { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + l = m.UUID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + return n +} + +func (m *OperationStatus) ProtoSize() (n int) { + var l int + _ = l + if m.OperationID != nil { + l = m.OperationID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + n += 1 + sovMesos(uint64(m.State)) + if m.Message != nil { + l = len(*m.Message) + n += 1 + l + sovMesos(uint64(l)) + } + if len(m.ConvertedResources) > 0 { + for _, e := range m.ConvertedResources { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.UUID != nil { + l = m.UUID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *CheckStatusInfo) ProtoSize() (n int) { + var l int + _ = l + if m.Type != nil { + n += 1 + sovMesos(uint64(*m.Type)) + } + if m.Command != nil { + l = m.Command.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.HTTP != nil { + l = m.HTTP.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.TCP != nil { + l = m.TCP.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *CheckStatusInfo_Command) ProtoSize() (n int) { + var l int + _ = l + if m.ExitCode != nil { + n += 1 + sovMesos(uint64(*m.ExitCode)) + } + return n +} + +func (m *CheckStatusInfo_Http) ProtoSize() (n int) { + var l int + _ = l + if m.StatusCode != nil { + n += 1 + sovMesos(uint64(*m.StatusCode)) + } + return n +} + +func (m *CheckStatusInfo_Tcp) ProtoSize() (n int) { + var l int + _ = l + if m.Succeeded != nil { + n += 2 + } + return n +} + +func (m *TaskStatus) ProtoSize() (n int) { + var l int + _ = l + l = m.TaskID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + if m.State != nil { + n += 1 + sovMesos(uint64(*m.State)) + } + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Message != nil { + l = len(*m.Message) + n += 1 + l + sovMesos(uint64(l)) + } + if m.AgentID != nil { + l = m.AgentID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Timestamp != nil { + n += 9 + } + if m.ExecutorID != nil { + l = m.ExecutorID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Healthy != nil { + n += 2 + } + if m.Source != nil { + n += 1 + sovMesos(uint64(*m.Source)) + } + if m.Reason != nil { + n += 1 + sovMesos(uint64(*m.Reason)) + } + if m.UUID != nil { + l = len(m.UUID) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Labels != nil { + l = m.Labels.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.ContainerStatus != nil { + l = m.ContainerStatus.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.UnreachableTime != nil { + l = m.UnreachableTime.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.CheckStatus != nil { + l = m.CheckStatus.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Limitation != nil { + l = m.Limitation.ProtoSize() + n += 2 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Filters) ProtoSize() (n int) { + var l int + _ = l + if m.RefuseSeconds != nil { + n += 9 + } + return n +} + +func (m *Environment) ProtoSize() (n int) { + var l int + _ = l + if len(m.Variables) > 0 { + for _, e := range m.Variables { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *Environment_Variable) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovMesos(uint64(l)) + if m.Value != nil { + l = len(*m.Value) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Type != nil { + n += 1 + sovMesos(uint64(*m.Type)) + } + if m.Secret != nil { + l = m.Secret.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Parameter) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Key) + n += 1 + l + sovMesos(uint64(l)) + l = len(m.Value) + n += 1 + l + sovMesos(uint64(l)) + return n +} + +func (m *Parameters) ProtoSize() (n int) { + var l int + _ = l + if len(m.Parameter) > 0 { + for _, e := range m.Parameter { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *Credential) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Principal) + n += 1 + l + sovMesos(uint64(l)) + if m.Secret != nil { + l = len(*m.Secret) + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Credentials) ProtoSize() (n int) { + var l int + _ = l + if len(m.Credentials) > 0 { + for _, e := range m.Credentials { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *Secret) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Type)) + if m.Reference != nil { + l = m.Reference.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Value != nil { + l = m.Value.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Secret_Reference) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovMesos(uint64(l)) + if m.Key != nil { + l = len(*m.Key) + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Secret_Value) ProtoSize() (n int) { + var l int + _ = l + if m.Data != nil { + l = len(m.Data) + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *RateLimit) ProtoSize() (n int) { + var l int + _ = l + if m.QPS != nil { + n += 9 + } + l = len(m.Principal) + n += 1 + l + sovMesos(uint64(l)) + if m.Capacity != nil { + n += 1 + sovMesos(uint64(*m.Capacity)) + } + return n +} + +func (m *RateLimits) ProtoSize() (n int) { + var l int + _ = l + if len(m.Limits) > 0 { + for _, e := range m.Limits { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.AggregateDefaultQPS != nil { + n += 9 + } + if m.AggregateDefaultCapacity != nil { + n += 1 + sovMesos(uint64(*m.AggregateDefaultCapacity)) + } + return n +} + +func (m *Image) ProtoSize() (n int) { + var l int + _ = l + if m.Type != nil { + n += 1 + sovMesos(uint64(*m.Type)) + } + if m.Appc != nil { + l = m.Appc.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Docker != nil { + l = m.Docker.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Cached != nil { + n += 2 + } + return n +} + +func (m *Image_Appc) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovMesos(uint64(l)) + if m.ID != nil { + l = len(*m.ID) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Labels != nil { + l = m.Labels.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Image_Docker) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovMesos(uint64(l)) + if m.Credential != nil { + l = m.Credential.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Config != nil { + l = m.Config.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *MountPropagation) ProtoSize() (n int) { + var l int + _ = l + if m.Mode != nil { + n += 1 + sovMesos(uint64(*m.Mode)) + } + return n +} + +func (m *Volume) ProtoSize() (n int) { + var l int + _ = l + l = len(m.ContainerPath) + n += 1 + l + sovMesos(uint64(l)) + if m.HostPath != nil { + l = len(*m.HostPath) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Mode != nil { + n += 1 + sovMesos(uint64(*m.Mode)) + } + if m.Image != nil { + l = m.Image.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Source != nil { + l = m.Source.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Volume_Source) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Type)) + if m.DockerVolume != nil { + l = m.DockerVolume.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.SandboxPath != nil { + l = m.SandboxPath.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Secret != nil { + l = m.Secret.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.HostPath != nil { + l = m.HostPath.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Volume_Source_DockerVolume) ProtoSize() (n int) { + var l int + _ = l + if m.Driver != nil { + l = len(*m.Driver) + n += 1 + l + sovMesos(uint64(l)) + } + l = len(m.Name) + n += 1 + l + sovMesos(uint64(l)) + if m.DriverOptions != nil { + l = m.DriverOptions.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Volume_Source_HostPath) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Path) + n += 1 + l + sovMesos(uint64(l)) + if m.MountPropagation != nil { + l = m.MountPropagation.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Volume_Source_SandboxPath) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Type)) + l = len(m.Path) + n += 1 + l + sovMesos(uint64(l)) + return n +} + +func (m *NetworkInfo) ProtoSize() (n int) { + var l int + _ = l + if len(m.Groups) > 0 { + for _, s := range m.Groups { + l = len(s) + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.Labels != nil { + l = m.Labels.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if len(m.IPAddresses) > 0 { + for _, e := range m.IPAddresses { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.Name != nil { + l = len(*m.Name) + n += 1 + l + sovMesos(uint64(l)) + } + if len(m.PortMappings) > 0 { + for _, e := range m.PortMappings { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *NetworkInfo_IPAddress) ProtoSize() (n int) { + var l int + _ = l + if m.Protocol != nil { + n += 1 + sovMesos(uint64(*m.Protocol)) + } + if m.IPAddress != nil { + l = len(*m.IPAddress) + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *NetworkInfo_PortMapping) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.HostPort)) + n += 1 + sovMesos(uint64(m.ContainerPort)) + if m.Protocol != nil { + l = len(*m.Protocol) + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *CapabilityInfo) ProtoSize() (n int) { + var l int + _ = l + if len(m.Capabilities) > 0 { + for _, e := range m.Capabilities { + n += 1 + sovMesos(uint64(e)) + } + } + return n +} + +func (m *LinuxInfo) ProtoSize() (n int) { + var l int + _ = l + if m.CapabilityInfo != nil { + l = m.CapabilityInfo.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.BoundingCapabilities != nil { + l = m.BoundingCapabilities.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.EffectiveCapabilities != nil { + l = m.EffectiveCapabilities.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.SharePIDNamespace != nil { + n += 2 + } + return n +} + +func (m *RLimitInfo) ProtoSize() (n int) { + var l int + _ = l + if len(m.Rlimits) > 0 { + for _, e := range m.Rlimits { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *RLimitInfo_RLimit) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Type)) + if m.Hard != nil { + n += 1 + sovMesos(uint64(*m.Hard)) + } + if m.Soft != nil { + n += 1 + sovMesos(uint64(*m.Soft)) + } + return n +} + +func (m *TTYInfo) ProtoSize() (n int) { + var l int + _ = l + if m.WindowSize != nil { + l = m.WindowSize.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *TTYInfo_WindowSize) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Rows)) + n += 1 + sovMesos(uint64(m.Columns)) + return n +} + +func (m *ContainerInfo) ProtoSize() (n int) { + var l int + _ = l + if m.Type != nil { + n += 1 + sovMesos(uint64(*m.Type)) + } + if len(m.Volumes) > 0 { + for _, e := range m.Volumes { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.Docker != nil { + l = m.Docker.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Hostname != nil { + l = len(*m.Hostname) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Mesos != nil { + l = m.Mesos.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if len(m.NetworkInfos) > 0 { + for _, e := range m.NetworkInfos { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.LinuxInfo != nil { + l = m.LinuxInfo.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.RlimitInfo != nil { + l = m.RlimitInfo.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.TTYInfo != nil { + l = m.TTYInfo.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *ContainerInfo_DockerInfo) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Image) + n += 1 + l + sovMesos(uint64(l)) + if m.Network != nil { + n += 1 + sovMesos(uint64(*m.Network)) + } + if len(m.PortMappings) > 0 { + for _, e := range m.PortMappings { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.Privileged != nil { + n += 2 + } + if len(m.Parameters) > 0 { + for _, e := range m.Parameters { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.ForcePullImage != nil { + n += 2 + } + if m.VolumeDriver != nil { + l = len(*m.VolumeDriver) + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *ContainerInfo_DockerInfo_PortMapping) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.HostPort)) + n += 1 + sovMesos(uint64(m.ContainerPort)) + if m.Protocol != nil { + l = len(*m.Protocol) + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *ContainerInfo_MesosInfo) ProtoSize() (n int) { + var l int + _ = l + if m.Image != nil { + l = m.Image.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *ContainerStatus) ProtoSize() (n int) { + var l int + _ = l + if len(m.NetworkInfos) > 0 { + for _, e := range m.NetworkInfos { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if m.CgroupInfo != nil { + l = m.CgroupInfo.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.ExecutorPID != nil { + n += 1 + sovMesos(uint64(*m.ExecutorPID)) + } + if m.ContainerID != nil { + l = m.ContainerID.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *CgroupInfo) ProtoSize() (n int) { + var l int + _ = l + if m.NetCLS != nil { + l = m.NetCLS.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *CgroupInfo_Blkio) ProtoSize() (n int) { + var l int + _ = l + return n +} + +func (m *CgroupInfo_Blkio_Value) ProtoSize() (n int) { + var l int + _ = l + if m.Op != nil { + n += 1 + sovMesos(uint64(*m.Op)) + } + if m.Value != nil { + n += 1 + sovMesos(uint64(*m.Value)) + } + return n +} + +func (m *CgroupInfo_Blkio_CFQ) ProtoSize() (n int) { + var l int + _ = l + return n +} + +func (m *CgroupInfo_Blkio_CFQ_Statistics) ProtoSize() (n int) { + var l int + _ = l + if m.Device != nil { + l = m.Device.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Sectors != nil { + n += 1 + sovMesos(uint64(*m.Sectors)) + } + if m.Time != nil { + n += 1 + sovMesos(uint64(*m.Time)) + } + if len(m.IOServiced) > 0 { + for _, e := range m.IOServiced { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if len(m.IOServiceBytes) > 0 { + for _, e := range m.IOServiceBytes { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if len(m.IOServiceTime) > 0 { + for _, e := range m.IOServiceTime { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if len(m.IOWaitTime) > 0 { + for _, e := range m.IOWaitTime { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if len(m.IOMerged) > 0 { + for _, e := range m.IOMerged { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if len(m.IOQueued) > 0 { + for _, e := range m.IOQueued { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *CgroupInfo_Blkio_Throttling) ProtoSize() (n int) { + var l int + _ = l + return n +} + +func (m *CgroupInfo_Blkio_Throttling_Statistics) ProtoSize() (n int) { + var l int + _ = l + if m.Device != nil { + l = m.Device.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if len(m.IOServiced) > 0 { + for _, e := range m.IOServiced { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if len(m.IOServiceBytes) > 0 { + for _, e := range m.IOServiceBytes { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *CgroupInfo_Blkio_Statistics) ProtoSize() (n int) { + var l int + _ = l + if len(m.CFQ) > 0 { + for _, e := range m.CFQ { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if len(m.CFQRecursive) > 0 { + for _, e := range m.CFQRecursive { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if len(m.Throttling) > 0 { + for _, e := range m.Throttling { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *CgroupInfo_NetCls) ProtoSize() (n int) { + var l int + _ = l + if m.ClassID != nil { + n += 1 + sovMesos(uint64(*m.ClassID)) + } + return n +} + +func (m *Labels) ProtoSize() (n int) { + var l int + _ = l + if len(m.Labels) > 0 { + for _, e := range m.Labels { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *Label) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Key) + n += 1 + l + sovMesos(uint64(l)) + if m.Value != nil { + l = len(*m.Value) + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Port) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Number)) + if m.Name != nil { + l = len(*m.Name) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Protocol != nil { + l = len(*m.Protocol) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Visibility != nil { + n += 1 + sovMesos(uint64(*m.Visibility)) + } + if m.Labels != nil { + l = m.Labels.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Ports) ProtoSize() (n int) { + var l int + _ = l + if len(m.Ports) > 0 { + for _, e := range m.Ports { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *DiscoveryInfo) ProtoSize() (n int) { + var l int + _ = l + n += 1 + sovMesos(uint64(m.Visibility)) + if m.Name != nil { + l = len(*m.Name) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Environment != nil { + l = len(*m.Environment) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Location != nil { + l = len(*m.Location) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Version != nil { + l = len(*m.Version) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Ports != nil { + l = m.Ports.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Labels != nil { + l = m.Labels.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *WeightInfo) ProtoSize() (n int) { + var l int + _ = l + n += 9 + if m.Role != nil { + l = len(*m.Role) + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *VersionInfo) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Version) + n += 1 + l + sovMesos(uint64(l)) + if m.BuildDate != nil { + l = len(*m.BuildDate) + n += 1 + l + sovMesos(uint64(l)) + } + if m.BuildTime != nil { + n += 9 + } + if m.BuildUser != nil { + l = len(*m.BuildUser) + n += 1 + l + sovMesos(uint64(l)) + } + if m.GitSHA != nil { + l = len(*m.GitSHA) + n += 1 + l + sovMesos(uint64(l)) + } + if m.GitBranch != nil { + l = len(*m.GitBranch) + n += 1 + l + sovMesos(uint64(l)) + } + if m.GitTag != nil { + l = len(*m.GitTag) + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Flag) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovMesos(uint64(l)) + if m.Value != nil { + l = len(*m.Value) + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Role) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovMesos(uint64(l)) + n += 9 + if len(m.Frameworks) > 0 { + for _, e := range m.Frameworks { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + if len(m.Resources) > 0 { + for _, e := range m.Resources { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func (m *Metric) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Name) + n += 1 + l + sovMesos(uint64(l)) + if m.Value != nil { + n += 9 + } + return n +} + +func (m *FileInfo) ProtoSize() (n int) { + var l int + _ = l + l = len(m.Path) + n += 1 + l + sovMesos(uint64(l)) + if m.Nlink != nil { + n += 1 + sovMesos(uint64(*m.Nlink)) + } + if m.Size != nil { + n += 1 + sovMesos(uint64(*m.Size)) + } + if m.Mtime != nil { + l = m.Mtime.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + if m.Mode != nil { + n += 1 + sovMesos(uint64(*m.Mode)) + } + if m.UID != nil { + l = len(*m.UID) + n += 1 + l + sovMesos(uint64(l)) + } + if m.GID != nil { + l = len(*m.GID) + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Device) ProtoSize() (n int) { + var l int + _ = l + if m.Path != nil { + l = len(*m.Path) + n += 1 + l + sovMesos(uint64(l)) + } + if m.Number != nil { + l = m.Number.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + return n +} + +func (m *Device_Number) ProtoSize() (n int) { + var l int + _ = l + if m.MajorNumber != nil { + n += 1 + sovMesos(uint64(*m.MajorNumber)) + } + if m.MinorNumber != nil { + n += 1 + sovMesos(uint64(*m.MinorNumber)) + } + return n +} + +func (m *DeviceAccess) ProtoSize() (n int) { + var l int + _ = l + l = m.Device.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + l = m.Access.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + return n +} + +func (m *DeviceAccess_Access) ProtoSize() (n int) { + var l int + _ = l + if m.Read != nil { + n += 2 + } + if m.Write != nil { + n += 2 + } + if m.Mknod != nil { + n += 2 + } + return n +} + +func (m *DeviceWhitelist) ProtoSize() (n int) { + var l int + _ = l + if len(m.AllowedDevices) > 0 { + for _, e := range m.AllowedDevices { + l = e.ProtoSize() + n += 1 + l + sovMesos(uint64(l)) + } + } + return n +} + +func sovMesos(x uint64) (n int) { + for { + n++ + x >>= 7 + if x == 0 { + break + } + } + return n +} +func sozMesos(x uint64) (n int) { + return sovMesos(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (this *FrameworkID) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FrameworkID{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `}`, + }, "") + return s +} +func (this *OfferID) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OfferID{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `}`, + }, "") + return s +} +func (this *AgentID) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AgentID{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `}`, + }, "") + return s +} +func (this *TaskID) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TaskID{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `}`, + }, "") + return s +} +func (this *ExecutorID) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ExecutorID{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerID) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainerID{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `Parent:` + strings.Replace(fmt.Sprintf("%v", this.Parent), "ContainerID", "ContainerID", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceProviderID) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceProviderID{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `}`, + }, "") + return s +} +func (this *OperationID) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OperationID{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `}`, + }, "") + return s +} +func (this *TimeInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TimeInfo{`, + `Nanoseconds:` + fmt.Sprintf("%v", this.Nanoseconds) + `,`, + `}`, + }, "") + return s +} +func (this *DurationInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DurationInfo{`, + `Nanoseconds:` + fmt.Sprintf("%v", this.Nanoseconds) + `,`, + `}`, + }, "") + return s +} +func (this *Address) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Address{`, + `Hostname:` + valueToStringMesos(this.Hostname) + `,`, + `IP:` + valueToStringMesos(this.IP) + `,`, + `Port:` + fmt.Sprintf("%v", this.Port) + `,`, + `}`, + }, "") + return s +} +func (this *URL) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&URL{`, + `Scheme:` + fmt.Sprintf("%v", this.Scheme) + `,`, + `Address:` + strings.Replace(strings.Replace(this.Address.String(), "Address", "Address", 1), `&`, ``, 1) + `,`, + `Path:` + valueToStringMesos(this.Path) + `,`, + `Query:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Query), "Parameter", "Parameter", 1), `&`, ``, 1) + `,`, + `Fragment:` + valueToStringMesos(this.Fragment) + `,`, + `}`, + }, "") + return s +} +func (this *Unavailability) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Unavailability{`, + `Start:` + strings.Replace(strings.Replace(this.Start.String(), "TimeInfo", "TimeInfo", 1), `&`, ``, 1) + `,`, + `Duration:` + strings.Replace(fmt.Sprintf("%v", this.Duration), "DurationInfo", "DurationInfo", 1) + `,`, + `}`, + }, "") + return s +} +func (this *MachineID) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MachineID{`, + `Hostname:` + valueToStringMesos(this.Hostname) + `,`, + `IP:` + valueToStringMesos(this.IP) + `,`, + `}`, + }, "") + return s +} +func (this *MachineInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MachineInfo{`, + `ID:` + strings.Replace(strings.Replace(this.ID.String(), "MachineID", "MachineID", 1), `&`, ``, 1) + `,`, + `Mode:` + valueToStringMesos(this.Mode) + `,`, + `Unavailability:` + strings.Replace(fmt.Sprintf("%v", this.Unavailability), "Unavailability", "Unavailability", 1) + `,`, + `}`, + }, "") + return s +} +func (this *FrameworkInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FrameworkInfo{`, + `User:` + fmt.Sprintf("%v", this.User) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `ID:` + strings.Replace(fmt.Sprintf("%v", this.ID), "FrameworkID", "FrameworkID", 1) + `,`, + `FailoverTimeout:` + valueToStringMesos(this.FailoverTimeout) + `,`, + `Checkpoint:` + valueToStringMesos(this.Checkpoint) + `,`, + `Role:` + valueToStringMesos(this.Role) + `,`, + `Hostname:` + valueToStringMesos(this.Hostname) + `,`, + `Principal:` + valueToStringMesos(this.Principal) + `,`, + `WebUiURL:` + valueToStringMesos(this.WebUiURL) + `,`, + `Capabilities:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Capabilities), "FrameworkInfo_Capability", "FrameworkInfo_Capability", 1), `&`, ``, 1) + `,`, + `Labels:` + strings.Replace(fmt.Sprintf("%v", this.Labels), "Labels", "Labels", 1) + `,`, + `Roles:` + fmt.Sprintf("%v", this.Roles) + `,`, + `}`, + }, "") + return s +} +func (this *FrameworkInfo_Capability) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FrameworkInfo_Capability{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `}`, + }, "") + return s +} +func (this *CheckInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CheckInfo{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Command:` + strings.Replace(fmt.Sprintf("%v", this.Command), "CheckInfo_Command", "CheckInfo_Command", 1) + `,`, + `HTTP:` + strings.Replace(fmt.Sprintf("%v", this.HTTP), "CheckInfo_Http", "CheckInfo_Http", 1) + `,`, + `DelaySeconds:` + valueToStringMesos(this.DelaySeconds) + `,`, + `IntervalSeconds:` + valueToStringMesos(this.IntervalSeconds) + `,`, + `TimeoutSeconds:` + valueToStringMesos(this.TimeoutSeconds) + `,`, + `TCP:` + strings.Replace(fmt.Sprintf("%v", this.TCP), "CheckInfo_Tcp", "CheckInfo_Tcp", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CheckInfo_Command) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CheckInfo_Command{`, + `Command:` + strings.Replace(strings.Replace(this.Command.String(), "CommandInfo", "CommandInfo", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *CheckInfo_Http) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CheckInfo_Http{`, + `Port:` + fmt.Sprintf("%v", this.Port) + `,`, + `Path:` + valueToStringMesos(this.Path) + `,`, + `}`, + }, "") + return s +} +func (this *CheckInfo_Tcp) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CheckInfo_Tcp{`, + `Port:` + fmt.Sprintf("%v", this.Port) + `,`, + `}`, + }, "") + return s +} +func (this *HealthCheck) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&HealthCheck{`, + `HTTP:` + strings.Replace(fmt.Sprintf("%v", this.HTTP), "HealthCheck_HTTPCheckInfo", "HealthCheck_HTTPCheckInfo", 1) + `,`, + `DelaySeconds:` + valueToStringMesos(this.DelaySeconds) + `,`, + `IntervalSeconds:` + valueToStringMesos(this.IntervalSeconds) + `,`, + `TimeoutSeconds:` + valueToStringMesos(this.TimeoutSeconds) + `,`, + `ConsecutiveFailures:` + valueToStringMesos(this.ConsecutiveFailures) + `,`, + `GracePeriodSeconds:` + valueToStringMesos(this.GracePeriodSeconds) + `,`, + `Command:` + strings.Replace(fmt.Sprintf("%v", this.Command), "CommandInfo", "CommandInfo", 1) + `,`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `TCP:` + strings.Replace(fmt.Sprintf("%v", this.TCP), "HealthCheck_TCPCheckInfo", "HealthCheck_TCPCheckInfo", 1) + `,`, + `}`, + }, "") + return s +} +func (this *HealthCheck_HTTPCheckInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&HealthCheck_HTTPCheckInfo{`, + `Port:` + fmt.Sprintf("%v", this.Port) + `,`, + `Path:` + valueToStringMesos(this.Path) + `,`, + `Scheme:` + valueToStringMesos(this.Scheme) + `,`, + `Statuses:` + fmt.Sprintf("%v", this.Statuses) + `,`, + `Protocol:` + valueToStringMesos(this.Protocol) + `,`, + `}`, + }, "") + return s +} +func (this *HealthCheck_TCPCheckInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&HealthCheck_TCPCheckInfo{`, + `Port:` + fmt.Sprintf("%v", this.Port) + `,`, + `Protocol:` + valueToStringMesos(this.Protocol) + `,`, + `}`, + }, "") + return s +} +func (this *KillPolicy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&KillPolicy{`, + `GracePeriod:` + strings.Replace(fmt.Sprintf("%v", this.GracePeriod), "DurationInfo", "DurationInfo", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CommandInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CommandInfo{`, + `URIs:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.URIs), "CommandInfo_URI", "CommandInfo_URI", 1), `&`, ``, 1) + `,`, + `Environment:` + strings.Replace(fmt.Sprintf("%v", this.Environment), "Environment", "Environment", 1) + `,`, + `Value:` + valueToStringMesos(this.Value) + `,`, + `User:` + valueToStringMesos(this.User) + `,`, + `Shell:` + valueToStringMesos(this.Shell) + `,`, + `Arguments:` + fmt.Sprintf("%v", this.Arguments) + `,`, + `}`, + }, "") + return s +} +func (this *CommandInfo_URI) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CommandInfo_URI{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `Executable:` + valueToStringMesos(this.Executable) + `,`, + `Extract:` + valueToStringMesos(this.Extract) + `,`, + `Cache:` + valueToStringMesos(this.Cache) + `,`, + `OutputFile:` + valueToStringMesos(this.OutputFile) + `,`, + `}`, + }, "") + return s +} +func (this *ExecutorInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ExecutorInfo{`, + `ExecutorID:` + strings.Replace(strings.Replace(this.ExecutorID.String(), "ExecutorID", "ExecutorID", 1), `&`, ``, 1) + `,`, + `Data:` + valueToStringMesos(this.Data) + `,`, + `Resources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "Resource", 1), `&`, ``, 1) + `,`, + `Command:` + strings.Replace(fmt.Sprintf("%v", this.Command), "CommandInfo", "CommandInfo", 1) + `,`, + `FrameworkID:` + strings.Replace(fmt.Sprintf("%v", this.FrameworkID), "FrameworkID", "FrameworkID", 1) + `,`, + `Name:` + valueToStringMesos(this.Name) + `,`, + `Source:` + valueToStringMesos(this.Source) + `,`, + `Container:` + strings.Replace(fmt.Sprintf("%v", this.Container), "ContainerInfo", "ContainerInfo", 1) + `,`, + `Discovery:` + strings.Replace(fmt.Sprintf("%v", this.Discovery), "DiscoveryInfo", "DiscoveryInfo", 1) + `,`, + `ShutdownGracePeriod:` + strings.Replace(fmt.Sprintf("%v", this.ShutdownGracePeriod), "DurationInfo", "DurationInfo", 1) + `,`, + `Labels:` + strings.Replace(fmt.Sprintf("%v", this.Labels), "Labels", "Labels", 1) + `,`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `}`, + }, "") + return s +} +func (this *DomainInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DomainInfo{`, + `FaultDomain:` + strings.Replace(fmt.Sprintf("%v", this.FaultDomain), "DomainInfo_FaultDomain", "DomainInfo_FaultDomain", 1) + `,`, + `}`, + }, "") + return s +} +func (this *DomainInfo_FaultDomain) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DomainInfo_FaultDomain{`, + `Region:` + strings.Replace(strings.Replace(this.Region.String(), "DomainInfo_FaultDomain_RegionInfo", "DomainInfo_FaultDomain_RegionInfo", 1), `&`, ``, 1) + `,`, + `Zone:` + strings.Replace(strings.Replace(this.Zone.String(), "DomainInfo_FaultDomain_ZoneInfo", "DomainInfo_FaultDomain_ZoneInfo", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *DomainInfo_FaultDomain_RegionInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DomainInfo_FaultDomain_RegionInfo{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `}`, + }, "") + return s +} +func (this *DomainInfo_FaultDomain_ZoneInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DomainInfo_FaultDomain_ZoneInfo{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `}`, + }, "") + return s +} +func (this *MasterInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MasterInfo{`, + `ID:` + fmt.Sprintf("%v", this.ID) + `,`, + `IP:` + fmt.Sprintf("%v", this.IP) + `,`, + `Port:` + valueToStringMesos(this.Port) + `,`, + `PID:` + valueToStringMesos(this.PID) + `,`, + `Hostname:` + valueToStringMesos(this.Hostname) + `,`, + `Version:` + valueToStringMesos(this.Version) + `,`, + `Address:` + strings.Replace(fmt.Sprintf("%v", this.Address), "Address", "Address", 1) + `,`, + `Domain:` + strings.Replace(fmt.Sprintf("%v", this.Domain), "DomainInfo", "DomainInfo", 1) + `,`, + `Capabilities:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Capabilities), "MasterInfo_Capability", "MasterInfo_Capability", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *MasterInfo_Capability) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MasterInfo_Capability{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `}`, + }, "") + return s +} +func (this *AgentInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AgentInfo{`, + `Hostname:` + fmt.Sprintf("%v", this.Hostname) + `,`, + `Resources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "Resource", 1), `&`, ``, 1) + `,`, + `Attributes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Attributes), "Attribute", "Attribute", 1), `&`, ``, 1) + `,`, + `ID:` + strings.Replace(fmt.Sprintf("%v", this.ID), "AgentID", "AgentID", 1) + `,`, + `Port:` + valueToStringMesos(this.Port) + `,`, + `Domain:` + strings.Replace(fmt.Sprintf("%v", this.Domain), "DomainInfo", "DomainInfo", 1) + `,`, + `}`, + }, "") + return s +} +func (this *AgentInfo_Capability) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&AgentInfo_Capability{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `}`, + }, "") + return s +} +func (this *CSIPluginContainerInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CSIPluginContainerInfo{`, + `Services:` + fmt.Sprintf("%v", this.Services) + `,`, + `Command:` + strings.Replace(fmt.Sprintf("%v", this.Command), "CommandInfo", "CommandInfo", 1) + `,`, + `Resources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "Resource", 1), `&`, ``, 1) + `,`, + `Container:` + strings.Replace(fmt.Sprintf("%v", this.Container), "ContainerInfo", "ContainerInfo", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CSIPluginInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CSIPluginInfo{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Containers:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Containers), "CSIPluginContainerInfo", "CSIPluginContainerInfo", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceProviderInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceProviderInfo{`, + `ID:` + strings.Replace(fmt.Sprintf("%v", this.ID), "ResourceProviderID", "ResourceProviderID", 1) + `,`, + `Attributes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Attributes), "Attribute", "Attribute", 1), `&`, ``, 1) + `,`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `DefaultReservations:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.DefaultReservations), "Resource_ReservationInfo", "Resource_ReservationInfo", 1), `&`, ``, 1) + `,`, + `Storage:` + strings.Replace(fmt.Sprintf("%v", this.Storage), "ResourceProviderInfo_Storage", "ResourceProviderInfo_Storage", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceProviderInfo_Storage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceProviderInfo_Storage{`, + `Plugin:` + strings.Replace(strings.Replace(this.Plugin.String(), "CSIPluginInfo", "CSIPluginInfo", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Value) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Scalar:` + strings.Replace(fmt.Sprintf("%v", this.Scalar), "Value_Scalar", "Value_Scalar", 1) + `,`, + `Ranges:` + strings.Replace(fmt.Sprintf("%v", this.Ranges), "Value_Ranges", "Value_Ranges", 1) + `,`, + `Set:` + strings.Replace(fmt.Sprintf("%v", this.Set), "Value_Set", "Value_Set", 1) + `,`, + `Text:` + strings.Replace(fmt.Sprintf("%v", this.Text), "Value_Text", "Value_Text", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Value_Scalar) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value_Scalar{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `}`, + }, "") + return s +} +func (this *Value_Range) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value_Range{`, + `Begin:` + fmt.Sprintf("%v", this.Begin) + `,`, + `End:` + fmt.Sprintf("%v", this.End) + `,`, + `}`, + }, "") + return s +} +func (this *Value_Ranges) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value_Ranges{`, + `Range:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Range), "Value_Range", "Value_Range", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Value_Set) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value_Set{`, + `Item:` + fmt.Sprintf("%v", this.Item) + `,`, + `}`, + }, "") + return s +} +func (this *Value_Text) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Value_Text{`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `}`, + }, "") + return s +} +func (this *Attribute) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Attribute{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Scalar:` + strings.Replace(fmt.Sprintf("%v", this.Scalar), "Value_Scalar", "Value_Scalar", 1) + `,`, + `Ranges:` + strings.Replace(fmt.Sprintf("%v", this.Ranges), "Value_Ranges", "Value_Ranges", 1) + `,`, + `Text:` + strings.Replace(fmt.Sprintf("%v", this.Text), "Value_Text", "Value_Text", 1) + `,`, + `Set:` + strings.Replace(fmt.Sprintf("%v", this.Set), "Value_Set", "Value_Set", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Resource) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Resource{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Type:` + valueToStringMesos(this.Type) + `,`, + `Scalar:` + strings.Replace(fmt.Sprintf("%v", this.Scalar), "Value_Scalar", "Value_Scalar", 1) + `,`, + `Ranges:` + strings.Replace(fmt.Sprintf("%v", this.Ranges), "Value_Ranges", "Value_Ranges", 1) + `,`, + `Set:` + strings.Replace(fmt.Sprintf("%v", this.Set), "Value_Set", "Value_Set", 1) + `,`, + `Role:` + valueToStringMesos(this.Role) + `,`, + `Disk:` + strings.Replace(fmt.Sprintf("%v", this.Disk), "Resource_DiskInfo", "Resource_DiskInfo", 1) + `,`, + `Reservation:` + strings.Replace(fmt.Sprintf("%v", this.Reservation), "Resource_ReservationInfo", "Resource_ReservationInfo", 1) + `,`, + `Revocable:` + strings.Replace(fmt.Sprintf("%v", this.Revocable), "Resource_RevocableInfo", "Resource_RevocableInfo", 1) + `,`, + `Shared:` + strings.Replace(fmt.Sprintf("%v", this.Shared), "Resource_SharedInfo", "Resource_SharedInfo", 1) + `,`, + `AllocationInfo:` + strings.Replace(fmt.Sprintf("%v", this.AllocationInfo), "Resource_AllocationInfo", "Resource_AllocationInfo", 1) + `,`, + `ProviderID:` + strings.Replace(fmt.Sprintf("%v", this.ProviderID), "ResourceProviderID", "ResourceProviderID", 1) + `,`, + `Reservations:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Reservations), "Resource_ReservationInfo", "Resource_ReservationInfo", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Resource_AllocationInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Resource_AllocationInfo{`, + `Role:` + valueToStringMesos(this.Role) + `,`, + `}`, + }, "") + return s +} +func (this *Resource_ReservationInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Resource_ReservationInfo{`, + `Principal:` + valueToStringMesos(this.Principal) + `,`, + `Labels:` + strings.Replace(fmt.Sprintf("%v", this.Labels), "Labels", "Labels", 1) + `,`, + `Role:` + valueToStringMesos(this.Role) + `,`, + `Type:` + valueToStringMesos(this.Type) + `,`, + `}`, + }, "") + return s +} +func (this *Resource_DiskInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Resource_DiskInfo{`, + `Persistence:` + strings.Replace(fmt.Sprintf("%v", this.Persistence), "Resource_DiskInfo_Persistence", "Resource_DiskInfo_Persistence", 1) + `,`, + `Volume:` + strings.Replace(fmt.Sprintf("%v", this.Volume), "Volume", "Volume", 1) + `,`, + `Source:` + strings.Replace(fmt.Sprintf("%v", this.Source), "Resource_DiskInfo_Source", "Resource_DiskInfo_Source", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Resource_DiskInfo_Persistence) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Resource_DiskInfo_Persistence{`, + `ID:` + fmt.Sprintf("%v", this.ID) + `,`, + `Principal:` + valueToStringMesos(this.Principal) + `,`, + `}`, + }, "") + return s +} +func (this *Resource_DiskInfo_Source) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Resource_DiskInfo_Source{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Path:` + strings.Replace(fmt.Sprintf("%v", this.Path), "Resource_DiskInfo_Source_Path", "Resource_DiskInfo_Source_Path", 1) + `,`, + `Mount:` + strings.Replace(fmt.Sprintf("%v", this.Mount), "Resource_DiskInfo_Source_Mount", "Resource_DiskInfo_Source_Mount", 1) + `,`, + `ID:` + valueToStringMesos(this.ID) + `,`, + `Metadata:` + strings.Replace(fmt.Sprintf("%v", this.Metadata), "Labels", "Labels", 1) + `,`, + `Profile:` + valueToStringMesos(this.Profile) + `,`, + `}`, + }, "") + return s +} +func (this *Resource_DiskInfo_Source_Path) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Resource_DiskInfo_Source_Path{`, + `Root:` + valueToStringMesos(this.Root) + `,`, + `}`, + }, "") + return s +} +func (this *Resource_DiskInfo_Source_Mount) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Resource_DiskInfo_Source_Mount{`, + `Root:` + valueToStringMesos(this.Root) + `,`, + `}`, + }, "") + return s +} +func (this *Resource_RevocableInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Resource_RevocableInfo{`, + `}`, + }, "") + return s +} +func (this *Resource_SharedInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Resource_SharedInfo{`, + `}`, + }, "") + return s +} +func (this *TrafficControlStatistics) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TrafficControlStatistics{`, + `ID:` + fmt.Sprintf("%v", this.ID) + `,`, + `Backlog:` + valueToStringMesos(this.Backlog) + `,`, + `Bytes:` + valueToStringMesos(this.Bytes) + `,`, + `Drops:` + valueToStringMesos(this.Drops) + `,`, + `Overlimits:` + valueToStringMesos(this.Overlimits) + `,`, + `Packets:` + valueToStringMesos(this.Packets) + `,`, + `Qlen:` + valueToStringMesos(this.Qlen) + `,`, + `RateBPS:` + valueToStringMesos(this.RateBPS) + `,`, + `RatePPS:` + valueToStringMesos(this.RatePPS) + `,`, + `Requeues:` + valueToStringMesos(this.Requeues) + `,`, + `}`, + }, "") + return s +} +func (this *IpStatistics) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&IpStatistics{`, + `Forwarding:` + valueToStringMesos(this.Forwarding) + `,`, + `DefaultTTL:` + valueToStringMesos(this.DefaultTTL) + `,`, + `InReceives:` + valueToStringMesos(this.InReceives) + `,`, + `InHdrErrors:` + valueToStringMesos(this.InHdrErrors) + `,`, + `InAddrErrors:` + valueToStringMesos(this.InAddrErrors) + `,`, + `ForwDatagrams:` + valueToStringMesos(this.ForwDatagrams) + `,`, + `InUnknownProtos:` + valueToStringMesos(this.InUnknownProtos) + `,`, + `InDiscards:` + valueToStringMesos(this.InDiscards) + `,`, + `InDelivers:` + valueToStringMesos(this.InDelivers) + `,`, + `OutRequests:` + valueToStringMesos(this.OutRequests) + `,`, + `OutDiscards:` + valueToStringMesos(this.OutDiscards) + `,`, + `OutNoRoutes:` + valueToStringMesos(this.OutNoRoutes) + `,`, + `ReasmTimeout:` + valueToStringMesos(this.ReasmTimeout) + `,`, + `ReasmReqds:` + valueToStringMesos(this.ReasmReqds) + `,`, + `ReasmOKs:` + valueToStringMesos(this.ReasmOKs) + `,`, + `ReasmFails:` + valueToStringMesos(this.ReasmFails) + `,`, + `FragOKs:` + valueToStringMesos(this.FragOKs) + `,`, + `FragFails:` + valueToStringMesos(this.FragFails) + `,`, + `FragCreates:` + valueToStringMesos(this.FragCreates) + `,`, + `}`, + }, "") + return s +} +func (this *IcmpStatistics) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&IcmpStatistics{`, + `InMsgs:` + valueToStringMesos(this.InMsgs) + `,`, + `InErrors:` + valueToStringMesos(this.InErrors) + `,`, + `InCsumErrors:` + valueToStringMesos(this.InCsumErrors) + `,`, + `InDestUnreachs:` + valueToStringMesos(this.InDestUnreachs) + `,`, + `InTimeExcds:` + valueToStringMesos(this.InTimeExcds) + `,`, + `InParmProbs:` + valueToStringMesos(this.InParmProbs) + `,`, + `InSrcQuenchs:` + valueToStringMesos(this.InSrcQuenchs) + `,`, + `InRedirects:` + valueToStringMesos(this.InRedirects) + `,`, + `InEchos:` + valueToStringMesos(this.InEchos) + `,`, + `InEchoReps:` + valueToStringMesos(this.InEchoReps) + `,`, + `InTimestamps:` + valueToStringMesos(this.InTimestamps) + `,`, + `InTimestampReps:` + valueToStringMesos(this.InTimestampReps) + `,`, + `InAddrMasks:` + valueToStringMesos(this.InAddrMasks) + `,`, + `InAddrMaskReps:` + valueToStringMesos(this.InAddrMaskReps) + `,`, + `OutMsgs:` + valueToStringMesos(this.OutMsgs) + `,`, + `OutErrors:` + valueToStringMesos(this.OutErrors) + `,`, + `OutDestUnreachs:` + valueToStringMesos(this.OutDestUnreachs) + `,`, + `OutTimeExcds:` + valueToStringMesos(this.OutTimeExcds) + `,`, + `OutParmProbs:` + valueToStringMesos(this.OutParmProbs) + `,`, + `OutSrcQuenchs:` + valueToStringMesos(this.OutSrcQuenchs) + `,`, + `OutRedirects:` + valueToStringMesos(this.OutRedirects) + `,`, + `OutEchos:` + valueToStringMesos(this.OutEchos) + `,`, + `OutEchoReps:` + valueToStringMesos(this.OutEchoReps) + `,`, + `OutTimestamps:` + valueToStringMesos(this.OutTimestamps) + `,`, + `OutTimestampReps:` + valueToStringMesos(this.OutTimestampReps) + `,`, + `OutAddrMasks:` + valueToStringMesos(this.OutAddrMasks) + `,`, + `OutAddrMaskReps:` + valueToStringMesos(this.OutAddrMaskReps) + `,`, + `}`, + }, "") + return s +} +func (this *TcpStatistics) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TcpStatistics{`, + `RtoAlgorithm:` + valueToStringMesos(this.RtoAlgorithm) + `,`, + `RtoMin:` + valueToStringMesos(this.RtoMin) + `,`, + `RtoMax:` + valueToStringMesos(this.RtoMax) + `,`, + `MaxConn:` + valueToStringMesos(this.MaxConn) + `,`, + `ActiveOpens:` + valueToStringMesos(this.ActiveOpens) + `,`, + `PassiveOpens:` + valueToStringMesos(this.PassiveOpens) + `,`, + `AttemptFails:` + valueToStringMesos(this.AttemptFails) + `,`, + `EstabResets:` + valueToStringMesos(this.EstabResets) + `,`, + `CurrEstab:` + valueToStringMesos(this.CurrEstab) + `,`, + `InSegs:` + valueToStringMesos(this.InSegs) + `,`, + `OutSegs:` + valueToStringMesos(this.OutSegs) + `,`, + `RetransSegs:` + valueToStringMesos(this.RetransSegs) + `,`, + `InErrs:` + valueToStringMesos(this.InErrs) + `,`, + `OutRsts:` + valueToStringMesos(this.OutRsts) + `,`, + `InCsumErrors:` + valueToStringMesos(this.InCsumErrors) + `,`, + `}`, + }, "") + return s +} +func (this *UdpStatistics) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UdpStatistics{`, + `InDatagrams:` + valueToStringMesos(this.InDatagrams) + `,`, + `NoPorts:` + valueToStringMesos(this.NoPorts) + `,`, + `InErrors:` + valueToStringMesos(this.InErrors) + `,`, + `OutDatagrams:` + valueToStringMesos(this.OutDatagrams) + `,`, + `RcvbufErrors:` + valueToStringMesos(this.RcvbufErrors) + `,`, + `SndbufErrors:` + valueToStringMesos(this.SndbufErrors) + `,`, + `InCsumErrors:` + valueToStringMesos(this.InCsumErrors) + `,`, + `IgnoredMulti:` + valueToStringMesos(this.IgnoredMulti) + `,`, + `}`, + }, "") + return s +} +func (this *SNMPStatistics) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&SNMPStatistics{`, + `IPStats:` + strings.Replace(fmt.Sprintf("%v", this.IPStats), "IpStatistics", "IpStatistics", 1) + `,`, + `ICMPStats:` + strings.Replace(fmt.Sprintf("%v", this.ICMPStats), "IcmpStatistics", "IcmpStatistics", 1) + `,`, + `TCPStats:` + strings.Replace(fmt.Sprintf("%v", this.TCPStats), "TcpStatistics", "TcpStatistics", 1) + `,`, + `UDPStats:` + strings.Replace(fmt.Sprintf("%v", this.UDPStats), "UdpStatistics", "UdpStatistics", 1) + `,`, + `}`, + }, "") + return s +} +func (this *DiskStatistics) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DiskStatistics{`, + `Source:` + strings.Replace(fmt.Sprintf("%v", this.Source), "Resource_DiskInfo_Source", "Resource_DiskInfo_Source", 1) + `,`, + `Persistence:` + strings.Replace(fmt.Sprintf("%v", this.Persistence), "Resource_DiskInfo_Persistence", "Resource_DiskInfo_Persistence", 1) + `,`, + `LimitBytes:` + valueToStringMesos(this.LimitBytes) + `,`, + `UsedBytes:` + valueToStringMesos(this.UsedBytes) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceStatistics) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceStatistics{`, + `Timestamp:` + fmt.Sprintf("%v", this.Timestamp) + `,`, + `CPUsUserTimeSecs:` + valueToStringMesos(this.CPUsUserTimeSecs) + `,`, + `CPUsSystemTimeSecs:` + valueToStringMesos(this.CPUsSystemTimeSecs) + `,`, + `CPUsLimit:` + valueToStringMesos(this.CPUsLimit) + `,`, + `MemRSSBytes:` + valueToStringMesos(this.MemRSSBytes) + `,`, + `MemLimitBytes:` + valueToStringMesos(this.MemLimitBytes) + `,`, + `CPUsNrPeriods:` + valueToStringMesos(this.CPUsNrPeriods) + `,`, + `CPUsNrThrottled:` + valueToStringMesos(this.CPUsNrThrottled) + `,`, + `CPUsThrottledTimeSecs:` + valueToStringMesos(this.CPUsThrottledTimeSecs) + `,`, + `MemFileBytes:` + valueToStringMesos(this.MemFileBytes) + `,`, + `MemAnonBytes:` + valueToStringMesos(this.MemAnonBytes) + `,`, + `MemMappedFileBytes:` + valueToStringMesos(this.MemMappedFileBytes) + `,`, + `Perf:` + strings.Replace(fmt.Sprintf("%v", this.Perf), "PerfStatistics", "PerfStatistics", 1) + `,`, + `NetRxPackets:` + valueToStringMesos(this.NetRxPackets) + `,`, + `NetRxBytes:` + valueToStringMesos(this.NetRxBytes) + `,`, + `NetRxErrors:` + valueToStringMesos(this.NetRxErrors) + `,`, + `NetRxDropped:` + valueToStringMesos(this.NetRxDropped) + `,`, + `NetTxPackets:` + valueToStringMesos(this.NetTxPackets) + `,`, + `NetTxBytes:` + valueToStringMesos(this.NetTxBytes) + `,`, + `NetTxErrors:` + valueToStringMesos(this.NetTxErrors) + `,`, + `NetTxDropped:` + valueToStringMesos(this.NetTxDropped) + `,`, + `NetTCPRttMicrosecsP50:` + valueToStringMesos(this.NetTCPRttMicrosecsP50) + `,`, + `NetTCPRttMicrosecsP90:` + valueToStringMesos(this.NetTCPRttMicrosecsP90) + `,`, + `NetTCPRttMicrosecsP95:` + valueToStringMesos(this.NetTCPRttMicrosecsP95) + `,`, + `NetTCPRttMicrosecsP99:` + valueToStringMesos(this.NetTCPRttMicrosecsP99) + `,`, + `DiskLimitBytes:` + valueToStringMesos(this.DiskLimitBytes) + `,`, + `DiskUsedBytes:` + valueToStringMesos(this.DiskUsedBytes) + `,`, + `NetTCPActiveConnections:` + valueToStringMesos(this.NetTCPActiveConnections) + `,`, + `NetTCPTimeWaitConnections:` + valueToStringMesos(this.NetTCPTimeWaitConnections) + `,`, + `Processes:` + valueToStringMesos(this.Processes) + `,`, + `Threads:` + valueToStringMesos(this.Threads) + `,`, + `MemLowPressureCounter:` + valueToStringMesos(this.MemLowPressureCounter) + `,`, + `MemMediumPressureCounter:` + valueToStringMesos(this.MemMediumPressureCounter) + `,`, + `MemCriticalPressureCounter:` + valueToStringMesos(this.MemCriticalPressureCounter) + `,`, + `NetTrafficControlStatistics:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.NetTrafficControlStatistics), "TrafficControlStatistics", "TrafficControlStatistics", 1), `&`, ``, 1) + `,`, + `MemTotalBytes:` + valueToStringMesos(this.MemTotalBytes) + `,`, + `MemTotalMemswBytes:` + valueToStringMesos(this.MemTotalMemswBytes) + `,`, + `MemSoftLimitBytes:` + valueToStringMesos(this.MemSoftLimitBytes) + `,`, + `MemCacheBytes:` + valueToStringMesos(this.MemCacheBytes) + `,`, + `MemSwapBytes:` + valueToStringMesos(this.MemSwapBytes) + `,`, + `MemUnevictableBytes:` + valueToStringMesos(this.MemUnevictableBytes) + `,`, + `NetSNMPStatistics:` + strings.Replace(fmt.Sprintf("%v", this.NetSNMPStatistics), "SNMPStatistics", "SNMPStatistics", 1) + `,`, + `DiskStatistics:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.DiskStatistics), "DiskStatistics", "DiskStatistics", 1), `&`, ``, 1) + `,`, + `BlkioStatistics:` + strings.Replace(fmt.Sprintf("%v", this.BlkioStatistics), "CgroupInfo_Blkio_Statistics", "CgroupInfo_Blkio_Statistics", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceUsage) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceUsage{`, + `Executors:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Executors), "ResourceUsage_Executor", "ResourceUsage_Executor", 1), `&`, ``, 1) + `,`, + `Total:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Total), "Resource", "Resource", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceUsage_Executor) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceUsage_Executor{`, + `ExecutorInfo:` + strings.Replace(strings.Replace(this.ExecutorInfo.String(), "ExecutorInfo", "ExecutorInfo", 1), `&`, ``, 1) + `,`, + `Allocated:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Allocated), "Resource", "Resource", 1), `&`, ``, 1) + `,`, + `Statistics:` + strings.Replace(fmt.Sprintf("%v", this.Statistics), "ResourceStatistics", "ResourceStatistics", 1) + `,`, + `ContainerID:` + strings.Replace(strings.Replace(this.ContainerID.String(), "ContainerID", "ContainerID", 1), `&`, ``, 1) + `,`, + `Tasks:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Tasks), "ResourceUsage_Executor_Task", "ResourceUsage_Executor_Task", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *ResourceUsage_Executor_Task) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ResourceUsage_Executor_Task{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `ID:` + strings.Replace(strings.Replace(this.ID.String(), "TaskID", "TaskID", 1), `&`, ``, 1) + `,`, + `Resources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "Resource", 1), `&`, ``, 1) + `,`, + `Labels:` + strings.Replace(fmt.Sprintf("%v", this.Labels), "Labels", "Labels", 1) + `,`, + `}`, + }, "") + return s +} +func (this *PerfStatistics) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&PerfStatistics{`, + `Timestamp:` + fmt.Sprintf("%v", this.Timestamp) + `,`, + `Duration:` + fmt.Sprintf("%v", this.Duration) + `,`, + `Cycles:` + valueToStringMesos(this.Cycles) + `,`, + `StalledCyclesFrontend:` + valueToStringMesos(this.StalledCyclesFrontend) + `,`, + `StalledCyclesBackend:` + valueToStringMesos(this.StalledCyclesBackend) + `,`, + `Instructions:` + valueToStringMesos(this.Instructions) + `,`, + `CacheReferences:` + valueToStringMesos(this.CacheReferences) + `,`, + `CacheMisses:` + valueToStringMesos(this.CacheMisses) + `,`, + `Branches:` + valueToStringMesos(this.Branches) + `,`, + `BranchMisses:` + valueToStringMesos(this.BranchMisses) + `,`, + `BusCycles:` + valueToStringMesos(this.BusCycles) + `,`, + `RefCycles:` + valueToStringMesos(this.RefCycles) + `,`, + `CPUClock:` + valueToStringMesos(this.CPUClock) + `,`, + `TaskClock:` + valueToStringMesos(this.TaskClock) + `,`, + `PageFaults:` + valueToStringMesos(this.PageFaults) + `,`, + `MinorFaults:` + valueToStringMesos(this.MinorFaults) + `,`, + `MajorFaults:` + valueToStringMesos(this.MajorFaults) + `,`, + `ContextSwitches:` + valueToStringMesos(this.ContextSwitches) + `,`, + `CPUMigrations:` + valueToStringMesos(this.CPUMigrations) + `,`, + `AlignmentFaults:` + valueToStringMesos(this.AlignmentFaults) + `,`, + `EmulationFaults:` + valueToStringMesos(this.EmulationFaults) + `,`, + `L1DcacheLoads:` + valueToStringMesos(this.L1DcacheLoads) + `,`, + `L1DcacheLoadMisses:` + valueToStringMesos(this.L1DcacheLoadMisses) + `,`, + `L1DcacheStores:` + valueToStringMesos(this.L1DcacheStores) + `,`, + `L1DcacheStoreMisses:` + valueToStringMesos(this.L1DcacheStoreMisses) + `,`, + `L1DcachePrefetches:` + valueToStringMesos(this.L1DcachePrefetches) + `,`, + `L1DcachePrefetchMisses:` + valueToStringMesos(this.L1DcachePrefetchMisses) + `,`, + `L1IcacheLoads:` + valueToStringMesos(this.L1IcacheLoads) + `,`, + `L1IcacheLoadMisses:` + valueToStringMesos(this.L1IcacheLoadMisses) + `,`, + `L1IcachePrefetches:` + valueToStringMesos(this.L1IcachePrefetches) + `,`, + `L1IcachePrefetchMisses:` + valueToStringMesos(this.L1IcachePrefetchMisses) + `,`, + `LLCLoads:` + valueToStringMesos(this.LLCLoads) + `,`, + `LLCLoadMisses:` + valueToStringMesos(this.LLCLoadMisses) + `,`, + `LLCStores:` + valueToStringMesos(this.LLCStores) + `,`, + `LLCStoreMisses:` + valueToStringMesos(this.LLCStoreMisses) + `,`, + `LLCPrefetches:` + valueToStringMesos(this.LLCPrefetches) + `,`, + `LLCPrefetchMisses:` + valueToStringMesos(this.LLCPrefetchMisses) + `,`, + `DTLBLoads:` + valueToStringMesos(this.DTLBLoads) + `,`, + `DTLBLoadMisses:` + valueToStringMesos(this.DTLBLoadMisses) + `,`, + `DTLBStores:` + valueToStringMesos(this.DTLBStores) + `,`, + `DTLBStoreMisses:` + valueToStringMesos(this.DTLBStoreMisses) + `,`, + `DTLBPrefetches:` + valueToStringMesos(this.DTLBPrefetches) + `,`, + `DTLBPrefetchMisses:` + valueToStringMesos(this.DTLBPrefetchMisses) + `,`, + `ITLBLoads:` + valueToStringMesos(this.ITLBLoads) + `,`, + `ITLBLoadMisses:` + valueToStringMesos(this.ITLBLoadMisses) + `,`, + `BranchLoads:` + valueToStringMesos(this.BranchLoads) + `,`, + `BranchLoadMisses:` + valueToStringMesos(this.BranchLoadMisses) + `,`, + `NodeLoads:` + valueToStringMesos(this.NodeLoads) + `,`, + `NodeLoadMisses:` + valueToStringMesos(this.NodeLoadMisses) + `,`, + `NodeStores:` + valueToStringMesos(this.NodeStores) + `,`, + `NodeStoreMisses:` + valueToStringMesos(this.NodeStoreMisses) + `,`, + `NodePrefetches:` + valueToStringMesos(this.NodePrefetches) + `,`, + `NodePrefetchMisses:` + valueToStringMesos(this.NodePrefetchMisses) + `,`, + `}`, + }, "") + return s +} +func (this *Request) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Request{`, + `AgentID:` + strings.Replace(fmt.Sprintf("%v", this.AgentID), "AgentID", "AgentID", 1) + `,`, + `Resources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "Resource", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Offer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Offer{`, + `ID:` + strings.Replace(strings.Replace(this.ID.String(), "OfferID", "OfferID", 1), `&`, ``, 1) + `,`, + `FrameworkID:` + strings.Replace(strings.Replace(this.FrameworkID.String(), "FrameworkID", "FrameworkID", 1), `&`, ``, 1) + `,`, + `AgentID:` + strings.Replace(strings.Replace(this.AgentID.String(), "AgentID", "AgentID", 1), `&`, ``, 1) + `,`, + `Hostname:` + fmt.Sprintf("%v", this.Hostname) + `,`, + `Resources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "Resource", 1), `&`, ``, 1) + `,`, + `ExecutorIDs:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ExecutorIDs), "ExecutorID", "ExecutorID", 1), `&`, ``, 1) + `,`, + `Attributes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Attributes), "Attribute", "Attribute", 1), `&`, ``, 1) + `,`, + `URL:` + strings.Replace(fmt.Sprintf("%v", this.URL), "URL", "URL", 1) + `,`, + `Unavailability:` + strings.Replace(fmt.Sprintf("%v", this.Unavailability), "Unavailability", "Unavailability", 1) + `,`, + `AllocationInfo:` + strings.Replace(fmt.Sprintf("%v", this.AllocationInfo), "Resource_AllocationInfo", "Resource_AllocationInfo", 1) + `,`, + `Domain:` + strings.Replace(fmt.Sprintf("%v", this.Domain), "DomainInfo", "DomainInfo", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Offer_Operation) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Offer_Operation{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Launch:` + strings.Replace(fmt.Sprintf("%v", this.Launch), "Offer_Operation_Launch", "Offer_Operation_Launch", 1) + `,`, + `Reserve:` + strings.Replace(fmt.Sprintf("%v", this.Reserve), "Offer_Operation_Reserve", "Offer_Operation_Reserve", 1) + `,`, + `Unreserve:` + strings.Replace(fmt.Sprintf("%v", this.Unreserve), "Offer_Operation_Unreserve", "Offer_Operation_Unreserve", 1) + `,`, + `Create:` + strings.Replace(fmt.Sprintf("%v", this.Create), "Offer_Operation_Create", "Offer_Operation_Create", 1) + `,`, + `Destroy:` + strings.Replace(fmt.Sprintf("%v", this.Destroy), "Offer_Operation_Destroy", "Offer_Operation_Destroy", 1) + `,`, + `LaunchGroup:` + strings.Replace(fmt.Sprintf("%v", this.LaunchGroup), "Offer_Operation_LaunchGroup", "Offer_Operation_LaunchGroup", 1) + `,`, + `CreateVolume:` + strings.Replace(fmt.Sprintf("%v", this.CreateVolume), "Offer_Operation_CreateVolume", "Offer_Operation_CreateVolume", 1) + `,`, + `DestroyVolume:` + strings.Replace(fmt.Sprintf("%v", this.DestroyVolume), "Offer_Operation_DestroyVolume", "Offer_Operation_DestroyVolume", 1) + `,`, + `CreateBlock:` + strings.Replace(fmt.Sprintf("%v", this.CreateBlock), "Offer_Operation_CreateBlock", "Offer_Operation_CreateBlock", 1) + `,`, + `DestroyBlock:` + strings.Replace(fmt.Sprintf("%v", this.DestroyBlock), "Offer_Operation_DestroyBlock", "Offer_Operation_DestroyBlock", 1) + `,`, + `ID:` + strings.Replace(fmt.Sprintf("%v", this.ID), "OperationID", "OperationID", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Offer_Operation_Launch) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Offer_Operation_Launch{`, + `TaskInfos:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.TaskInfos), "TaskInfo", "TaskInfo", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Offer_Operation_LaunchGroup) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Offer_Operation_LaunchGroup{`, + `Executor:` + strings.Replace(strings.Replace(this.Executor.String(), "ExecutorInfo", "ExecutorInfo", 1), `&`, ``, 1) + `,`, + `TaskGroup:` + strings.Replace(strings.Replace(this.TaskGroup.String(), "TaskGroupInfo", "TaskGroupInfo", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Offer_Operation_Reserve) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Offer_Operation_Reserve{`, + `Resources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "Resource", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Offer_Operation_Unreserve) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Offer_Operation_Unreserve{`, + `Resources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "Resource", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Offer_Operation_Create) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Offer_Operation_Create{`, + `Volumes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Volumes), "Resource", "Resource", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Offer_Operation_Destroy) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Offer_Operation_Destroy{`, + `Volumes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Volumes), "Resource", "Resource", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Offer_Operation_CreateVolume) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Offer_Operation_CreateVolume{`, + `Source:` + strings.Replace(strings.Replace(this.Source.String(), "Resource", "Resource", 1), `&`, ``, 1) + `,`, + `TargetType:` + fmt.Sprintf("%v", this.TargetType) + `,`, + `}`, + }, "") + return s +} +func (this *Offer_Operation_DestroyVolume) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Offer_Operation_DestroyVolume{`, + `Volume:` + strings.Replace(strings.Replace(this.Volume.String(), "Resource", "Resource", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Offer_Operation_CreateBlock) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Offer_Operation_CreateBlock{`, + `Source:` + strings.Replace(strings.Replace(this.Source.String(), "Resource", "Resource", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Offer_Operation_DestroyBlock) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Offer_Operation_DestroyBlock{`, + `Block:` + strings.Replace(strings.Replace(this.Block.String(), "Resource", "Resource", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *InverseOffer) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&InverseOffer{`, + `OfferID:` + strings.Replace(strings.Replace(this.OfferID.String(), "OfferID", "OfferID", 1), `&`, ``, 1) + `,`, + `URL:` + strings.Replace(fmt.Sprintf("%v", this.URL), "URL", "URL", 1) + `,`, + `FrameworkID:` + strings.Replace(strings.Replace(this.FrameworkID.String(), "FrameworkID", "FrameworkID", 1), `&`, ``, 1) + `,`, + `AgentID:` + strings.Replace(fmt.Sprintf("%v", this.AgentID), "AgentID", "AgentID", 1) + `,`, + `Unavailability:` + strings.Replace(strings.Replace(this.Unavailability.String(), "Unavailability", "Unavailability", 1), `&`, ``, 1) + `,`, + `Resources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "Resource", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *TaskInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TaskInfo{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `TaskID:` + strings.Replace(strings.Replace(this.TaskID.String(), "TaskID", "TaskID", 1), `&`, ``, 1) + `,`, + `AgentID:` + strings.Replace(strings.Replace(this.AgentID.String(), "AgentID", "AgentID", 1), `&`, ``, 1) + `,`, + `Resources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "Resource", 1), `&`, ``, 1) + `,`, + `Executor:` + strings.Replace(fmt.Sprintf("%v", this.Executor), "ExecutorInfo", "ExecutorInfo", 1) + `,`, + `Data:` + valueToStringMesos(this.Data) + `,`, + `Command:` + strings.Replace(fmt.Sprintf("%v", this.Command), "CommandInfo", "CommandInfo", 1) + `,`, + `HealthCheck:` + strings.Replace(fmt.Sprintf("%v", this.HealthCheck), "HealthCheck", "HealthCheck", 1) + `,`, + `Container:` + strings.Replace(fmt.Sprintf("%v", this.Container), "ContainerInfo", "ContainerInfo", 1) + `,`, + `Labels:` + strings.Replace(fmt.Sprintf("%v", this.Labels), "Labels", "Labels", 1) + `,`, + `Discovery:` + strings.Replace(fmt.Sprintf("%v", this.Discovery), "DiscoveryInfo", "DiscoveryInfo", 1) + `,`, + `KillPolicy:` + strings.Replace(fmt.Sprintf("%v", this.KillPolicy), "KillPolicy", "KillPolicy", 1) + `,`, + `Check:` + strings.Replace(fmt.Sprintf("%v", this.Check), "CheckInfo", "CheckInfo", 1) + `,`, + `}`, + }, "") + return s +} +func (this *TaskGroupInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TaskGroupInfo{`, + `Tasks:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Tasks), "TaskInfo", "TaskInfo", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Task) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Task{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `TaskID:` + strings.Replace(strings.Replace(this.TaskID.String(), "TaskID", "TaskID", 1), `&`, ``, 1) + `,`, + `FrameworkID:` + strings.Replace(strings.Replace(this.FrameworkID.String(), "FrameworkID", "FrameworkID", 1), `&`, ``, 1) + `,`, + `ExecutorID:` + strings.Replace(fmt.Sprintf("%v", this.ExecutorID), "ExecutorID", "ExecutorID", 1) + `,`, + `AgentID:` + strings.Replace(strings.Replace(this.AgentID.String(), "AgentID", "AgentID", 1), `&`, ``, 1) + `,`, + `State:` + valueToStringMesos(this.State) + `,`, + `Resources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "Resource", 1), `&`, ``, 1) + `,`, + `Statuses:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Statuses), "TaskStatus", "TaskStatus", 1), `&`, ``, 1) + `,`, + `StatusUpdateState:` + valueToStringMesos(this.StatusUpdateState) + `,`, + `StatusUpdateUUID:` + valueToStringMesos(this.StatusUpdateUUID) + `,`, + `Labels:` + strings.Replace(fmt.Sprintf("%v", this.Labels), "Labels", "Labels", 1) + `,`, + `Discovery:` + strings.Replace(fmt.Sprintf("%v", this.Discovery), "DiscoveryInfo", "DiscoveryInfo", 1) + `,`, + `Container:` + strings.Replace(fmt.Sprintf("%v", this.Container), "ContainerInfo", "ContainerInfo", 1) + `,`, + `User:` + valueToStringMesos(this.User) + `,`, + `}`, + }, "") + return s +} +func (this *TaskResourceLimitation) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TaskResourceLimitation{`, + `Resources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "Resource", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *UUID) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&UUID{`, + `Value:` + valueToStringMesos(this.Value) + `,`, + `}`, + }, "") + return s +} +func (this *Operation) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Operation{`, + `FrameworkID:` + strings.Replace(fmt.Sprintf("%v", this.FrameworkID), "FrameworkID", "FrameworkID", 1) + `,`, + `AgentID:` + strings.Replace(fmt.Sprintf("%v", this.AgentID), "AgentID", "AgentID", 1) + `,`, + `Info:` + strings.Replace(strings.Replace(this.Info.String(), "Offer_Operation", "Offer_Operation", 1), `&`, ``, 1) + `,`, + `LatestStatus:` + strings.Replace(strings.Replace(this.LatestStatus.String(), "OperationStatus", "OperationStatus", 1), `&`, ``, 1) + `,`, + `Statuses:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Statuses), "OperationStatus", "OperationStatus", 1), `&`, ``, 1) + `,`, + `UUID:` + strings.Replace(strings.Replace(this.UUID.String(), "UUID", "UUID", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *OperationStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&OperationStatus{`, + `OperationID:` + strings.Replace(fmt.Sprintf("%v", this.OperationID), "OperationID", "OperationID", 1) + `,`, + `State:` + fmt.Sprintf("%v", this.State) + `,`, + `Message:` + valueToStringMesos(this.Message) + `,`, + `ConvertedResources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.ConvertedResources), "Resource", "Resource", 1), `&`, ``, 1) + `,`, + `UUID:` + strings.Replace(fmt.Sprintf("%v", this.UUID), "UUID", "UUID", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CheckStatusInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CheckStatusInfo{`, + `Type:` + valueToStringMesos(this.Type) + `,`, + `Command:` + strings.Replace(fmt.Sprintf("%v", this.Command), "CheckStatusInfo_Command", "CheckStatusInfo_Command", 1) + `,`, + `HTTP:` + strings.Replace(fmt.Sprintf("%v", this.HTTP), "CheckStatusInfo_Http", "CheckStatusInfo_Http", 1) + `,`, + `TCP:` + strings.Replace(fmt.Sprintf("%v", this.TCP), "CheckStatusInfo_Tcp", "CheckStatusInfo_Tcp", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CheckStatusInfo_Command) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CheckStatusInfo_Command{`, + `ExitCode:` + valueToStringMesos(this.ExitCode) + `,`, + `}`, + }, "") + return s +} +func (this *CheckStatusInfo_Http) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CheckStatusInfo_Http{`, + `StatusCode:` + valueToStringMesos(this.StatusCode) + `,`, + `}`, + }, "") + return s +} +func (this *CheckStatusInfo_Tcp) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CheckStatusInfo_Tcp{`, + `Succeeded:` + valueToStringMesos(this.Succeeded) + `,`, + `}`, + }, "") + return s +} +func (this *TaskStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TaskStatus{`, + `TaskID:` + strings.Replace(strings.Replace(this.TaskID.String(), "TaskID", "TaskID", 1), `&`, ``, 1) + `,`, + `State:` + valueToStringMesos(this.State) + `,`, + `Data:` + valueToStringMesos(this.Data) + `,`, + `Message:` + valueToStringMesos(this.Message) + `,`, + `AgentID:` + strings.Replace(fmt.Sprintf("%v", this.AgentID), "AgentID", "AgentID", 1) + `,`, + `Timestamp:` + valueToStringMesos(this.Timestamp) + `,`, + `ExecutorID:` + strings.Replace(fmt.Sprintf("%v", this.ExecutorID), "ExecutorID", "ExecutorID", 1) + `,`, + `Healthy:` + valueToStringMesos(this.Healthy) + `,`, + `Source:` + valueToStringMesos(this.Source) + `,`, + `Reason:` + valueToStringMesos(this.Reason) + `,`, + `UUID:` + valueToStringMesos(this.UUID) + `,`, + `Labels:` + strings.Replace(fmt.Sprintf("%v", this.Labels), "Labels", "Labels", 1) + `,`, + `ContainerStatus:` + strings.Replace(fmt.Sprintf("%v", this.ContainerStatus), "ContainerStatus", "ContainerStatus", 1) + `,`, + `UnreachableTime:` + strings.Replace(fmt.Sprintf("%v", this.UnreachableTime), "TimeInfo", "TimeInfo", 1) + `,`, + `CheckStatus:` + strings.Replace(fmt.Sprintf("%v", this.CheckStatus), "CheckStatusInfo", "CheckStatusInfo", 1) + `,`, + `Limitation:` + strings.Replace(fmt.Sprintf("%v", this.Limitation), "TaskResourceLimitation", "TaskResourceLimitation", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Filters) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Filters{`, + `RefuseSeconds:` + valueToStringMesos(this.RefuseSeconds) + `,`, + `}`, + }, "") + return s +} +func (this *Environment) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Environment{`, + `Variables:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Variables), "Environment_Variable", "Environment_Variable", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Environment_Variable) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Environment_Variable{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Value:` + valueToStringMesos(this.Value) + `,`, + `Type:` + valueToStringMesos(this.Type) + `,`, + `Secret:` + strings.Replace(fmt.Sprintf("%v", this.Secret), "Secret", "Secret", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Parameter) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Parameter{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Value:` + fmt.Sprintf("%v", this.Value) + `,`, + `}`, + }, "") + return s +} +func (this *Parameters) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Parameters{`, + `Parameter:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Parameter), "Parameter", "Parameter", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Credential) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Credential{`, + `Principal:` + fmt.Sprintf("%v", this.Principal) + `,`, + `Secret:` + valueToStringMesos(this.Secret) + `,`, + `}`, + }, "") + return s +} +func (this *Credentials) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Credentials{`, + `Credentials:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Credentials), "Credential", "Credential", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Secret) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Secret{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Reference:` + strings.Replace(fmt.Sprintf("%v", this.Reference), "Secret_Reference", "Secret_Reference", 1) + `,`, + `Value:` + strings.Replace(fmt.Sprintf("%v", this.Value), "Secret_Value", "Secret_Value", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Secret_Reference) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Secret_Reference{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Key:` + valueToStringMesos(this.Key) + `,`, + `}`, + }, "") + return s +} +func (this *Secret_Value) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Secret_Value{`, + `Data:` + valueToStringMesos(this.Data) + `,`, + `}`, + }, "") + return s +} +func (this *RateLimit) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RateLimit{`, + `QPS:` + valueToStringMesos(this.QPS) + `,`, + `Principal:` + fmt.Sprintf("%v", this.Principal) + `,`, + `Capacity:` + valueToStringMesos(this.Capacity) + `,`, + `}`, + }, "") + return s +} +func (this *RateLimits) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RateLimits{`, + `Limits:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Limits), "RateLimit", "RateLimit", 1), `&`, ``, 1) + `,`, + `AggregateDefaultQPS:` + valueToStringMesos(this.AggregateDefaultQPS) + `,`, + `AggregateDefaultCapacity:` + valueToStringMesos(this.AggregateDefaultCapacity) + `,`, + `}`, + }, "") + return s +} +func (this *Image) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Image{`, + `Type:` + valueToStringMesos(this.Type) + `,`, + `Appc:` + strings.Replace(fmt.Sprintf("%v", this.Appc), "Image_Appc", "Image_Appc", 1) + `,`, + `Docker:` + strings.Replace(fmt.Sprintf("%v", this.Docker), "Image_Docker", "Image_Docker", 1) + `,`, + `Cached:` + valueToStringMesos(this.Cached) + `,`, + `}`, + }, "") + return s +} +func (this *Image_Appc) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Image_Appc{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `ID:` + valueToStringMesos(this.ID) + `,`, + `Labels:` + strings.Replace(fmt.Sprintf("%v", this.Labels), "Labels", "Labels", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Image_Docker) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Image_Docker{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Credential:` + strings.Replace(fmt.Sprintf("%v", this.Credential), "Credential", "Credential", 1) + `,`, + `Config:` + strings.Replace(fmt.Sprintf("%v", this.Config), "Secret", "Secret", 1) + `,`, + `}`, + }, "") + return s +} +func (this *MountPropagation) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&MountPropagation{`, + `Mode:` + valueToStringMesos(this.Mode) + `,`, + `}`, + }, "") + return s +} +func (this *Volume) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Volume{`, + `ContainerPath:` + fmt.Sprintf("%v", this.ContainerPath) + `,`, + `HostPath:` + valueToStringMesos(this.HostPath) + `,`, + `Mode:` + valueToStringMesos(this.Mode) + `,`, + `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "Image", "Image", 1) + `,`, + `Source:` + strings.Replace(fmt.Sprintf("%v", this.Source), "Volume_Source", "Volume_Source", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Volume_Source) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Volume_Source{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `DockerVolume:` + strings.Replace(fmt.Sprintf("%v", this.DockerVolume), "Volume_Source_DockerVolume", "Volume_Source_DockerVolume", 1) + `,`, + `SandboxPath:` + strings.Replace(fmt.Sprintf("%v", this.SandboxPath), "Volume_Source_SandboxPath", "Volume_Source_SandboxPath", 1) + `,`, + `Secret:` + strings.Replace(fmt.Sprintf("%v", this.Secret), "Secret", "Secret", 1) + `,`, + `HostPath:` + strings.Replace(fmt.Sprintf("%v", this.HostPath), "Volume_Source_HostPath", "Volume_Source_HostPath", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Volume_Source_DockerVolume) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Volume_Source_DockerVolume{`, + `Driver:` + valueToStringMesos(this.Driver) + `,`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `DriverOptions:` + strings.Replace(fmt.Sprintf("%v", this.DriverOptions), "Parameters", "Parameters", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Volume_Source_HostPath) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Volume_Source_HostPath{`, + `Path:` + fmt.Sprintf("%v", this.Path) + `,`, + `MountPropagation:` + strings.Replace(fmt.Sprintf("%v", this.MountPropagation), "MountPropagation", "MountPropagation", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Volume_Source_SandboxPath) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Volume_Source_SandboxPath{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Path:` + fmt.Sprintf("%v", this.Path) + `,`, + `}`, + }, "") + return s +} +func (this *NetworkInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NetworkInfo{`, + `Groups:` + fmt.Sprintf("%v", this.Groups) + `,`, + `Labels:` + strings.Replace(fmt.Sprintf("%v", this.Labels), "Labels", "Labels", 1) + `,`, + `IPAddresses:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.IPAddresses), "NetworkInfo_IPAddress", "NetworkInfo_IPAddress", 1), `&`, ``, 1) + `,`, + `Name:` + valueToStringMesos(this.Name) + `,`, + `PortMappings:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.PortMappings), "NetworkInfo_PortMapping", "NetworkInfo_PortMapping", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *NetworkInfo_IPAddress) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NetworkInfo_IPAddress{`, + `Protocol:` + valueToStringMesos(this.Protocol) + `,`, + `IPAddress:` + valueToStringMesos(this.IPAddress) + `,`, + `}`, + }, "") + return s +} +func (this *NetworkInfo_PortMapping) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&NetworkInfo_PortMapping{`, + `HostPort:` + fmt.Sprintf("%v", this.HostPort) + `,`, + `ContainerPort:` + fmt.Sprintf("%v", this.ContainerPort) + `,`, + `Protocol:` + valueToStringMesos(this.Protocol) + `,`, + `}`, + }, "") + return s +} +func (this *CapabilityInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CapabilityInfo{`, + `Capabilities:` + fmt.Sprintf("%v", this.Capabilities) + `,`, + `}`, + }, "") + return s +} +func (this *LinuxInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&LinuxInfo{`, + `CapabilityInfo:` + strings.Replace(fmt.Sprintf("%v", this.CapabilityInfo), "CapabilityInfo", "CapabilityInfo", 1) + `,`, + `BoundingCapabilities:` + strings.Replace(fmt.Sprintf("%v", this.BoundingCapabilities), "CapabilityInfo", "CapabilityInfo", 1) + `,`, + `EffectiveCapabilities:` + strings.Replace(fmt.Sprintf("%v", this.EffectiveCapabilities), "CapabilityInfo", "CapabilityInfo", 1) + `,`, + `SharePIDNamespace:` + valueToStringMesos(this.SharePIDNamespace) + `,`, + `}`, + }, "") + return s +} +func (this *RLimitInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RLimitInfo{`, + `Rlimits:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Rlimits), "RLimitInfo_RLimit", "RLimitInfo_RLimit", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *RLimitInfo_RLimit) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&RLimitInfo_RLimit{`, + `Type:` + fmt.Sprintf("%v", this.Type) + `,`, + `Hard:` + valueToStringMesos(this.Hard) + `,`, + `Soft:` + valueToStringMesos(this.Soft) + `,`, + `}`, + }, "") + return s +} +func (this *TTYInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TTYInfo{`, + `WindowSize:` + strings.Replace(fmt.Sprintf("%v", this.WindowSize), "TTYInfo_WindowSize", "TTYInfo_WindowSize", 1) + `,`, + `}`, + }, "") + return s +} +func (this *TTYInfo_WindowSize) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&TTYInfo_WindowSize{`, + `Rows:` + fmt.Sprintf("%v", this.Rows) + `,`, + `Columns:` + fmt.Sprintf("%v", this.Columns) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainerInfo{`, + `Type:` + valueToStringMesos(this.Type) + `,`, + `Volumes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Volumes), "Volume", "Volume", 1), `&`, ``, 1) + `,`, + `Docker:` + strings.Replace(fmt.Sprintf("%v", this.Docker), "ContainerInfo_DockerInfo", "ContainerInfo_DockerInfo", 1) + `,`, + `Hostname:` + valueToStringMesos(this.Hostname) + `,`, + `Mesos:` + strings.Replace(fmt.Sprintf("%v", this.Mesos), "ContainerInfo_MesosInfo", "ContainerInfo_MesosInfo", 1) + `,`, + `NetworkInfos:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.NetworkInfos), "NetworkInfo", "NetworkInfo", 1), `&`, ``, 1) + `,`, + `LinuxInfo:` + strings.Replace(fmt.Sprintf("%v", this.LinuxInfo), "LinuxInfo", "LinuxInfo", 1) + `,`, + `RlimitInfo:` + strings.Replace(fmt.Sprintf("%v", this.RlimitInfo), "RLimitInfo", "RLimitInfo", 1) + `,`, + `TTYInfo:` + strings.Replace(fmt.Sprintf("%v", this.TTYInfo), "TTYInfo", "TTYInfo", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerInfo_DockerInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainerInfo_DockerInfo{`, + `Image:` + fmt.Sprintf("%v", this.Image) + `,`, + `Network:` + valueToStringMesos(this.Network) + `,`, + `PortMappings:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.PortMappings), "ContainerInfo_DockerInfo_PortMapping", "ContainerInfo_DockerInfo_PortMapping", 1), `&`, ``, 1) + `,`, + `Privileged:` + valueToStringMesos(this.Privileged) + `,`, + `Parameters:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Parameters), "Parameter", "Parameter", 1), `&`, ``, 1) + `,`, + `ForcePullImage:` + valueToStringMesos(this.ForcePullImage) + `,`, + `VolumeDriver:` + valueToStringMesos(this.VolumeDriver) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerInfo_DockerInfo_PortMapping) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainerInfo_DockerInfo_PortMapping{`, + `HostPort:` + fmt.Sprintf("%v", this.HostPort) + `,`, + `ContainerPort:` + fmt.Sprintf("%v", this.ContainerPort) + `,`, + `Protocol:` + valueToStringMesos(this.Protocol) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerInfo_MesosInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainerInfo_MesosInfo{`, + `Image:` + strings.Replace(fmt.Sprintf("%v", this.Image), "Image", "Image", 1) + `,`, + `}`, + }, "") + return s +} +func (this *ContainerStatus) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&ContainerStatus{`, + `NetworkInfos:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.NetworkInfos), "NetworkInfo", "NetworkInfo", 1), `&`, ``, 1) + `,`, + `CgroupInfo:` + strings.Replace(fmt.Sprintf("%v", this.CgroupInfo), "CgroupInfo", "CgroupInfo", 1) + `,`, + `ExecutorPID:` + valueToStringMesos(this.ExecutorPID) + `,`, + `ContainerID:` + strings.Replace(fmt.Sprintf("%v", this.ContainerID), "ContainerID", "ContainerID", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CgroupInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CgroupInfo{`, + `NetCLS:` + strings.Replace(fmt.Sprintf("%v", this.NetCLS), "CgroupInfo_NetCls", "CgroupInfo_NetCls", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CgroupInfo_Blkio) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CgroupInfo_Blkio{`, + `}`, + }, "") + return s +} +func (this *CgroupInfo_Blkio_Value) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CgroupInfo_Blkio_Value{`, + `Op:` + valueToStringMesos(this.Op) + `,`, + `Value:` + valueToStringMesos(this.Value) + `,`, + `}`, + }, "") + return s +} +func (this *CgroupInfo_Blkio_CFQ) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CgroupInfo_Blkio_CFQ{`, + `}`, + }, "") + return s +} +func (this *CgroupInfo_Blkio_CFQ_Statistics) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CgroupInfo_Blkio_CFQ_Statistics{`, + `Device:` + strings.Replace(fmt.Sprintf("%v", this.Device), "Device_Number", "Device_Number", 1) + `,`, + `Sectors:` + valueToStringMesos(this.Sectors) + `,`, + `Time:` + valueToStringMesos(this.Time) + `,`, + `IOServiced:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.IOServiced), "CgroupInfo_Blkio_Value", "CgroupInfo_Blkio_Value", 1), `&`, ``, 1) + `,`, + `IOServiceBytes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.IOServiceBytes), "CgroupInfo_Blkio_Value", "CgroupInfo_Blkio_Value", 1), `&`, ``, 1) + `,`, + `IOServiceTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.IOServiceTime), "CgroupInfo_Blkio_Value", "CgroupInfo_Blkio_Value", 1), `&`, ``, 1) + `,`, + `IOWaitTime:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.IOWaitTime), "CgroupInfo_Blkio_Value", "CgroupInfo_Blkio_Value", 1), `&`, ``, 1) + `,`, + `IOMerged:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.IOMerged), "CgroupInfo_Blkio_Value", "CgroupInfo_Blkio_Value", 1), `&`, ``, 1) + `,`, + `IOQueued:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.IOQueued), "CgroupInfo_Blkio_Value", "CgroupInfo_Blkio_Value", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *CgroupInfo_Blkio_Throttling) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CgroupInfo_Blkio_Throttling{`, + `}`, + }, "") + return s +} +func (this *CgroupInfo_Blkio_Throttling_Statistics) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CgroupInfo_Blkio_Throttling_Statistics{`, + `Device:` + strings.Replace(fmt.Sprintf("%v", this.Device), "Device_Number", "Device_Number", 1) + `,`, + `IOServiced:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.IOServiced), "CgroupInfo_Blkio_Value", "CgroupInfo_Blkio_Value", 1), `&`, ``, 1) + `,`, + `IOServiceBytes:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.IOServiceBytes), "CgroupInfo_Blkio_Value", "CgroupInfo_Blkio_Value", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *CgroupInfo_Blkio_Statistics) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CgroupInfo_Blkio_Statistics{`, + `CFQ:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.CFQ), "CgroupInfo_Blkio_CFQ_Statistics", "CgroupInfo_Blkio_CFQ_Statistics", 1), `&`, ``, 1) + `,`, + `CFQRecursive:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.CFQRecursive), "CgroupInfo_Blkio_CFQ_Statistics", "CgroupInfo_Blkio_CFQ_Statistics", 1), `&`, ``, 1) + `,`, + `Throttling:` + strings.Replace(fmt.Sprintf("%v", this.Throttling), "CgroupInfo_Blkio_Throttling_Statistics", "CgroupInfo_Blkio_Throttling_Statistics", 1) + `,`, + `}`, + }, "") + return s +} +func (this *CgroupInfo_NetCls) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&CgroupInfo_NetCls{`, + `ClassID:` + valueToStringMesos(this.ClassID) + `,`, + `}`, + }, "") + return s +} +func (this *Labels) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Labels{`, + `Labels:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Labels), "Label", "Label", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Label) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Label{`, + `Key:` + fmt.Sprintf("%v", this.Key) + `,`, + `Value:` + valueToStringMesos(this.Value) + `,`, + `}`, + }, "") + return s +} +func (this *Port) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Port{`, + `Number:` + fmt.Sprintf("%v", this.Number) + `,`, + `Name:` + valueToStringMesos(this.Name) + `,`, + `Protocol:` + valueToStringMesos(this.Protocol) + `,`, + `Visibility:` + valueToStringMesos(this.Visibility) + `,`, + `Labels:` + strings.Replace(fmt.Sprintf("%v", this.Labels), "Labels", "Labels", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Ports) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Ports{`, + `Ports:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Ports), "Port", "Port", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *DiscoveryInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DiscoveryInfo{`, + `Visibility:` + fmt.Sprintf("%v", this.Visibility) + `,`, + `Name:` + valueToStringMesos(this.Name) + `,`, + `Environment:` + valueToStringMesos(this.Environment) + `,`, + `Location:` + valueToStringMesos(this.Location) + `,`, + `Version:` + valueToStringMesos(this.Version) + `,`, + `Ports:` + strings.Replace(fmt.Sprintf("%v", this.Ports), "Ports", "Ports", 1) + `,`, + `Labels:` + strings.Replace(fmt.Sprintf("%v", this.Labels), "Labels", "Labels", 1) + `,`, + `}`, + }, "") + return s +} +func (this *WeightInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&WeightInfo{`, + `Weight:` + fmt.Sprintf("%v", this.Weight) + `,`, + `Role:` + valueToStringMesos(this.Role) + `,`, + `}`, + }, "") + return s +} +func (this *VersionInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&VersionInfo{`, + `Version:` + fmt.Sprintf("%v", this.Version) + `,`, + `BuildDate:` + valueToStringMesos(this.BuildDate) + `,`, + `BuildTime:` + valueToStringMesos(this.BuildTime) + `,`, + `BuildUser:` + valueToStringMesos(this.BuildUser) + `,`, + `GitSHA:` + valueToStringMesos(this.GitSHA) + `,`, + `GitBranch:` + valueToStringMesos(this.GitBranch) + `,`, + `GitTag:` + valueToStringMesos(this.GitTag) + `,`, + `}`, + }, "") + return s +} +func (this *Flag) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Flag{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Value:` + valueToStringMesos(this.Value) + `,`, + `}`, + }, "") + return s +} +func (this *Role) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Role{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Weight:` + fmt.Sprintf("%v", this.Weight) + `,`, + `Frameworks:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Frameworks), "FrameworkID", "FrameworkID", 1), `&`, ``, 1) + `,`, + `Resources:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.Resources), "Resource", "Resource", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *Metric) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Metric{`, + `Name:` + fmt.Sprintf("%v", this.Name) + `,`, + `Value:` + valueToStringMesos(this.Value) + `,`, + `}`, + }, "") + return s +} +func (this *FileInfo) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&FileInfo{`, + `Path:` + fmt.Sprintf("%v", this.Path) + `,`, + `Nlink:` + valueToStringMesos(this.Nlink) + `,`, + `Size:` + valueToStringMesos(this.Size) + `,`, + `Mtime:` + strings.Replace(fmt.Sprintf("%v", this.Mtime), "TimeInfo", "TimeInfo", 1) + `,`, + `Mode:` + valueToStringMesos(this.Mode) + `,`, + `UID:` + valueToStringMesos(this.UID) + `,`, + `GID:` + valueToStringMesos(this.GID) + `,`, + `}`, + }, "") + return s +} +func (this *Device) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Device{`, + `Path:` + valueToStringMesos(this.Path) + `,`, + `Number:` + strings.Replace(fmt.Sprintf("%v", this.Number), "Device_Number", "Device_Number", 1) + `,`, + `}`, + }, "") + return s +} +func (this *Device_Number) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&Device_Number{`, + `MajorNumber:` + valueToStringMesos(this.MajorNumber) + `,`, + `MinorNumber:` + valueToStringMesos(this.MinorNumber) + `,`, + `}`, + }, "") + return s +} +func (this *DeviceAccess) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeviceAccess{`, + `Device:` + strings.Replace(strings.Replace(this.Device.String(), "Device", "Device", 1), `&`, ``, 1) + `,`, + `Access:` + strings.Replace(strings.Replace(this.Access.String(), "DeviceAccess_Access", "DeviceAccess_Access", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func (this *DeviceAccess_Access) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeviceAccess_Access{`, + `Read:` + valueToStringMesos(this.Read) + `,`, + `Write:` + valueToStringMesos(this.Write) + `,`, + `Mknod:` + valueToStringMesos(this.Mknod) + `,`, + `}`, + }, "") + return s +} +func (this *DeviceWhitelist) String() string { + if this == nil { + return "nil" + } + s := strings.Join([]string{`&DeviceWhitelist{`, + `AllowedDevices:` + strings.Replace(strings.Replace(fmt.Sprintf("%v", this.AllowedDevices), "DeviceAccess", "DeviceAccess", 1), `&`, ``, 1) + `,`, + `}`, + }, "") + return s +} +func valueToStringMesos(v interface{}) string { + rv := reflect.ValueOf(v) + if rv.IsNil() { + return "nil" + } + pv := reflect.Indirect(rv).Interface() + return fmt.Sprintf("*%v", pv) +} +func (m *FrameworkID) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FrameworkID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FrameworkID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OfferID) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OfferID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OfferID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AgentID) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AgentID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AgentID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TaskID) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TaskID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TaskID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExecutorID) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExecutorID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecutorID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerID) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Parent", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Parent == nil { + m.Parent = &ContainerID{} + } + if err := m.Parent.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceProviderID) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceProviderID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceProviderID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OperationID) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OperationID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OperationID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TimeInfo) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TimeInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TimeInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nanoseconds", wireType) + } + m.Nanoseconds = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nanoseconds |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("nanoseconds") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DurationInfo) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DurationInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DurationInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nanoseconds", wireType) + } + m.Nanoseconds = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Nanoseconds |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("nanoseconds") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Address) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Address: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Address: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Hostname = &s + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IP", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.IP = &s + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + m.Port = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Port |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("port") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *URL) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: URL: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: URL: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scheme", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Scheme = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Path = &s + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Query", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Query = append(m.Query, Parameter{}) + if err := m.Query[len(m.Query)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Fragment", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Fragment = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("scheme") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("address") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Unavailability) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Unavailability: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Unavailability: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Start", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Start.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Duration == nil { + m.Duration = &DurationInfo{} + } + if err := m.Duration.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("start") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MachineID) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MachineID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MachineID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Hostname = &s + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IP", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.IP = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MachineInfo) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MachineInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MachineInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) + } + var v MachineInfo_Mode + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (MachineInfo_Mode(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Mode = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Unavailability", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Unavailability == nil { + m.Unavailability = &Unavailability{} + } + if err := m.Unavailability.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FrameworkInfo) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FrameworkInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FrameworkInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.User = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ID == nil { + m.ID = &FrameworkID{} + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field FailoverTimeout", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.FailoverTimeout = &v2 + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Checkpoint", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Checkpoint = &b + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Role = &s + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Hostname = &s + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Principal", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Principal = &s + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WebUiURL", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.WebUiURL = &s + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Capabilities", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Capabilities = append(m.Capabilities, FrameworkInfo_Capability{}) + if err := m.Capabilities[len(m.Capabilities)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Labels == nil { + m.Labels = &Labels{} + } + if err := m.Labels.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Roles", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Roles = append(m.Roles, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("user") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FrameworkInfo_Capability) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Capability: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Capability: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (FrameworkInfo_Capability_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CheckInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CheckInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CheckInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (CheckInfo_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Command == nil { + m.Command = &CheckInfo_Command{} + } + if err := m.Command.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HTTP", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.HTTP == nil { + m.HTTP = &CheckInfo_Http{} + } + if err := m.HTTP.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field DelaySeconds", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.DelaySeconds = &v2 + case 5: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field IntervalSeconds", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.IntervalSeconds = &v2 + case 6: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.TimeoutSeconds = &v2 + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TCP", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TCP == nil { + m.TCP = &CheckInfo_Tcp{} + } + if err := m.TCP.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CheckInfo_Command) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Command: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Command: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Command.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("command") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CheckInfo_Http) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Http: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Http: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + m.Port = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Port |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Path = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("port") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CheckInfo_Tcp) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Tcp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Tcp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + m.Port = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Port |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("port") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HealthCheck) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HealthCheck: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HealthCheck: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HTTP", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.HTTP == nil { + m.HTTP = &HealthCheck_HTTPCheckInfo{} + } + if err := m.HTTP.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field DelaySeconds", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.DelaySeconds = &v2 + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field IntervalSeconds", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.IntervalSeconds = &v2 + case 4: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field TimeoutSeconds", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.TimeoutSeconds = &v2 + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ConsecutiveFailures", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ConsecutiveFailures = &v + case 6: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field GracePeriodSeconds", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.GracePeriodSeconds = &v2 + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Command == nil { + m.Command = &CommandInfo{} + } + if err := m.Command.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (HealthCheck_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TCP", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TCP == nil { + m.TCP = &HealthCheck_TCPCheckInfo{} + } + if err := m.TCP.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HealthCheck_HTTPCheckInfo) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HTTPCheckInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HTTPCheckInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + m.Port = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Port |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Path = &s + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scheme", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Scheme = &s + iNdEx = postIndex + case 4: + if wireType == 0 { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Statuses = append(m.Statuses, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Statuses = append(m.Statuses, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Statuses", wireType) + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) + } + var v NetworkInfo_Protocol + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (NetworkInfo_Protocol(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Protocol = &v + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("port") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *HealthCheck_TCPCheckInfo) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TCPCheckInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TCPCheckInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + m.Port = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Port |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) + } + var v NetworkInfo_Protocol + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (NetworkInfo_Protocol(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Protocol = &v + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("port") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *KillPolicy) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: KillPolicy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KillPolicy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GracePeriod", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.GracePeriod == nil { + m.GracePeriod = &DurationInfo{} + } + if err := m.GracePeriod.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CommandInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CommandInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CommandInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field URIs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.URIs = append(m.URIs, CommandInfo_URI{}) + if err := m.URIs[len(m.URIs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Environment", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Environment == nil { + m.Environment = &Environment{} + } + if err := m.Environment.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Value = &s + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.User = &s + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Shell", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Shell = &b + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Arguments", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Arguments = append(m.Arguments, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CommandInfo_URI) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: URI: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: URI: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Executable", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Executable = &b + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Extract", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Extract = &b + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Cache", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Cache = &b + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OutputFile", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.OutputFile = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExecutorInfo) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExecutorInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExecutorInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutorID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ExecutorID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Command == nil { + m.Command = &CommandInfo{} + } + if err := m.Command.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FrameworkID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FrameworkID == nil { + m.FrameworkID = &FrameworkID{} + } + if err := m.FrameworkID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Name = &s + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Source = &s + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Container == nil { + m.Container = &ContainerInfo{} + } + if err := m.Container.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Discovery", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Discovery == nil { + m.Discovery = &DiscoveryInfo{} + } + if err := m.Discovery.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShutdownGracePeriod", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ShutdownGracePeriod == nil { + m.ShutdownGracePeriod = &DurationInfo{} + } + if err := m.ShutdownGracePeriod.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Labels == nil { + m.Labels = &Labels{} + } + if err := m.Labels.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (ExecutorInfo_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("executor_id") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DomainInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DomainInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DomainInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FaultDomain", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FaultDomain == nil { + m.FaultDomain = &DomainInfo_FaultDomain{} + } + if err := m.FaultDomain.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DomainInfo_FaultDomain) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FaultDomain: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FaultDomain: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Region", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Region.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Zone", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Zone.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("region") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("zone") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DomainInfo_FaultDomain_RegionInfo) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RegionInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RegionInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DomainInfo_FaultDomain_ZoneInfo) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ZoneInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ZoneInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MasterInfo) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MasterInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MasterInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IP", wireType) + } + m.IP = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.IP |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Port = &v + hasFields[0] |= uint64(0x00000004) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.PID = &s + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Hostname = &s + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Version = &s + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Address == nil { + m.Address = &Address{} + } + if err := m.Address.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Domain", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Domain == nil { + m.Domain = &DomainInfo{} + } + if err := m.Domain.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Capabilities", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Capabilities = append(m.Capabilities, MasterInfo_Capability{}) + if err := m.Capabilities[len(m.Capabilities)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("ip") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("port") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MasterInfo_Capability) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Capability: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Capability: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (MasterInfo_Capability_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AgentInfo) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AgentInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AgentInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hostname = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ID == nil { + m.ID = &AgentID{} + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Port = &v + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Domain", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Domain == nil { + m.Domain = &DomainInfo{} + } + if err := m.Domain.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("hostname") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *AgentInfo_Capability) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Capability: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Capability: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (AgentInfo_Capability_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CSIPluginContainerInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CSIPluginContainerInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CSIPluginContainerInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v CSIPluginContainerInfo_Service + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (CSIPluginContainerInfo_Service(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Services = append(m.Services, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v CSIPluginContainerInfo_Service + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (CSIPluginContainerInfo_Service(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Services = append(m.Services, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Services", wireType) + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Command == nil { + m.Command = &CommandInfo{} + } + if err := m.Command.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Container == nil { + m.Container = &ContainerInfo{} + } + if err := m.Container.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CSIPluginInfo) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CSIPluginInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CSIPluginInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Containers", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Containers = append(m.Containers, CSIPluginContainerInfo{}) + if err := m.Containers[len(m.Containers)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceProviderInfo) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceProviderInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceProviderInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ID == nil { + m.ID = &ResourceProviderID{} + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Type = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultReservations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DefaultReservations = append(m.DefaultReservations, Resource_ReservationInfo{}) + if err := m.DefaultReservations[len(m.DefaultReservations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Storage", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Storage == nil { + m.Storage = &ResourceProviderInfo_Storage{} + } + if err := m.Storage.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceProviderInfo_Storage) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Storage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Storage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Plugin", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Plugin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("plugin") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Value) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Value: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Value: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (Value_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scalar", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Scalar == nil { + m.Scalar = &Value_Scalar{} + } + if err := m.Scalar.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ranges == nil { + m.Ranges = &Value_Ranges{} + } + if err := m.Ranges.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Set", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Set == nil { + m.Set = &Value_Set{} + } + if err := m.Set.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Text", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Text == nil { + m.Text = &Value_Text{} + } + if err := m.Text.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Value_Scalar) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Scalar: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Scalar: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + m.Value = float64(math.Float64frombits(v)) + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Value_Range) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Range: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Range: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Begin", wireType) + } + m.Begin = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Begin |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field End", wireType) + } + m.End = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.End |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000002) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("begin") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("end") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Value_Ranges) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Ranges: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Ranges: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Range", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Range = append(m.Range, Value_Range{}) + if err := m.Range[len(m.Range)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Value_Set) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Set: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Set: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Item", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Item = append(m.Item, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Value_Text) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Text: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Text: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Attribute) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Attribute: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Attribute: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (Value_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scalar", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Scalar == nil { + m.Scalar = &Value_Scalar{} + } + if err := m.Scalar.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ranges == nil { + m.Ranges = &Value_Ranges{} + } + if err := m.Ranges.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Text", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Text == nil { + m.Text = &Value_Text{} + } + if err := m.Text.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Set", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Set == nil { + m.Set = &Value_Set{} + } + if err := m.Set.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Resource) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Resource: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Resource: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var v Value_Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (Value_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &v + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scalar", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Scalar == nil { + m.Scalar = &Value_Scalar{} + } + if err := m.Scalar.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ranges", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ranges == nil { + m.Ranges = &Value_Ranges{} + } + if err := m.Ranges.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Set", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Set == nil { + m.Set = &Value_Set{} + } + if err := m.Set.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Role = &s + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Disk", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Disk == nil { + m.Disk = &Resource_DiskInfo{} + } + if err := m.Disk.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reservation", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Reservation == nil { + m.Reservation = &Resource_ReservationInfo{} + } + if err := m.Reservation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Revocable", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Revocable == nil { + m.Revocable = &Resource_RevocableInfo{} + } + if err := m.Revocable.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Shared", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Shared == nil { + m.Shared = &Resource_SharedInfo{} + } + if err := m.Shared.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllocationInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AllocationInfo == nil { + m.AllocationInfo = &Resource_AllocationInfo{} + } + if err := m.AllocationInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProviderID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ProviderID == nil { + m.ProviderID = &ResourceProviderID{} + } + if err := m.ProviderID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reservations", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Reservations = append(m.Reservations, Resource_ReservationInfo{}) + if err := m.Reservations[len(m.Reservations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Resource_AllocationInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: AllocationInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AllocationInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Role = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Resource_ReservationInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReservationInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReservationInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Principal", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Principal = &s + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Labels == nil { + m.Labels = &Labels{} + } + if err := m.Labels.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Role = &s + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var v Resource_ReservationInfo_Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (Resource_ReservationInfo_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &v + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Resource_DiskInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DiskInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DiskInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Persistence", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Persistence == nil { + m.Persistence = &Resource_DiskInfo_Persistence{} + } + if err := m.Persistence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Volume", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Volume == nil { + m.Volume = &Volume{} + } + if err := m.Volume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Source == nil { + m.Source = &Resource_DiskInfo_Source{} + } + if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Resource_DiskInfo_Persistence) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Persistence: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Persistence: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Principal", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Principal = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Resource_DiskInfo_Source) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Source: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Source: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (Resource_DiskInfo_Source_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Path == nil { + m.Path = &Resource_DiskInfo_Source_Path{} + } + if err := m.Path.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mount", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Mount == nil { + m.Mount = &Resource_DiskInfo_Source_Mount{} + } + if err := m.Mount.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.ID = &s + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &Labels{} + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Profile", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Profile = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Resource_DiskInfo_Source_Path) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Path: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Path: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Root", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Root = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Resource_DiskInfo_Source_Mount) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Mount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Mount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Root", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Root = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Resource_RevocableInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RevocableInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RevocableInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Resource_SharedInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SharedInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SharedInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TrafficControlStatistics) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TrafficControlStatistics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TrafficControlStatistics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Backlog", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Backlog = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Bytes = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Drops", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Drops = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Overlimits", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Overlimits = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Packets", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Packets = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Qlen", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Qlen = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RateBPS", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.RateBPS = &v + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RatePPS", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.RatePPS = &v + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Requeues", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Requeues = &v + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IpStatistics) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IpStatistics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IpStatistics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Forwarding", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Forwarding = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DefaultTTL", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DefaultTTL = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InReceives", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InReceives = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InHdrErrors", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InHdrErrors = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InAddrErrors", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InAddrErrors = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForwDatagrams", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ForwDatagrams = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InUnknownProtos", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InUnknownProtos = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InDiscards", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InDiscards = &v + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InDelivers", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InDelivers = &v + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutRequests", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.OutRequests = &v + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutDiscards", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.OutDiscards = &v + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutNoRoutes", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.OutNoRoutes = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReasmTimeout", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ReasmTimeout = &v + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReasmReqds", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ReasmReqds = &v + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReasmOKs", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ReasmOKs = &v + case 16: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ReasmFails", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ReasmFails = &v + case 17: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FragOKs", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FragOKs = &v + case 18: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FragFails", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FragFails = &v + case 19: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FragCreates", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.FragCreates = &v + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *IcmpStatistics) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IcmpStatistics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IcmpStatistics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InMsgs", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InMsgs = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InErrors", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InErrors = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InCsumErrors", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InCsumErrors = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InDestUnreachs", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InDestUnreachs = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InTimeExcds", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InTimeExcds = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InParmProbs", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InParmProbs = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InSrcQuenchs", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InSrcQuenchs = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InRedirects", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InRedirects = &v + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InEchos", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InEchos = &v + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InEchoReps", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InEchoReps = &v + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InTimestamps", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InTimestamps = &v + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InTimestampReps", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InTimestampReps = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InAddrMasks", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InAddrMasks = &v + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InAddrMaskReps", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InAddrMaskReps = &v + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutMsgs", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.OutMsgs = &v + case 16: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutErrors", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.OutErrors = &v + case 17: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutDestUnreachs", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.OutDestUnreachs = &v + case 18: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutTimeExcds", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.OutTimeExcds = &v + case 19: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutParmProbs", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.OutParmProbs = &v + case 20: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutSrcQuenchs", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.OutSrcQuenchs = &v + case 21: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutRedirects", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.OutRedirects = &v + case 22: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutEchos", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.OutEchos = &v + case 23: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutEchoReps", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.OutEchoReps = &v + case 24: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutTimestamps", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.OutTimestamps = &v + case 25: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutTimestampReps", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.OutTimestampReps = &v + case 26: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutAddrMasks", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.OutAddrMasks = &v + case 27: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutAddrMaskReps", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.OutAddrMaskReps = &v + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TcpStatistics) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TcpStatistics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TcpStatistics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RtoAlgorithm", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.RtoAlgorithm = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RtoMin", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.RtoMin = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RtoMax", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.RtoMax = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MaxConn", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MaxConn = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ActiveOpens", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ActiveOpens = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PassiveOpens", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.PassiveOpens = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AttemptFails", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.AttemptFails = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EstabResets", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.EstabResets = &v + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrEstab", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.CurrEstab = &v + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InSegs", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InSegs = &v + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutSegs", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.OutSegs = &v + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RetransSegs", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.RetransSegs = &v + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InErrs", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InErrs = &v + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutRsts", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.OutRsts = &v + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InCsumErrors", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InCsumErrors = &v + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UdpStatistics) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UdpStatistics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UdpStatistics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InDatagrams", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InDatagrams = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NoPorts", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NoPorts = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InErrors", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InErrors = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field OutDatagrams", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.OutDatagrams = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RcvbufErrors", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.RcvbufErrors = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SndbufErrors", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.SndbufErrors = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InCsumErrors", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.InCsumErrors = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IgnoredMulti", wireType) + } + var v int64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.IgnoredMulti = &v + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *SNMPStatistics) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SNMPStatistics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SNMPStatistics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IPStats", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.IPStats == nil { + m.IPStats = &IpStatistics{} + } + if err := m.IPStats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ICMPStats", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ICMPStats == nil { + m.ICMPStats = &IcmpStatistics{} + } + if err := m.ICMPStats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TCPStats", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TCPStats == nil { + m.TCPStats = &TcpStatistics{} + } + if err := m.TCPStats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UDPStats", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.UDPStats == nil { + m.UDPStats = &UdpStatistics{} + } + if err := m.UDPStats.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DiskStatistics) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DiskStatistics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DiskStatistics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Source == nil { + m.Source = &Resource_DiskInfo_Source{} + } + if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Persistence", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Persistence == nil { + m.Persistence = &Resource_DiskInfo_Persistence{} + } + if err := m.Persistence.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LimitBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.LimitBytes = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field UsedBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.UsedBytes = &v + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceStatistics) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceStatistics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceStatistics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + m.Timestamp = float64(math.Float64frombits(v)) + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field CPUsUserTimeSecs", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.CPUsUserTimeSecs = &v2 + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field CPUsSystemTimeSecs", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.CPUsSystemTimeSecs = &v2 + case 4: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field CPUsLimit", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.CPUsLimit = &v2 + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemRSSBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemRSSBytes = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemLimitBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemLimitBytes = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CPUsNrPeriods", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.CPUsNrPeriods = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CPUsNrThrottled", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.CPUsNrThrottled = &v + case 9: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field CPUsThrottledTimeSecs", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.CPUsThrottledTimeSecs = &v2 + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemFileBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemFileBytes = &v + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemAnonBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemAnonBytes = &v + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemMappedFileBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemMappedFileBytes = &v + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Perf", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Perf == nil { + m.Perf = &PerfStatistics{} + } + if err := m.Perf.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NetRxPackets", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NetRxPackets = &v + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NetRxBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NetRxBytes = &v + case 16: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NetRxErrors", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NetRxErrors = &v + case 17: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NetRxDropped", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NetRxDropped = &v + case 18: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NetTxPackets", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NetTxPackets = &v + case 19: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NetTxBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NetTxBytes = &v + case 20: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NetTxErrors", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NetTxErrors = &v + case 21: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NetTxDropped", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NetTxDropped = &v + case 22: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NetTCPRttMicrosecsP50", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.NetTCPRttMicrosecsP50 = &v2 + case 23: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NetTCPRttMicrosecsP90", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.NetTCPRttMicrosecsP90 = &v2 + case 24: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NetTCPRttMicrosecsP95", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.NetTCPRttMicrosecsP95 = &v2 + case 25: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NetTCPRttMicrosecsP99", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.NetTCPRttMicrosecsP99 = &v2 + case 26: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DiskLimitBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DiskLimitBytes = &v + case 27: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DiskUsedBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DiskUsedBytes = &v + case 28: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NetTCPActiveConnections", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.NetTCPActiveConnections = &v2 + case 29: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field NetTCPTimeWaitConnections", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.NetTCPTimeWaitConnections = &v2 + case 30: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Processes", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Processes = &v + case 31: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Threads", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Threads = &v + case 32: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemLowPressureCounter", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemLowPressureCounter = &v + case 33: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemMediumPressureCounter", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemMediumPressureCounter = &v + case 34: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemCriticalPressureCounter", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemCriticalPressureCounter = &v + case 35: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetTrafficControlStatistics", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NetTrafficControlStatistics = append(m.NetTrafficControlStatistics, TrafficControlStatistics{}) + if err := m.NetTrafficControlStatistics[len(m.NetTrafficControlStatistics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 36: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemTotalBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemTotalBytes = &v + case 37: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemTotalMemswBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemTotalMemswBytes = &v + case 38: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemSoftLimitBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemSoftLimitBytes = &v + case 39: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemCacheBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemCacheBytes = &v + case 40: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemSwapBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemSwapBytes = &v + case 41: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MemUnevictableBytes", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MemUnevictableBytes = &v + case 42: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetSNMPStatistics", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NetSNMPStatistics == nil { + m.NetSNMPStatistics = &SNMPStatistics{} + } + if err := m.NetSNMPStatistics.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 43: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DiskStatistics", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DiskStatistics = append(m.DiskStatistics, DiskStatistics{}) + if err := m.DiskStatistics[len(m.DiskStatistics)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 44: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BlkioStatistics", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BlkioStatistics == nil { + m.BlkioStatistics = &CgroupInfo_Blkio_Statistics{} + } + if err := m.BlkioStatistics.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("timestamp") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceUsage) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ResourceUsage: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ResourceUsage: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Executors", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Executors = append(m.Executors, ResourceUsage_Executor{}) + if err := m.Executors[len(m.Executors)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Total", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Total = append(m.Total, Resource{}) + if err := m.Total[len(m.Total)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceUsage_Executor) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Executor: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Executor: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutorInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ExecutorInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Allocated", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Allocated = append(m.Allocated, Resource{}) + if err := m.Allocated[len(m.Allocated)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Statistics", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Statistics == nil { + m.Statistics = &ResourceStatistics{} + } + if err := m.Statistics.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ContainerID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tasks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tasks = append(m.Tasks, ResourceUsage_Executor_Task{}) + if err := m.Tasks[len(m.Tasks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("executor_info") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_id") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ResourceUsage_Executor_Task) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Task: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Task: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Labels == nil { + m.Labels = &Labels{} + } + if err := m.Labels.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PerfStatistics) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PerfStatistics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PerfStatistics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + m.Timestamp = float64(math.Float64frombits(v)) + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Duration", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + m.Duration = float64(math.Float64frombits(v)) + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Cycles", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Cycles = &v + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StalledCyclesFrontend", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.StalledCyclesFrontend = &v + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StalledCyclesBackend", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.StalledCyclesBackend = &v + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Instructions", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Instructions = &v + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CacheReferences", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.CacheReferences = &v + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CacheMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.CacheMisses = &v + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Branches", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Branches = &v + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BranchMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.BranchMisses = &v + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BusCycles", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.BusCycles = &v + case 12: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field RefCycles", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.RefCycles = &v + case 13: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field CPUClock", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.CPUClock = &v2 + case 14: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field TaskClock", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.TaskClock = &v2 + case 15: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field PageFaults", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.PageFaults = &v + case 16: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MinorFaults", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MinorFaults = &v + case 17: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MajorFaults", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MajorFaults = &v + case 18: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ContextSwitches", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ContextSwitches = &v + case 19: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field CPUMigrations", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.CPUMigrations = &v + case 20: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AlignmentFaults", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.AlignmentFaults = &v + case 21: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field EmulationFaults", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.EmulationFaults = &v + case 22: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1DcacheLoads", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.L1DcacheLoads = &v + case 23: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1DcacheLoadMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.L1DcacheLoadMisses = &v + case 24: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1DcacheStores", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.L1DcacheStores = &v + case 25: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1DcacheStoreMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.L1DcacheStoreMisses = &v + case 26: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1DcachePrefetches", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.L1DcachePrefetches = &v + case 27: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1DcachePrefetchMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.L1DcachePrefetchMisses = &v + case 28: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1IcacheLoads", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.L1IcacheLoads = &v + case 29: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1IcacheLoadMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.L1IcacheLoadMisses = &v + case 30: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1IcachePrefetches", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.L1IcachePrefetches = &v + case 31: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field L1IcachePrefetchMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.L1IcachePrefetchMisses = &v + case 32: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LLCLoads", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.LLCLoads = &v + case 33: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LLCLoadMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.LLCLoadMisses = &v + case 34: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LLCStores", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.LLCStores = &v + case 35: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LLCStoreMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.LLCStoreMisses = &v + case 36: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LLCPrefetches", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.LLCPrefetches = &v + case 37: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field LLCPrefetchMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.LLCPrefetchMisses = &v + case 38: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DTLBLoads", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DTLBLoads = &v + case 39: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DTLBLoadMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DTLBLoadMisses = &v + case 40: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DTLBStores", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DTLBStores = &v + case 41: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DTLBStoreMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DTLBStoreMisses = &v + case 42: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DTLBPrefetches", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DTLBPrefetches = &v + case 43: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field DTLBPrefetchMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.DTLBPrefetchMisses = &v + case 44: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ITLBLoads", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ITLBLoads = &v + case 45: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ITLBLoadMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ITLBLoadMisses = &v + case 46: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BranchLoads", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.BranchLoads = &v + case 47: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BranchLoadMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.BranchLoadMisses = &v + case 48: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeLoads", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NodeLoads = &v + case 49: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeLoadMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NodeLoadMisses = &v + case 50: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeStores", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NodeStores = &v + case 51: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeStoreMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NodeStoreMisses = &v + case 52: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NodePrefetches", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NodePrefetches = &v + case 53: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NodePrefetchMisses", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.NodePrefetchMisses = &v + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("timestamp") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("duration") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Request) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Request: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Request: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AgentID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AgentID == nil { + m.AgentID = &AgentID{} + } + if err := m.AgentID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Offer) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Offer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Offer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FrameworkID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.FrameworkID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AgentID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AgentID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000004) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hostname = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000008) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutorIDs", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ExecutorIDs = append(m.ExecutorIDs, ExecutorID{}) + if err := m.ExecutorIDs[len(m.ExecutorIDs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Attributes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Attributes = append(m.Attributes, Attribute{}) + if err := m.Attributes[len(m.Attributes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field URL", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.URL == nil { + m.URL = &URL{} + } + if err := m.URL.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Unavailability", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Unavailability == nil { + m.Unavailability = &Unavailability{} + } + if err := m.Unavailability.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllocationInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AllocationInfo == nil { + m.AllocationInfo = &Resource_AllocationInfo{} + } + if err := m.AllocationInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Domain", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Domain == nil { + m.Domain = &DomainInfo{} + } + if err := m.Domain.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_id") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("agent_id") + } + if hasFields[0]&uint64(0x00000008) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("hostname") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Offer_Operation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Operation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Operation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (Offer_Operation_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Launch", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Launch == nil { + m.Launch = &Offer_Operation_Launch{} + } + if err := m.Launch.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reserve", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Reserve == nil { + m.Reserve = &Offer_Operation_Reserve{} + } + if err := m.Reserve.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Unreserve", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Unreserve == nil { + m.Unreserve = &Offer_Operation_Unreserve{} + } + if err := m.Unreserve.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Create", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Create == nil { + m.Create = &Offer_Operation_Create{} + } + if err := m.Create.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Destroy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Destroy == nil { + m.Destroy = &Offer_Operation_Destroy{} + } + if err := m.Destroy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LaunchGroup", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LaunchGroup == nil { + m.LaunchGroup = &Offer_Operation_LaunchGroup{} + } + if err := m.LaunchGroup.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreateVolume", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CreateVolume == nil { + m.CreateVolume = &Offer_Operation_CreateVolume{} + } + if err := m.CreateVolume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestroyVolume", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DestroyVolume == nil { + m.DestroyVolume = &Offer_Operation_DestroyVolume{} + } + if err := m.DestroyVolume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CreateBlock", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CreateBlock == nil { + m.CreateBlock = &Offer_Operation_CreateBlock{} + } + if err := m.CreateBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestroyBlock", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DestroyBlock == nil { + m.DestroyBlock = &Offer_Operation_DestroyBlock{} + } + if err := m.DestroyBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ID == nil { + m.ID = &OperationID{} + } + if err := m.ID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Offer_Operation_Launch) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Launch: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Launch: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TaskInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TaskInfos = append(m.TaskInfos, TaskInfo{}) + if err := m.TaskInfos[len(m.TaskInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Offer_Operation_LaunchGroup) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LaunchGroup: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LaunchGroup: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Executor", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Executor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TaskGroup", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TaskGroup.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("executor") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("task_group") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Offer_Operation_Reserve) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Reserve: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Reserve: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Offer_Operation_Unreserve) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Unreserve: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Unreserve: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Offer_Operation_Create) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Create: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Create: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Volumes = append(m.Volumes, Resource{}) + if err := m.Volumes[len(m.Volumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Offer_Operation_Destroy) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Destroy: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Destroy: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Volumes = append(m.Volumes, Resource{}) + if err := m.Volumes[len(m.Volumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Offer_Operation_CreateVolume) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateVolume: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateVolume: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field TargetType", wireType) + } + m.TargetType = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.TargetType |= (Resource_DiskInfo_Source_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000002) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("source") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("target_type") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Offer_Operation_DestroyVolume) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DestroyVolume: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DestroyVolume: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Volume", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Volume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("volume") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Offer_Operation_CreateBlock) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CreateBlock: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CreateBlock: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("source") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Offer_Operation_DestroyBlock) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DestroyBlock: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DestroyBlock: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("block") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *InverseOffer) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: InverseOffer: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: InverseOffer: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OfferID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.OfferID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field URL", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.URL == nil { + m.URL = &URL{} + } + if err := m.URL.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FrameworkID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.FrameworkID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AgentID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AgentID == nil { + m.AgentID = &AgentID{} + } + if err := m.AgentID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Unavailability", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Unavailability.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000004) + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("id") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_id") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("unavailability") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TaskInfo) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TaskInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TaskInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TaskID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TaskID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AgentID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AgentID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000004) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Executor", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Executor == nil { + m.Executor = &ExecutorInfo{} + } + if err := m.Executor.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Command == nil { + m.Command = &CommandInfo{} + } + if err := m.Command.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HealthCheck", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.HealthCheck == nil { + m.HealthCheck = &HealthCheck{} + } + if err := m.HealthCheck.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Container == nil { + m.Container = &ContainerInfo{} + } + if err := m.Container.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Labels == nil { + m.Labels = &Labels{} + } + if err := m.Labels.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Discovery", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Discovery == nil { + m.Discovery = &DiscoveryInfo{} + } + if err := m.Discovery.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KillPolicy", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.KillPolicy == nil { + m.KillPolicy = &KillPolicy{} + } + if err := m.KillPolicy.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Check", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Check == nil { + m.Check = &CheckInfo{} + } + if err := m.Check.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("task_id") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("agent_id") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TaskGroupInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TaskGroupInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TaskGroupInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Tasks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Tasks = append(m.Tasks, TaskInfo{}) + if err := m.Tasks[len(m.Tasks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Task) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Task: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Task: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TaskID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TaskID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FrameworkID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.FrameworkID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000004) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutorID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ExecutorID == nil { + m.ExecutorID = &ExecutorID{} + } + if err := m.ExecutorID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AgentID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.AgentID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000008) + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var v TaskState + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TaskState(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.State = &v + hasFields[0] |= uint64(0x00000010) + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Statuses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Statuses = append(m.Statuses, TaskStatus{}) + if err := m.Statuses[len(m.Statuses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StatusUpdateState", wireType) + } + var v TaskState + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TaskState(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.StatusUpdateState = &v + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StatusUpdateUUID", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.StatusUpdateUUID = append(m.StatusUpdateUUID[:0], dAtA[iNdEx:postIndex]...) + if m.StatusUpdateUUID == nil { + m.StatusUpdateUUID = []byte{} + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Labels == nil { + m.Labels = &Labels{} + } + if err := m.Labels.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Discovery", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Discovery == nil { + m.Discovery = &DiscoveryInfo{} + } + if err := m.Discovery.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Container", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Container == nil { + m.Container = &ContainerInfo{} + } + if err := m.Container.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field User", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.User = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("task_id") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("framework_id") + } + if hasFields[0]&uint64(0x00000008) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("agent_id") + } + if hasFields[0]&uint64(0x00000010) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("state") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TaskResourceLimitation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TaskResourceLimitation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TaskResourceLimitation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *UUID) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: UUID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: UUID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = append(m.Value[:0], dAtA[iNdEx:postIndex]...) + if m.Value == nil { + m.Value = []byte{} + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Operation) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Operation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Operation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FrameworkID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FrameworkID == nil { + m.FrameworkID = &FrameworkID{} + } + if err := m.FrameworkID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AgentID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AgentID == nil { + m.AgentID = &AgentID{} + } + if err := m.AgentID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Info", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Info.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LatestStatus", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.LatestStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Statuses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Statuses = append(m.Statuses, OperationStatus{}) + if err := m.Statuses[len(m.Statuses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UUID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.UUID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000004) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("info") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("latest_status") + } + if hasFields[0]&uint64(0x00000004) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("uuid") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OperationStatus) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OperationStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OperationStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OperationID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OperationID == nil { + m.OperationID = &OperationID{} + } + if err := m.OperationID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + m.State = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.State |= (OperationState(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Message = &s + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ConvertedResources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ConvertedResources = append(m.ConvertedResources, Resource{}) + if err := m.ConvertedResources[len(m.ConvertedResources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UUID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.UUID == nil { + m.UUID = &UUID{} + } + if err := m.UUID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("state") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CheckStatusInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CheckStatusInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CheckStatusInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var v CheckInfo_Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (CheckInfo_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Command", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Command == nil { + m.Command = &CheckStatusInfo_Command{} + } + if err := m.Command.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HTTP", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.HTTP == nil { + m.HTTP = &CheckStatusInfo_Http{} + } + if err := m.HTTP.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TCP", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TCP == nil { + m.TCP = &CheckStatusInfo_Tcp{} + } + if err := m.TCP.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CheckStatusInfo_Command) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Command: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Command: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExitCode", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ExitCode = &v + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CheckStatusInfo_Http) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Http: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Http: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field StatusCode", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.StatusCode = &v + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CheckStatusInfo_Tcp) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Tcp: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Tcp: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Succeeded", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Succeeded = &b + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TaskStatus) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TaskStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TaskStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TaskID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.TaskID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field State", wireType) + } + var v TaskState + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TaskState(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.State = &v + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Message = &s + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AgentID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.AgentID == nil { + m.AgentID = &AgentID{} + } + if err := m.AgentID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Timestamp", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.Timestamp = &v2 + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutorID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ExecutorID == nil { + m.ExecutorID = &ExecutorID{} + } + if err := m.ExecutorID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Healthy", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Healthy = &b + case 9: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + var v TaskStatus_Source + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TaskStatus_Source(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Source = &v + case 10: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Reason", wireType) + } + var v TaskStatus_Reason + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (TaskStatus_Reason(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Reason = &v + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UUID", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UUID = append(m.UUID[:0], dAtA[iNdEx:postIndex]...) + if m.UUID == nil { + m.UUID = []byte{} + } + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Labels == nil { + m.Labels = &Labels{} + } + if err := m.Labels.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerStatus", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ContainerStatus == nil { + m.ContainerStatus = &ContainerStatus{} + } + if err := m.ContainerStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UnreachableTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.UnreachableTime == nil { + m.UnreachableTime = &TimeInfo{} + } + if err := m.UnreachableTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CheckStatus", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CheckStatus == nil { + m.CheckStatus = &CheckStatusInfo{} + } + if err := m.CheckStatus.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 16: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Limitation", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Limitation == nil { + m.Limitation = &TaskResourceLimitation{} + } + if err := m.Limitation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("task_id") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("state") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Filters) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Filters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Filters: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field RefuseSeconds", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.RefuseSeconds = &v2 + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Environment) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Environment: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Environment: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Variables", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Variables = append(m.Variables, Environment_Variable{}) + if err := m.Variables[len(m.Variables)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Environment_Variable) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Variable: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Variable: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Value = &s + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var v Environment_Variable_Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (Environment_Variable_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &v + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Secret == nil { + m.Secret = &Secret{} + } + if err := m.Secret.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Parameter) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Parameter: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Parameter: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Value = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("key") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("value") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Parameters) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Parameters: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Parameters: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Parameter", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Parameter = append(m.Parameter, Parameter{}) + if err := m.Parameter[len(m.Parameter)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Credential) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Credential: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Credential: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Principal", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Principal = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Secret = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("principal") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Credentials) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Credentials: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Credentials: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Credentials = append(m.Credentials, Credential{}) + if err := m.Credentials[len(m.Credentials)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Secret) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Secret: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Secret: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (Secret_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Reference", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Reference == nil { + m.Reference = &Secret_Reference{} + } + if err := m.Reference.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Value == nil { + m.Value = &Secret_Value{} + } + if err := m.Value.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Secret_Reference) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Reference: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Reference: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Key = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Secret_Value) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Value: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Value: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + byteLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("data") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RateLimit) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RateLimit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RateLimit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field QPS", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.QPS = &v2 + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Principal", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Principal = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Capacity", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Capacity = &v + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("principal") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RateLimits) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RateLimits: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RateLimits: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Limits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Limits = append(m.Limits, RateLimit{}) + if err := m.Limits[len(m.Limits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregateDefaultQPS", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.AggregateDefaultQPS = &v2 + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field AggregateDefaultCapacity", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.AggregateDefaultCapacity = &v + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Image) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Image: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Image: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var v Image_Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (Image_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Appc", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Appc == nil { + m.Appc = &Image_Appc{} + } + if err := m.Appc.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Docker", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Docker == nil { + m.Docker = &Image_Docker{} + } + if err := m.Docker.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Cached", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Cached = &b + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Image_Appc) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Appc: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Appc: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.ID = &s + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Labels == nil { + m.Labels = &Labels{} + } + if err := m.Labels.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Image_Docker) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Docker: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Docker: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Credential", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Credential == nil { + m.Credential = &Credential{} + } + if err := m.Credential.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Config", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Config == nil { + m.Config = &Secret{} + } + if err := m.Config.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MountPropagation) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MountPropagation: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MountPropagation: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) + } + var v MountPropagation_Mode + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (MountPropagation_Mode(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Mode = &v + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Volume) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Volume: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Volume: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContainerPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.HostPath = &s + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) + } + var v Volume_Mode + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (Volume_Mode(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Mode = &v + hasFields[0] |= uint64(0x00000002) + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Image == nil { + m.Image = &Image{} + } + if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Source", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Source == nil { + m.Source = &Volume_Source{} + } + if err := m.Source.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_path") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("mode") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Volume_Source) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Source: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Source: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (Volume_Source_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DockerVolume", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DockerVolume == nil { + m.DockerVolume = &Volume_Source_DockerVolume{} + } + if err := m.DockerVolume.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SandboxPath", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.SandboxPath == nil { + m.SandboxPath = &Volume_Source_SandboxPath{} + } + if err := m.SandboxPath.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Secret", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Secret == nil { + m.Secret = &Secret{} + } + if err := m.Secret.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field HostPath", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.HostPath == nil { + m.HostPath = &Volume_Source_HostPath{} + } + if err := m.HostPath.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Volume_Source_DockerVolume) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DockerVolume: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DockerVolume: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Driver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Driver = &s + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DriverOptions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.DriverOptions == nil { + m.DriverOptions = &Parameters{} + } + if err := m.DriverOptions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Volume_Source_HostPath) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: HostPath: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: HostPath: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Path = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MountPropagation", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MountPropagation == nil { + m.MountPropagation = &MountPropagation{} + } + if err := m.MountPropagation.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("path") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Volume_Source_SandboxPath) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: SandboxPath: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: SandboxPath: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (Volume_Source_SandboxPath_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Path = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("path") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NetworkInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NetworkInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NetworkInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Groups", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Groups = append(m.Groups, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Labels == nil { + m.Labels = &Labels{} + } + if err := m.Labels.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IPAddresses", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IPAddresses = append(m.IPAddresses, NetworkInfo_IPAddress{}) + if err := m.IPAddresses[len(m.IPAddresses)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Name = &s + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortMappings", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PortMappings = append(m.PortMappings, NetworkInfo_PortMapping{}) + if err := m.PortMappings[len(m.PortMappings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NetworkInfo_IPAddress) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: IPAddress: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: IPAddress: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) + } + var v NetworkInfo_Protocol + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (NetworkInfo_Protocol(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Protocol = &v + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IPAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.IPAddress = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *NetworkInfo_PortMapping) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PortMapping: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PortMapping: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HostPort", wireType) + } + m.HostPort = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HostPort |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerPort", wireType) + } + m.ContainerPort = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ContainerPort |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Protocol = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("host_port") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_port") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CapabilityInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CapabilityInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CapabilityInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType == 0 { + var v CapabilityInfo_Capability + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (CapabilityInfo_Capability(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Capabilities = append(m.Capabilities, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + packedLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + for iNdEx < postIndex { + var v CapabilityInfo_Capability + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (CapabilityInfo_Capability(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Capabilities = append(m.Capabilities, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Capabilities", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *LinuxInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: LinuxInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: LinuxInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CapabilityInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CapabilityInfo == nil { + m.CapabilityInfo = &CapabilityInfo{} + } + if err := m.CapabilityInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BoundingCapabilities", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.BoundingCapabilities == nil { + m.BoundingCapabilities = &CapabilityInfo{} + } + if err := m.BoundingCapabilities.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field EffectiveCapabilities", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.EffectiveCapabilities == nil { + m.EffectiveCapabilities = &CapabilityInfo{} + } + if err := m.EffectiveCapabilities.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SharePIDNamespace", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.SharePIDNamespace = &b + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RLimitInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RLimitInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RLimitInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Rlimits", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Rlimits = append(m.Rlimits, RLimitInfo_RLimit{}) + if err := m.Rlimits[len(m.Rlimits)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *RLimitInfo_RLimit) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: RLimit: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RLimit: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= (RLimitInfo_RLimit_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Hard", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Hard = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Soft", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Soft = &v + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TTYInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: TTYInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TTYInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WindowSize", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.WindowSize == nil { + m.WindowSize = &TTYInfo_WindowSize{} + } + if err := m.WindowSize.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *TTYInfo_WindowSize) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WindowSize: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WindowSize: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Rows", wireType) + } + m.Rows = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Rows |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Columns", wireType) + } + m.Columns = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Columns |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000002) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("rows") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("columns") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerInfo) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + var v ContainerInfo_Type + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (ContainerInfo_Type(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Type = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Volumes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Volumes = append(m.Volumes, Volume{}) + if err := m.Volumes[len(m.Volumes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Docker", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Docker == nil { + m.Docker = &ContainerInfo_DockerInfo{} + } + if err := m.Docker.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hostname", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Hostname = &s + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mesos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Mesos == nil { + m.Mesos = &ContainerInfo_MesosInfo{} + } + if err := m.Mesos.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetworkInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NetworkInfos = append(m.NetworkInfos, NetworkInfo{}) + if err := m.NetworkInfos[len(m.NetworkInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LinuxInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.LinuxInfo == nil { + m.LinuxInfo = &LinuxInfo{} + } + if err := m.LinuxInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RlimitInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.RlimitInfo == nil { + m.RlimitInfo = &RLimitInfo{} + } + if err := m.RlimitInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TTYInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.TTYInfo == nil { + m.TTYInfo = &TTYInfo{} + } + if err := m.TTYInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("type") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerInfo_DockerInfo) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DockerInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DockerInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Image = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) + } + var v ContainerInfo_DockerInfo_Network + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (ContainerInfo_DockerInfo_Network(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Network = &v + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PortMappings", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PortMappings = append(m.PortMappings, ContainerInfo_DockerInfo_PortMapping{}) + if err := m.PortMappings[len(m.PortMappings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Privileged", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Privileged = &b + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Parameters", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Parameters = append(m.Parameters, Parameter{}) + if err := m.Parameters[len(m.Parameters)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ForcePullImage", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.ForcePullImage = &b + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VolumeDriver", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.VolumeDriver = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("image") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerInfo_DockerInfo_PortMapping) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PortMapping: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PortMapping: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field HostPort", wireType) + } + m.HostPort = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.HostPort |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerPort", wireType) + } + m.ContainerPort = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ContainerPort |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Protocol = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("host_port") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("container_port") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerInfo_MesosInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MesosInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MesosInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Image == nil { + m.Image = &Image{} + } + if err := m.Image.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ContainerStatus) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ContainerStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ContainerStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetworkInfos", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.NetworkInfos = append(m.NetworkInfos, NetworkInfo{}) + if err := m.NetworkInfos[len(m.NetworkInfos)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CgroupInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CgroupInfo == nil { + m.CgroupInfo = &CgroupInfo{} + } + if err := m.CgroupInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExecutorPID", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ExecutorPID = &v + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContainerID", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ContainerID == nil { + m.ContainerID = &ContainerID{} + } + if err := m.ContainerID.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CgroupInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CgroupInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CgroupInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NetCLS", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.NetCLS == nil { + m.NetCLS = &CgroupInfo_NetCls{} + } + if err := m.NetCLS.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CgroupInfo_Blkio) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Blkio: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Blkio: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CgroupInfo_Blkio_Value) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Value: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Value: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Op", wireType) + } + var v CgroupInfo_Blkio_Operation + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (CgroupInfo_Blkio_Operation(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Op = &v + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Value = &v + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CgroupInfo_Blkio_CFQ) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: CFQ: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CFQ: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CgroupInfo_Blkio_CFQ_Statistics) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Statistics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Statistics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Device == nil { + m.Device = &Device_Number{} + } + if err := m.Device.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Sectors", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Sectors = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Time", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Time = &v + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IOServiced", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IOServiced = append(m.IOServiced, CgroupInfo_Blkio_Value{}) + if err := m.IOServiced[len(m.IOServiced)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IOServiceBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IOServiceBytes = append(m.IOServiceBytes, CgroupInfo_Blkio_Value{}) + if err := m.IOServiceBytes[len(m.IOServiceBytes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IOServiceTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IOServiceTime = append(m.IOServiceTime, CgroupInfo_Blkio_Value{}) + if err := m.IOServiceTime[len(m.IOServiceTime)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IOWaitTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IOWaitTime = append(m.IOWaitTime, CgroupInfo_Blkio_Value{}) + if err := m.IOWaitTime[len(m.IOWaitTime)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IOMerged", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IOMerged = append(m.IOMerged, CgroupInfo_Blkio_Value{}) + if err := m.IOMerged[len(m.IOMerged)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IOQueued", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IOQueued = append(m.IOQueued, CgroupInfo_Blkio_Value{}) + if err := m.IOQueued[len(m.IOQueued)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CgroupInfo_Blkio_Throttling) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Throttling: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Throttling: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CgroupInfo_Blkio_Throttling_Statistics) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Statistics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Statistics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Device == nil { + m.Device = &Device_Number{} + } + if err := m.Device.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IOServiced", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IOServiced = append(m.IOServiced, CgroupInfo_Blkio_Value{}) + if err := m.IOServiced[len(m.IOServiced)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IOServiceBytes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IOServiceBytes = append(m.IOServiceBytes, CgroupInfo_Blkio_Value{}) + if err := m.IOServiceBytes[len(m.IOServiceBytes)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CgroupInfo_Blkio_Statistics) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Statistics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Statistics: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CFQ", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CFQ = append(m.CFQ, CgroupInfo_Blkio_CFQ_Statistics{}) + if err := m.CFQ[len(m.CFQ)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CFQRecursive", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CFQRecursive = append(m.CFQRecursive, CgroupInfo_Blkio_CFQ_Statistics{}) + if err := m.CFQRecursive[len(m.CFQRecursive)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Throttling", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Throttling = append(m.Throttling, &CgroupInfo_Blkio_Throttling_Statistics{}) + if err := m.Throttling[len(m.Throttling)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *CgroupInfo_NetCls) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NetCls: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NetCls: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ClassID", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.ClassID = &v + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Labels) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Labels: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Labels: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Labels = append(m.Labels, Label{}) + if err := m.Labels[len(m.Labels)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Label) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Label: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Label: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Value = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("key") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Port) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Port: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Port: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + m.Number = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Number |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Name = &s + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Protocol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Protocol = &s + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Visibility", wireType) + } + var v DiscoveryInfo_Visibility + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (DiscoveryInfo_Visibility(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Visibility = &v + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Labels == nil { + m.Labels = &Labels{} + } + if err := m.Labels.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("number") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Ports) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Ports: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Ports: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Ports = append(m.Ports, Port{}) + if err := m.Ports[len(m.Ports)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DiscoveryInfo) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DiscoveryInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DiscoveryInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Visibility", wireType) + } + m.Visibility = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Visibility |= (DiscoveryInfo_Visibility(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Name = &s + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Environment", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Environment = &s + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Location", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Location = &s + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Version = &s + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Ports", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Ports == nil { + m.Ports = &Ports{} + } + if err := m.Ports.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Labels", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Labels == nil { + m.Labels = &Labels{} + } + if err := m.Labels.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("visibility") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *WeightInfo) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: WeightInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: WeightInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + m.Weight = float64(math.Float64frombits(v)) + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Role = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("weight") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *VersionInfo) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: VersionInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: VersionInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BuildDate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.BuildDate = &s + iNdEx = postIndex + case 3: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field BuildTime", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.BuildTime = &v2 + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BuildUser", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.BuildUser = &s + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GitSHA", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.GitSHA = &s + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GitBranch", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.GitBranch = &s + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GitTag", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.GitTag = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("version") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Flag) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Flag: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Flag: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Value = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Role) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Role: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Role: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Weight", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + m.Weight = float64(math.Float64frombits(v)) + hasFields[0] |= uint64(0x00000002) + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Frameworks", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Frameworks = append(m.Frameworks, FrameworkID{}) + if err := m.Frameworks[len(m.Frameworks)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Resources", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Resources = append(m.Resources, Resource{}) + if err := m.Resources[len(m.Resources)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("weight") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Metric) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Metric: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Metric: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + iNdEx += 8 + v = uint64(dAtA[iNdEx-8]) + v |= uint64(dAtA[iNdEx-7]) << 8 + v |= uint64(dAtA[iNdEx-6]) << 16 + v |= uint64(dAtA[iNdEx-5]) << 24 + v |= uint64(dAtA[iNdEx-4]) << 32 + v |= uint64(dAtA[iNdEx-3]) << 40 + v |= uint64(dAtA[iNdEx-2]) << 48 + v |= uint64(dAtA[iNdEx-1]) << 56 + v2 := float64(math.Float64frombits(v)) + m.Value = &v2 + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("name") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FileInfo) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FileInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FileInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Path = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Nlink", wireType) + } + var v int32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Nlink = &v + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Size", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Size = &v + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mtime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Mtime == nil { + m.Mtime = &TimeInfo{} + } + if err := m.Mtime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Mode", wireType) + } + var v uint32 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint32(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.Mode = &v + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.UID = &s + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.GID = &s + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("path") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Device) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Device: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Device: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + intStringLen + if postIndex > l { + return io.ErrUnexpectedEOF + } + s := string(dAtA[iNdEx:postIndex]) + m.Path = &s + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Number", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Number == nil { + m.Number = &Device_Number{} + } + if err := m.Number.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Device_Number) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Number: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Number: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MajorNumber", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MajorNumber = &v + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field MinorNumber", wireType) + } + var v uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + m.MinorNumber = &v + hasFields[0] |= uint64(0x00000002) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("major_number") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("minor_number") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceAccess) Unmarshal(dAtA []byte) error { + var hasFields [1]uint64 + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceAccess: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceAccess: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Device", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Device.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000001) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Access", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Access.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + hasFields[0] |= uint64(0x00000002) + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + if hasFields[0]&uint64(0x00000001) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("device") + } + if hasFields[0]&uint64(0x00000002) == 0 { + return github_com_gogo_protobuf_proto.NewRequiredNotSetError("access") + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceAccess_Access) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Access: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Access: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Read", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Read = &b + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Write", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Write = &b + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Mknod", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + b := bool(v != 0) + m.Mknod = &b + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *DeviceWhitelist) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DeviceWhitelist: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DeviceWhitelist: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AllowedDevices", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMesos + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthMesos + } + postIndex := iNdEx + msglen + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AllowedDevices = append(m.AllowedDevices, DeviceAccess{}) + if err := m.AllowedDevices[len(m.AllowedDevices)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipMesos(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthMesos + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMesos(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMesos + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMesos + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + return iNdEx, nil + case 1: + iNdEx += 8 + return iNdEx, nil + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMesos + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + iNdEx += length + if length < 0 { + return 0, ErrInvalidLengthMesos + } + return iNdEx, nil + case 3: + for { + var innerWire uint64 + var start int = iNdEx + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowMesos + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + innerWire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + innerWireType := int(innerWire & 0x7) + if innerWireType == 4 { + break + } + next, err := skipMesos(dAtA[start:]) + if err != nil { + return 0, err + } + iNdEx = start + next + } + return iNdEx, nil + case 4: + return iNdEx, nil + case 5: + iNdEx += 4 + return iNdEx, nil + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + } + panic("unreachable") +} + +var ( + ErrInvalidLengthMesos = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMesos = fmt.Errorf("proto: integer overflow") +) + +func init() { proto.RegisterFile("mesos.proto", fileDescriptorMesos) } + +var fileDescriptorMesos = []byte{ + // 11888 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0xbd, 0x4d, 0x90, 0x1b, 0x49, + 0x76, 0x18, 0x3c, 0xf8, 0x07, 0x1e, 0x80, 0xee, 0x62, 0x36, 0xd9, 0xd3, 0x04, 0xc9, 0x6e, 0x0e, + 0x86, 0xe4, 0x90, 0x43, 0x0e, 0xc9, 0xe1, 0x0c, 0x67, 0x87, 0x9c, 0x9d, 0x99, 0x45, 0x03, 0xd5, + 0xdd, 0xb5, 0xc4, 0xdf, 0x26, 0x00, 0x72, 0x66, 0x43, 0x11, 0x88, 0x6a, 0xa0, 0xba, 0xbb, 0x44, + 0x00, 0x85, 0xa9, 0x2a, 0x34, 0xc9, 0xbd, 0x7c, 0xfb, 0x7d, 0x9f, 0x64, 0xaf, 0x64, 0xc9, 0xe1, + 0x83, 0xff, 0x64, 0xeb, 0x60, 0x87, 0x0e, 0xd6, 0xc1, 0x52, 0x48, 0x0a, 0x87, 0x43, 0xe1, 0x90, + 0x7f, 0x0e, 0xb2, 0xa5, 0x9b, 0xa5, 0x9b, 0x4e, 0xb4, 0xb6, 0x25, 0x87, 0x25, 0x5b, 0xb6, 0xd6, + 0x92, 0x6c, 0xc9, 0x96, 0x2c, 0x3b, 0xf2, 0xb7, 0xb2, 0x00, 0x34, 0xba, 0x39, 0x2b, 0x85, 0x4f, + 0x40, 0xbe, 0x7c, 0xef, 0x65, 0xe6, 0xcb, 0x97, 0x99, 0xef, 0x65, 0x66, 0xbd, 0x84, 0xec, 0xd0, + 0xf2, 0x1c, 0xef, 0xf6, 0xd8, 0x75, 0x7c, 0x07, 0x25, 0x68, 0xa2, 0xf0, 0xce, 0xbe, 0xed, 0x1f, + 0x4c, 0x76, 0x6f, 0xf7, 0x9c, 0xe1, 0x9d, 0x7d, 0x67, 0xdf, 0xb9, 0x43, 0x73, 0x77, 0x27, 0x7b, + 0x34, 0x45, 0x13, 0xf4, 0x1f, 0xa3, 0x2a, 0xde, 0x80, 0xec, 0x96, 0x6b, 0x0e, 0xad, 0x67, 0x8e, + 0xfb, 0xd4, 0xa8, 0xa0, 0x02, 0x24, 0x0e, 0xcd, 0xc1, 0xc4, 0x5a, 0x8b, 0x5c, 0x8e, 0x5e, 0xcf, + 0x6c, 0xc6, 0x7f, 0xf5, 0xe5, 0xc6, 0x6b, 0x98, 0x81, 0x8a, 0x57, 0x21, 0xd5, 0xd8, 0xdb, 0xb3, + 0xdc, 0x93, 0xd1, 0x4a, 0xfb, 0xd6, 0xc8, 0x3f, 0x01, 0xed, 0x0a, 0x24, 0xdb, 0xa6, 0x77, 0x52, + 0x99, 0xd7, 0x01, 0xf4, 0xe7, 0x56, 0x6f, 0xe2, 0x3b, 0x27, 0x15, 0xdb, 0x81, 0x6c, 0xd9, 0x19, + 0xf9, 0xa6, 0x3d, 0x3a, 0xa9, 0x86, 0xe8, 0x6d, 0x48, 0x8e, 0x4d, 0xd7, 0x1a, 0xf9, 0x6b, 0xd1, + 0xcb, 0x91, 0xeb, 0xd9, 0x7b, 0xe8, 0x36, 0x93, 0xa3, 0x42, 0x8f, 0x39, 0x46, 0xf1, 0x2e, 0x20, + 0x6c, 0x79, 0xce, 0xc4, 0xed, 0x59, 0x4d, 0xd7, 0x39, 0xb4, 0xfb, 0x27, 0xb6, 0xff, 0x06, 0x64, + 0x1b, 0x63, 0xcb, 0x35, 0x7d, 0xdb, 0x19, 0x9d, 0x80, 0x7a, 0x0f, 0xd2, 0x6d, 0x7b, 0x68, 0x19, + 0xa3, 0x3d, 0x07, 0x5d, 0x83, 0xec, 0xc8, 0x1c, 0x39, 0x9e, 0xd5, 0x73, 0x46, 0x7d, 0x8f, 0x62, + 0xc7, 0x38, 0xb6, 0x9a, 0x51, 0xfc, 0x00, 0x72, 0x95, 0x09, 0xe7, 0xfe, 0x2a, 0x74, 0x4f, 0x20, + 0x55, 0xea, 0xf7, 0x5d, 0xcb, 0xf3, 0x50, 0x01, 0xd2, 0x07, 0x8e, 0xe7, 0x8f, 0xcc, 0x21, 0xa9, + 0x55, 0xe4, 0x7a, 0x06, 0xcb, 0x34, 0x5a, 0x85, 0xa8, 0x3d, 0xa6, 0x72, 0xc9, 0x6c, 0x26, 0x8f, + 0x5e, 0x6e, 0x44, 0x8d, 0x26, 0x8e, 0xda, 0x63, 0xb4, 0x06, 0xf1, 0xb1, 0xe3, 0xfa, 0x6b, 0xb1, + 0xcb, 0xd1, 0xeb, 0x09, 0xce, 0x9f, 0x42, 0x8a, 0x3f, 0x1f, 0x81, 0x58, 0x07, 0x57, 0xd1, 0x45, + 0x48, 0x7a, 0xbd, 0x03, 0x6b, 0x18, 0x6e, 0x29, 0x87, 0xa1, 0xdb, 0x90, 0x32, 0x59, 0xf1, 0x6b, + 0xd1, 0xcb, 0xd1, 0xeb, 0xd9, 0x7b, 0x4b, 0x5c, 0xe8, 0xbc, 0x52, 0x1c, 0x5d, 0x20, 0x21, 0x04, + 0xf1, 0xb1, 0xe9, 0x1f, 0xac, 0xc5, 0x68, 0xfd, 0xe8, 0x7f, 0x74, 0x0b, 0x12, 0x5f, 0x4c, 0x2c, + 0xf7, 0xc5, 0x5a, 0xfc, 0x72, 0xec, 0x7a, 0xf6, 0x9e, 0xc6, 0x39, 0x34, 0x4d, 0xa2, 0xc0, 0xbe, + 0xe5, 0x0a, 0xe1, 0x52, 0x24, 0xd2, 0xca, 0x3d, 0xd7, 0xdc, 0x1f, 0x92, 0x7e, 0x4e, 0xb0, 0x56, + 0x8a, 0x74, 0x71, 0x04, 0x4b, 0x9d, 0x91, 0x79, 0x68, 0xda, 0x03, 0x73, 0xd7, 0x1e, 0xd8, 0xfe, + 0x0b, 0x74, 0x13, 0x12, 0x9e, 0x6f, 0xba, 0x3e, 0xad, 0x7c, 0xf6, 0xde, 0x32, 0xe7, 0x2d, 0xba, + 0x47, 0xb0, 0xa6, 0x38, 0xe8, 0x0e, 0xa4, 0xfb, 0xbc, 0x0f, 0xb8, 0x0a, 0xad, 0x70, 0x7c, 0xb5, + 0x6b, 0xb0, 0x44, 0x2a, 0x7e, 0x0a, 0x99, 0x9a, 0xd9, 0x3b, 0xb0, 0x47, 0x16, 0xd5, 0x88, 0x57, + 0x16, 0x7f, 0xf1, 0xdf, 0x46, 0x20, 0x2b, 0x38, 0x90, 0x5e, 0xbf, 0x05, 0x51, 0xbb, 0xcf, 0xeb, + 0x2a, 0xe4, 0x20, 0x4b, 0xd8, 0x04, 0x52, 0x59, 0x4a, 0x5d, 0xc1, 0x51, 0xbb, 0x8f, 0x6e, 0x42, + 0x7c, 0xe8, 0xf4, 0x2d, 0xca, 0x77, 0xe9, 0xde, 0xeb, 0x53, 0xf8, 0xa3, 0x3d, 0xe7, 0x76, 0xcd, + 0xe9, 0x5b, 0x98, 0x22, 0xa1, 0x8f, 0x61, 0x69, 0x12, 0x92, 0x0d, 0xed, 0x83, 0xec, 0xbd, 0x73, + 0x9c, 0x2c, 0x2c, 0x38, 0x3c, 0x85, 0x5c, 0xbc, 0x06, 0x71, 0xc2, 0x0c, 0x25, 0x21, 0xda, 0x69, + 0x6a, 0x11, 0x94, 0x83, 0x74, 0x05, 0x97, 0x8c, 0xba, 0x51, 0xdf, 0xd6, 0xa2, 0x28, 0x0d, 0xf1, + 0x4a, 0xe3, 0x49, 0x5d, 0x8b, 0x15, 0x7f, 0x3b, 0x01, 0xf9, 0x60, 0xe6, 0x21, 0x6d, 0x5a, 0x83, + 0xf8, 0xc4, 0xb3, 0xdc, 0x90, 0xfa, 0x50, 0x08, 0xc9, 0xa1, 0xd2, 0x8a, 0xaa, 0x39, 0x54, 0x5e, + 0x6f, 0x53, 0x39, 0xc4, 0x42, 0xc3, 0x58, 0x99, 0xcf, 0xb8, 0x0c, 0x99, 0x14, 0x6e, 0x81, 0xb6, + 0x67, 0xda, 0x03, 0xe7, 0xd0, 0x72, 0xbb, 0xbe, 0x3d, 0xb4, 0x9c, 0x89, 0xbf, 0x16, 0xbf, 0x1c, + 0xb9, 0x1e, 0x79, 0x18, 0xb9, 0x8b, 0x97, 0x45, 0x56, 0x9b, 0xe5, 0xa0, 0xab, 0x00, 0xbd, 0x03, + 0xab, 0xf7, 0x74, 0xec, 0xd8, 0x5c, 0x81, 0xd2, 0x0f, 0x13, 0x7b, 0xe6, 0xc0, 0xb3, 0xb0, 0x92, + 0x81, 0xce, 0x43, 0xdc, 0x75, 0x06, 0xd6, 0x5a, 0x92, 0x74, 0xd9, 0xc3, 0xc8, 0xdb, 0x9b, 0xd1, + 0xb5, 0x08, 0xa6, 0xa0, 0x50, 0x3f, 0xa7, 0xa6, 0xfa, 0xf9, 0x22, 0x64, 0xc6, 0xae, 0x3d, 0xea, + 0xd9, 0x63, 0x73, 0xb0, 0x96, 0xa6, 0x99, 0x01, 0x00, 0xdd, 0x80, 0xcc, 0x33, 0x6b, 0x77, 0x62, + 0x77, 0x27, 0xee, 0x60, 0x2d, 0x43, 0x95, 0x21, 0x77, 0xf4, 0x72, 0x23, 0xfd, 0xc4, 0xda, 0xed, + 0xd8, 0x1d, 0x5c, 0xc5, 0x69, 0x9a, 0xdd, 0x71, 0x07, 0xc8, 0x80, 0x5c, 0xcf, 0x1c, 0x33, 0xe1, + 0xdb, 0x96, 0xb7, 0x06, 0x74, 0x68, 0x6c, 0xcc, 0x88, 0x82, 0x74, 0x72, 0x59, 0x20, 0xbe, 0xe0, + 0x32, 0x0c, 0x91, 0xa2, 0xab, 0x90, 0x1c, 0x98, 0xbb, 0xd6, 0xc0, 0x5b, 0xcb, 0x52, 0x79, 0xe6, + 0x39, 0x93, 0x2a, 0x05, 0x62, 0x9e, 0x89, 0xce, 0x42, 0x82, 0x34, 0xcf, 0x5b, 0xcb, 0x5d, 0x8e, + 0x5d, 0xcf, 0x60, 0x96, 0x28, 0xfc, 0xad, 0x28, 0x40, 0xc0, 0x1f, 0x7d, 0x02, 0x71, 0xff, 0xc5, + 0x98, 0xe9, 0xf7, 0xd2, 0xbd, 0x2b, 0x27, 0x54, 0xe7, 0x76, 0xfb, 0xc5, 0xd8, 0x12, 0xfd, 0x4a, + 0xe8, 0x8a, 0xff, 0x26, 0x02, 0x71, 0x02, 0x44, 0x59, 0x48, 0x75, 0xea, 0x8f, 0xea, 0x44, 0x67, + 0x5e, 0x43, 0xaf, 0xc3, 0x0a, 0xd6, 0x1f, 0x37, 0xca, 0xa5, 0xcd, 0xaa, 0xde, 0xc5, 0x7a, 0xab, + 0xd1, 0xc1, 0x65, 0xbd, 0xa5, 0x45, 0xd0, 0x2a, 0xa0, 0x76, 0xa9, 0xf5, 0xa8, 0xfb, 0xc8, 0xa8, + 0x56, 0x8d, 0xfa, 0x76, 0xb7, 0xd5, 0x2e, 0xb5, 0x75, 0x2d, 0x8a, 0xce, 0x40, 0x7e, 0xbb, 0xd9, + 0x51, 0x50, 0x63, 0xe8, 0x2c, 0x68, 0xad, 0x9d, 0x12, 0xd6, 0x2b, 0x0a, 0x34, 0x8e, 0x56, 0x60, + 0xb9, 0x59, 0xc2, 0x6d, 0xa3, 0x6d, 0x34, 0xea, 0xdd, 0xd2, 0x93, 0x12, 0xd6, 0xb5, 0x04, 0x5a, + 0x02, 0xa8, 0x75, 0xaa, 0x6d, 0xa3, 0x8b, 0x1b, 0x55, 0x5d, 0x4b, 0xa2, 0x02, 0xac, 0x62, 0xbd, + 0xa5, 0xe3, 0xc7, 0x25, 0x8a, 0x86, 0xf5, 0x2d, 0xa3, 0xae, 0xd7, 0xf4, 0x7a, 0x5b, 0x4b, 0x21, + 0x0d, 0x72, 0x58, 0xdf, 0x0e, 0xa8, 0xd3, 0x85, 0xf8, 0x77, 0x7e, 0x6a, 0x3d, 0x52, 0xfc, 0xc7, + 0x71, 0xc8, 0x94, 0x89, 0xba, 0x50, 0x15, 0xbf, 0x13, 0x12, 0x8b, 0x18, 0x51, 0x32, 0x7f, 0x46, + 0x0e, 0xe8, 0x1e, 0xa4, 0x7a, 0xce, 0x70, 0x68, 0x8e, 0xfa, 0x7c, 0xa2, 0x59, 0x9b, 0xa1, 0x29, + 0xb3, 0x7c, 0x2c, 0x10, 0xd1, 0x7b, 0x10, 0x3f, 0xf0, 0xfd, 0xf1, 0xd4, 0xb0, 0x0d, 0x08, 0x76, + 0x7c, 0x7f, 0xbc, 0x99, 0x3e, 0x7a, 0xb9, 0x11, 0xdf, 0x69, 0xb7, 0x9b, 0x98, 0x22, 0xa3, 0xb7, + 0x20, 0xdf, 0xb7, 0x06, 0xe6, 0x8b, 0xae, 0x58, 0x48, 0xd8, 0xc8, 0x88, 0xbe, 0x7b, 0x1f, 0xe7, + 0x68, 0x46, 0x8b, 0xc1, 0xd1, 0x3b, 0xa0, 0xd9, 0x23, 0xdf, 0x72, 0x0f, 0xcd, 0x81, 0xc4, 0x4d, + 0x70, 0xdc, 0xbb, 0x78, 0x59, 0xe4, 0x09, 0xf4, 0x9b, 0xb0, 0xcc, 0xc7, 0x9a, 0xc4, 0x4e, 0x32, + 0xec, 0x7b, 0x77, 0xf1, 0x12, 0xcf, 0x12, 0xc8, 0x77, 0x20, 0xe6, 0xf7, 0xc6, 0x74, 0xb0, 0x64, + 0xef, 0x9d, 0x9d, 0x95, 0x4e, 0x6f, 0xbc, 0x99, 0x3a, 0x7a, 0xb9, 0x11, 0x6b, 0x97, 0x9b, 0x98, + 0x60, 0x16, 0x3e, 0x86, 0x14, 0x6f, 0xbe, 0x2a, 0x29, 0x36, 0x2d, 0x06, 0xab, 0x3a, 0x85, 0x2a, + 0xb3, 0xb8, 0x40, 0x2c, 0xbc, 0x0f, 0x71, 0x22, 0x0c, 0xb9, 0xb8, 0x11, 0xc2, 0xbc, 0xba, 0xb8, + 0xc9, 0x65, 0x28, 0x1a, 0x2c, 0x43, 0x85, 0x0d, 0x88, 0xb5, 0x7b, 0x0b, 0x88, 0x8a, 0x0f, 0xe6, + 0xe9, 0x6e, 0x16, 0x52, 0xe5, 0x46, 0xad, 0x56, 0xaa, 0x57, 0xb4, 0x08, 0x99, 0x06, 0x89, 0xec, + 0xb5, 0x28, 0x4a, 0x01, 0x69, 0x8d, 0x16, 0xe3, 0xea, 0xf2, 0x0b, 0x49, 0xc8, 0xee, 0x58, 0xe6, + 0xc0, 0x3f, 0xa0, 0xcd, 0x26, 0xe3, 0x88, 0xf6, 0x65, 0x84, 0x8a, 0xe4, 0x32, 0x6f, 0x92, 0x82, + 0x71, 0x9b, 0xf0, 0x91, 0x22, 0x3a, 0xb9, 0x5b, 0xa3, 0xaf, 0xd0, 0xad, 0xb1, 0x57, 0xea, 0xd6, + 0xf8, 0xb1, 0xdd, 0xfa, 0x3e, 0x9c, 0xed, 0x39, 0x23, 0x8f, 0x98, 0x71, 0xf6, 0xa1, 0xd5, 0x25, + 0x33, 0xed, 0xc4, 0xb5, 0x98, 0xda, 0xe4, 0x1f, 0x46, 0xde, 0xc3, 0x2b, 0x4a, 0xf6, 0x16, 0xcf, + 0x25, 0x54, 0xfb, 0xae, 0xd9, 0xb3, 0xba, 0x63, 0xcb, 0xb5, 0x9d, 0xfe, 0xb4, 0xfa, 0xbc, 0x7b, + 0x17, 0x23, 0x9a, 0xdf, 0xa4, 0xd9, 0xa2, 0xac, 0x5b, 0x81, 0x1a, 0xa4, 0xa6, 0x8c, 0x3b, 0xa9, + 0x06, 0xc1, 0x50, 0x79, 0x97, 0x8f, 0xc7, 0x74, 0x68, 0x61, 0x54, 0xc5, 0x3b, 0x33, 0x22, 0x1f, + 0x32, 0x1d, 0xcd, 0x50, 0xe6, 0x1b, 0xf3, 0x28, 0xca, 0x4a, 0x7f, 0x84, 0xd5, 0xf5, 0xe7, 0x22, + 0x90, 0x0f, 0xf5, 0xd7, 0xab, 0x69, 0x1e, 0x5a, 0x95, 0x26, 0x16, 0x33, 0x8b, 0x84, 0x71, 0x55, + 0x80, 0xb4, 0xe7, 0x9b, 0xfe, 0xc4, 0xb3, 0x3c, 0x6a, 0x1b, 0xe5, 0xb1, 0x4c, 0xa3, 0x8f, 0x21, + 0x4d, 0x2d, 0xfd, 0x9e, 0x33, 0xa0, 0x02, 0x5f, 0xba, 0x77, 0x81, 0x57, 0xba, 0x6e, 0xf9, 0x72, + 0x2e, 0x6e, 0x72, 0x94, 0x87, 0x71, 0xa3, 0x79, 0xf8, 0x3e, 0x96, 0x24, 0x85, 0x7d, 0xc8, 0xa9, + 0x0d, 0x5a, 0x50, 0x61, 0xb5, 0xa0, 0xe8, 0x2b, 0x17, 0xf4, 0xfd, 0x0c, 0x9a, 0x0a, 0xc0, 0x23, + 0x7b, 0x30, 0x68, 0x3a, 0x03, 0xbb, 0xf7, 0x02, 0x7d, 0x00, 0x39, 0x55, 0x6f, 0xf8, 0xd0, 0x99, + 0x6b, 0xa0, 0x65, 0x15, 0x05, 0x2a, 0xfe, 0x59, 0x94, 0x78, 0x10, 0x52, 0x49, 0xd0, 0x87, 0x10, + 0x9f, 0xb8, 0x36, 0xb1, 0xa8, 0xc9, 0x8a, 0xba, 0x3a, 0xab, 0x46, 0xb7, 0x3b, 0xd8, 0xd8, 0xcc, + 0x71, 0x53, 0x2b, 0xde, 0xc1, 0x86, 0x87, 0x29, 0x05, 0x7a, 0x1f, 0xb2, 0xd6, 0xe8, 0xd0, 0x76, + 0x9d, 0xd1, 0x70, 0xd6, 0xc9, 0xd0, 0x83, 0x1c, 0xac, 0xa2, 0x91, 0x75, 0x95, 0x39, 0x0a, 0xac, + 0x6f, 0xb9, 0xaf, 0x82, 0xb8, 0x51, 0xc4, 0x2c, 0x58, 0x66, 0x0e, 0x15, 0x20, 0xe1, 0x1d, 0x58, + 0x83, 0x01, 0x1d, 0x0a, 0xe9, 0x87, 0x71, 0xdf, 0x9d, 0x58, 0x98, 0x81, 0x88, 0x61, 0x61, 0xba, + 0xfb, 0x13, 0xc2, 0xd1, 0x5b, 0x4b, 0xd1, 0x15, 0x3a, 0x00, 0x14, 0xfe, 0x2e, 0xb5, 0xd5, 0x8d, + 0x85, 0xde, 0xd1, 0x3a, 0x80, 0x45, 0x5d, 0x2e, 0x73, 0x77, 0xc0, 0x4c, 0xc6, 0x34, 0x56, 0x20, + 0x68, 0x1d, 0x52, 0xd6, 0x73, 0xdf, 0x35, 0x7b, 0x3e, 0xad, 0xa9, 0x28, 0x5f, 0x00, 0x49, 0x3b, + 0x7a, 0x66, 0xef, 0xc0, 0xa2, 0x13, 0x42, 0x1a, 0xb3, 0x04, 0xda, 0x80, 0xac, 0x33, 0xf1, 0xc7, + 0x13, 0xbf, 0xbb, 0x67, 0x0f, 0x2c, 0xde, 0x1c, 0x60, 0xa0, 0x2d, 0x7b, 0x60, 0x15, 0x7f, 0x38, + 0x01, 0x39, 0xe9, 0xea, 0x11, 0xf9, 0x6f, 0x41, 0xd6, 0xe2, 0xe9, 0xae, 0xb4, 0x75, 0xcf, 0x08, + 0x29, 0x4a, 0xa7, 0x70, 0x13, 0xf1, 0x1e, 0x50, 0x1c, 0x45, 0x51, 0x5f, 0xc7, 0x35, 0xfa, 0x44, + 0x82, 0x7d, 0xd3, 0x37, 0x69, 0x75, 0x72, 0x98, 0xfe, 0x47, 0xef, 0x41, 0xc6, 0xe5, 0x5e, 0x1d, + 0x99, 0x86, 0x62, 0x8a, 0xc5, 0x2f, 0xbc, 0x3d, 0x2e, 0x94, 0x00, 0xef, 0x15, 0xa7, 0x96, 0x2d, + 0xc8, 0xed, 0x09, 0x73, 0x87, 0xd4, 0x3f, 0x7d, 0xac, 0x8d, 0xba, 0x7c, 0xf4, 0x72, 0x43, 0x75, + 0xc2, 0x71, 0x56, 0x12, 0xb2, 0xea, 0x53, 0x0b, 0x32, 0xc3, 0x14, 0x80, 0x5a, 0x8f, 0x05, 0x48, + 0xb2, 0x4a, 0xad, 0x01, 0x35, 0x0e, 0x89, 0xcd, 0xc9, 0x21, 0xe8, 0x1e, 0x64, 0x7a, 0xc2, 0x8f, + 0xe5, 0x86, 0xdc, 0xd9, 0x19, 0xff, 0x96, 0xd4, 0x34, 0x40, 0x23, 0x34, 0x7d, 0xdb, 0xeb, 0x11, + 0xf3, 0xf7, 0xc5, 0x5a, 0x2e, 0x44, 0x53, 0x11, 0x70, 0x46, 0x23, 0xd1, 0xd0, 0x36, 0x9c, 0xf3, + 0x0e, 0x26, 0x7e, 0xdf, 0x79, 0x36, 0xea, 0x86, 0xc6, 0x5b, 0xfe, 0xf8, 0xf1, 0xb6, 0x22, 0x28, + 0xb6, 0x83, 0x71, 0xa7, 0x98, 0x9d, 0x4b, 0x8b, 0xcc, 0xce, 0x7b, 0x7c, 0xaa, 0x5e, 0xa6, 0x53, + 0xcb, 0xda, 0xb4, 0x1e, 0xcc, 0xb3, 0x9e, 0x8a, 0xf7, 0x8e, 0x99, 0x53, 0x2a, 0xfa, 0x56, 0xa9, + 0x53, 0x6d, 0x6b, 0x11, 0x04, 0x90, 0x2c, 0x77, 0x5a, 0xed, 0x46, 0x4d, 0x8b, 0xf2, 0xc9, 0xe4, + 0x9f, 0x46, 0x01, 0x2a, 0xce, 0xd0, 0xb4, 0x99, 0x7b, 0xfd, 0x35, 0xc8, 0xed, 0x99, 0x93, 0x81, + 0xdf, 0xed, 0x53, 0x18, 0x9f, 0x4d, 0x2e, 0x89, 0xd6, 0x49, 0xc4, 0xdb, 0x5b, 0x04, 0x8b, 0xa5, + 0x71, 0x76, 0x2f, 0x48, 0x14, 0xfe, 0x7d, 0x04, 0xb2, 0x4a, 0x26, 0xda, 0x82, 0xa4, 0x6b, 0xed, + 0x13, 0xd7, 0x91, 0xa9, 0xf4, 0xf5, 0x85, 0xbc, 0x6e, 0x63, 0x8a, 0xab, 0x58, 0x2f, 0x9c, 0x1a, + 0x7d, 0x0d, 0xe2, 0xdf, 0x72, 0x46, 0x16, 0x77, 0xa7, 0xaf, 0x2d, 0xe6, 0xf2, 0x4d, 0x67, 0xa4, + 0xfa, 0xb1, 0x94, 0xb2, 0x70, 0x0d, 0x20, 0xe0, 0x2e, 0x9d, 0xac, 0xc8, 0xb4, 0x93, 0x55, 0xb8, + 0x02, 0x69, 0x41, 0x7f, 0x3c, 0x56, 0xf1, 0x97, 0x63, 0x00, 0x35, 0xd3, 0xf3, 0x99, 0x7a, 0xa1, + 0x82, 0xf4, 0x50, 0x33, 0x33, 0xfe, 0x68, 0x81, 0x7b, 0xb9, 0x64, 0x09, 0x09, 0xf2, 0x66, 0x37, + 0x1a, 0xf2, 0x0f, 0xe3, 0xf7, 0xef, 0xde, 0xbf, 0xcb, 0x17, 0x98, 0xf3, 0x10, 0x1b, 0xdb, 0x7d, + 0x3a, 0x8e, 0x33, 0x6c, 0x61, 0x6d, 0x1a, 0x15, 0x4c, 0x60, 0x21, 0x57, 0x2b, 0x31, 0xe5, 0x6a, + 0xad, 0x41, 0xea, 0xd0, 0x72, 0x3d, 0x22, 0x70, 0xea, 0xa4, 0x61, 0x91, 0x44, 0xd7, 0x83, 0x3d, + 0x09, 0x36, 0xa0, 0xa7, 0xf6, 0x24, 0x82, 0xdd, 0x88, 0x1b, 0x90, 0xe4, 0xfd, 0xcf, 0x86, 0xf1, + 0x99, 0x19, 0x69, 0x63, 0x8e, 0x40, 0xc6, 0x7d, 0xc8, 0x21, 0xcb, 0xd0, 0xd9, 0xe5, 0xa2, 0xf4, + 0xb9, 0x85, 0x80, 0x4e, 0xf0, 0xc6, 0x0a, 0x87, 0x21, 0x7f, 0xea, 0xa3, 0x90, 0xe3, 0xf0, 0xc6, + 0x22, 0x6e, 0xb3, 0xc3, 0xe0, 0xe6, 0xbc, 0x61, 0xa0, 0x41, 0xae, 0xb4, 0xad, 0xd7, 0xdb, 0xdd, + 0x4e, 0xb3, 0x42, 0x9c, 0xa5, 0x08, 0xd7, 0xff, 0x5f, 0x89, 0x41, 0x86, 0xed, 0xdf, 0x91, 0x5e, + 0xbc, 0x1c, 0xda, 0xab, 0x08, 0xba, 0x3c, 0x10, 0x6f, 0x68, 0x2a, 0x8d, 0x9d, 0x72, 0x2a, 0xfd, + 0x00, 0xc0, 0xf4, 0x7d, 0xd7, 0xde, 0x9d, 0xf8, 0x72, 0x02, 0x16, 0xdb, 0x18, 0x25, 0x91, 0xc1, + 0xc9, 0x14, 0x4c, 0x74, 0x8d, 0x2a, 0x55, 0x32, 0xdc, 0x59, 0x6c, 0xb3, 0x31, 0xe4, 0xea, 0x0b, + 0x25, 0x22, 0xbd, 0x95, 0xa0, 0x4a, 0xf4, 0x2e, 0x57, 0xa2, 0xa0, 0x27, 0xe1, 0x84, 0x9e, 0x2c, + 0xfc, 0xf3, 0x48, 0xa8, 0x0b, 0x1e, 0x86, 0xba, 0xe0, 0x72, 0xa8, 0xf4, 0x93, 0x7a, 0xc0, 0x9b, + 0xd7, 0x03, 0x61, 0xf7, 0x32, 0x82, 0xce, 0xc1, 0x99, 0x1d, 0x43, 0xc7, 0x25, 0x5c, 0xde, 0x31, + 0xca, 0xa5, 0x2a, 0x03, 0x47, 0x17, 0x78, 0x9d, 0x31, 0x42, 0x22, 0xbc, 0xd8, 0x6e, 0x13, 0x37, + 0x1e, 0x1b, 0x15, 0x1d, 0x6b, 0x71, 0xde, 0x93, 0xff, 0x2c, 0x0a, 0xab, 0xe5, 0x96, 0xd1, 0x1c, + 0x4c, 0xf6, 0xed, 0x51, 0x68, 0xee, 0x47, 0x25, 0x48, 0x7b, 0x96, 0x7b, 0x68, 0x93, 0x3e, 0x23, + 0xf6, 0xcd, 0xd2, 0xbd, 0xab, 0x62, 0x8d, 0x98, 0x4b, 0x70, 0xbb, 0xc5, 0xb0, 0xb1, 0x24, 0x53, + 0x57, 0xc3, 0xe8, 0xc9, 0xab, 0xe1, 0x97, 0xd2, 0x92, 0xd0, 0x52, 0x16, 0x3f, 0xd5, 0x52, 0x56, + 0xdc, 0x82, 0x14, 0xaf, 0x6b, 0x58, 0xd8, 0xab, 0x80, 0xca, 0x8d, 0x7a, 0x1b, 0x37, 0xaa, 0x55, + 0x1d, 0x77, 0x89, 0x38, 0x8d, 0x32, 0x11, 0xba, 0x06, 0xb9, 0x7a, 0xa3, 0xa2, 0x4b, 0x88, 0x58, + 0x06, 0xbe, 0x13, 0x81, 0xbc, 0x94, 0x85, 0x98, 0xf9, 0x78, 0xff, 0x2b, 0x33, 0x1f, 0x75, 0x09, + 0x8e, 0xdf, 0x9e, 0x2a, 0x03, 0xc8, 0xaa, 0x89, 0x76, 0x5f, 0x5a, 0x28, 0x69, 0xa1, 0xf4, 0x01, + 0x59, 0xf1, 0xc7, 0x63, 0x70, 0x76, 0x66, 0x0f, 0x9a, 0xd4, 0xe8, 0x5d, 0x3e, 0xc5, 0x12, 0xc1, + 0x9c, 0x9f, 0x92, 0x66, 0xb0, 0x59, 0x1d, 0x1a, 0x18, 0xe1, 0x81, 0x17, 0x3d, 0xf5, 0xc0, 0x13, + 0x8d, 0x8f, 0x1d, 0xdb, 0xf8, 0xf8, 0x4c, 0xe3, 0x3f, 0x83, 0xb3, 0x7d, 0x8b, 0x2d, 0x9e, 0xae, + 0x45, 0xf4, 0x86, 0x1a, 0x02, 0x62, 0xb8, 0x6f, 0x4c, 0x55, 0x98, 0xfc, 0x11, 0x38, 0x8a, 0x20, + 0x56, 0x38, 0x0b, 0x25, 0x97, 0xf8, 0x34, 0x29, 0xcf, 0x77, 0x5c, 0x73, 0xdf, 0xe2, 0x73, 0xc1, + 0x9b, 0xc7, 0xb5, 0x9e, 0xea, 0x2e, 0x43, 0xc5, 0x82, 0xa6, 0xf0, 0x31, 0xa4, 0x38, 0x0c, 0xdd, + 0x83, 0xe4, 0x98, 0x76, 0x02, 0x5f, 0x8c, 0xcf, 0x4e, 0x77, 0x8e, 0xba, 0xf0, 0x32, 0xcc, 0xe2, + 0xef, 0xc4, 0x20, 0xf1, 0x98, 0x9a, 0xca, 0x37, 0x15, 0x95, 0x58, 0x92, 0x53, 0x09, 0xcd, 0x9b, + 0x75, 0x1c, 0x6f, 0x12, 0xe7, 0xcd, 0x1c, 0x98, 0xee, 0xd4, 0x96, 0x31, 0x43, 0x6f, 0xd1, 0x2c, + 0xcc, 0x51, 0x08, 0xb2, 0x6b, 0x8e, 0xf6, 0x2d, 0x8f, 0xef, 0xe2, 0x84, 0x91, 0x31, 0xcd, 0xc2, + 0x1c, 0x05, 0x15, 0x21, 0xe6, 0x59, 0x3e, 0x1f, 0x21, 0x5a, 0x98, 0xad, 0xe5, 0x63, 0x92, 0x89, + 0xae, 0x42, 0xdc, 0xb7, 0x9e, 0xb3, 0x8d, 0xcc, 0xec, 0x74, 0x55, 0xad, 0xe7, 0x3e, 0xa6, 0xd9, + 0x85, 0x2b, 0x90, 0x64, 0x35, 0x09, 0xbb, 0x08, 0x91, 0x90, 0x8b, 0x50, 0xf8, 0x08, 0x12, 0xb4, + 0x0a, 0x04, 0x69, 0xd7, 0x12, 0xd2, 0x8b, 0x0b, 0x24, 0x0a, 0x42, 0xab, 0x10, 0xb3, 0xe8, 0xe4, + 0x10, 0xe4, 0x10, 0x40, 0xe1, 0x43, 0x48, 0xb2, 0xfa, 0xa3, 0xdb, 0x90, 0xa0, 0x2d, 0xe0, 0x2e, + 0x16, 0x9a, 0x6d, 0xa3, 0xe0, 0x48, 0xd1, 0x0a, 0xe7, 0x21, 0xd6, 0xb2, 0xa8, 0x67, 0x6c, 0xfb, + 0xd6, 0x90, 0x52, 0x65, 0x30, 0xfd, 0x5f, 0x28, 0x42, 0x9c, 0xb4, 0x62, 0xe1, 0x69, 0xcb, 0xbb, + 0x7c, 0x12, 0x06, 0x48, 0xb6, 0xca, 0xa5, 0x6a, 0x09, 0x6b, 0xaf, 0x91, 0xff, 0xb8, 0x54, 0xdf, + 0xa6, 0x9b, 0x88, 0x29, 0x88, 0xb5, 0xf4, 0x36, 0xdb, 0xa4, 0x6e, 0xeb, 0x9f, 0xb5, 0xb5, 0x58, + 0xf1, 0x8f, 0x23, 0x90, 0x91, 0xc3, 0xe2, 0x78, 0xdb, 0x47, 0x2a, 0x42, 0xf4, 0xd5, 0x14, 0x21, + 0xf6, 0x2a, 0x8a, 0x10, 0x3f, 0x59, 0x11, 0x4e, 0xd7, 0xc9, 0x42, 0x5f, 0x92, 0x0b, 0xf4, 0xa5, + 0xf8, 0x9b, 0x39, 0x48, 0x8b, 0xd1, 0xb4, 0xa0, 0xe1, 0x57, 0x4f, 0x68, 0xf8, 0x5f, 0x7a, 0x93, + 0x79, 0x5b, 0x12, 0x8b, 0x74, 0x7f, 0xc1, 0x1e, 0xfd, 0x2d, 0x88, 0xf7, 0x6d, 0xef, 0x29, 0xb7, + 0xff, 0xd6, 0xa6, 0xe7, 0xa4, 0x8a, 0xed, 0xd1, 0x6d, 0x0b, 0x4c, 0xb1, 0x50, 0x09, 0xb2, 0xca, + 0x4c, 0xc6, 0x6d, 0xc1, 0x93, 0x26, 0x32, 0xac, 0xd2, 0xa0, 0x8f, 0xc8, 0x42, 0x78, 0xe8, 0xf4, + 0xa8, 0x73, 0x9d, 0x09, 0x39, 0x13, 0x0a, 0x03, 0x8e, 0xc0, 0x16, 0x37, 0x89, 0x4f, 0x66, 0x2b, + 0xef, 0xc0, 0x74, 0xad, 0x3e, 0x37, 0x5e, 0x0a, 0xd3, 0x94, 0x2d, 0x9a, 0xcb, 0xac, 0x18, 0x86, + 0x89, 0xb6, 0x61, 0xd9, 0x1c, 0x0c, 0x9c, 0x1e, 0x2d, 0xbe, 0x6b, 0x8f, 0xf6, 0x1c, 0xee, 0x15, + 0xae, 0x4f, 0x13, 0x97, 0x24, 0x1a, 0x65, 0xb0, 0x64, 0x86, 0xd2, 0xe8, 0xeb, 0x90, 0x1d, 0xf3, + 0x69, 0x95, 0xf8, 0xb3, 0xb9, 0x93, 0x96, 0x9d, 0x25, 0xe2, 0x93, 0x07, 0x69, 0x0c, 0x82, 0xda, + 0xe8, 0x23, 0x03, 0x72, 0xa1, 0x25, 0x21, 0xff, 0x2a, 0x4b, 0x42, 0x88, 0xb4, 0x70, 0x05, 0x96, + 0xc2, 0x15, 0x27, 0xf3, 0x03, 0xed, 0x6e, 0x76, 0xb6, 0x46, 0xff, 0x17, 0x7e, 0x23, 0x02, 0xcb, + 0x53, 0xdc, 0xc2, 0x67, 0x30, 0x91, 0xe9, 0x33, 0x98, 0xc0, 0x2d, 0x8d, 0x2e, 0x72, 0x4b, 0x45, + 0x61, 0xb1, 0xa0, 0x30, 0xf4, 0x21, 0x1f, 0x14, 0xf1, 0xd0, 0xe1, 0xc7, 0x71, 0xad, 0x52, 0xc6, + 0xc9, 0x7c, 0x87, 0x95, 0xcc, 0x57, 0xed, 0x52, 0xdb, 0x28, 0x6b, 0x11, 0xea, 0xbc, 0x7e, 0x5e, + 0x2f, 0xd5, 0x8c, 0xb2, 0xb0, 0x54, 0x0a, 0x7f, 0x27, 0x01, 0x69, 0xa1, 0xa7, 0x68, 0x0b, 0xb2, + 0x63, 0xe2, 0xdd, 0x78, 0xbe, 0x35, 0xea, 0x59, 0xdc, 0x36, 0xb8, 0x72, 0x9c, 0x5a, 0xdf, 0x6e, + 0x06, 0xb8, 0x58, 0x25, 0x24, 0xad, 0x3f, 0x74, 0x06, 0x93, 0xa1, 0x35, 0xd5, 0xfa, 0xc7, 0x14, + 0x88, 0x79, 0x26, 0xfa, 0x8a, 0xdc, 0x88, 0x88, 0xcd, 0x1f, 0x0b, 0xb2, 0xa4, 0x16, 0x4d, 0x8b, + 0x5d, 0x8a, 0xc2, 0x36, 0x64, 0x95, 0xb2, 0x17, 0x3a, 0x8b, 0xa1, 0x6e, 0x8a, 0x4e, 0x75, 0x53, + 0xe1, 0x27, 0x62, 0x90, 0x64, 0xbc, 0x95, 0x33, 0xa7, 0xe8, 0x3c, 0xb1, 0x4f, 0x55, 0x65, 0x76, + 0x5e, 0xfe, 0x50, 0xd9, 0x71, 0xcd, 0x9e, 0x4c, 0xdf, 0x34, 0xfd, 0x03, 0xbe, 0x2f, 0xfb, 0x11, + 0x24, 0x86, 0xce, 0x64, 0xe4, 0x73, 0x29, 0x5c, 0x3d, 0x89, 0xb4, 0x46, 0x90, 0x31, 0xa3, 0xa1, + 0x47, 0xbe, 0xc2, 0xab, 0x55, 0x4d, 0xb5, 0x1b, 0x90, 0x1e, 0x5a, 0xbe, 0x49, 0xf7, 0xae, 0x12, + 0xf3, 0x54, 0x50, 0x66, 0x13, 0x17, 0x77, 0xec, 0x3a, 0x74, 0x63, 0x8d, 0xbb, 0xb8, 0x3c, 0x59, + 0x28, 0x40, 0x9c, 0xd4, 0x93, 0xa9, 0xa9, 0xe3, 0x07, 0x63, 0xc2, 0xf1, 0x0b, 0x17, 0x20, 0x41, + 0x2b, 0x32, 0x2f, 0xb3, 0xb8, 0x39, 0x4f, 0x13, 0xd3, 0x10, 0x6f, 0x96, 0xda, 0x3b, 0x5a, 0x04, + 0x65, 0x20, 0x51, 0x6b, 0x74, 0xea, 0x64, 0xb5, 0xcc, 0x40, 0x62, 0xb3, 0xda, 0x28, 0x3f, 0xd2, + 0x62, 0x64, 0x05, 0xc5, 0xa5, 0x27, 0xc2, 0x01, 0x29, 0x2c, 0x43, 0x3e, 0x34, 0x95, 0x15, 0x72, + 0x00, 0xc1, 0x0c, 0x55, 0xfc, 0x27, 0x51, 0x58, 0x6b, 0xbb, 0xe6, 0xde, 0x9e, 0xdd, 0x23, 0x26, + 0xb0, 0xeb, 0x0c, 0x5a, 0xbe, 0xe9, 0xdb, 0x9e, 0x6f, 0xf7, 0xbc, 0x85, 0x1a, 0xb1, 0x06, 0xa9, + 0x5d, 0xb3, 0xf7, 0x74, 0xe0, 0xec, 0xd3, 0xbe, 0x8a, 0x63, 0x91, 0x44, 0x67, 0x21, 0xb1, 0xfb, + 0xc2, 0xe7, 0x56, 0x53, 0x1c, 0xb3, 0x04, 0x81, 0xf6, 0x5d, 0x67, 0xcc, 0xd6, 0x93, 0x38, 0x66, + 0x09, 0xb4, 0x0e, 0xe0, 0x1c, 0x5a, 0xee, 0xc0, 0x1e, 0xda, 0x3e, 0x3b, 0x8b, 0x88, 0x63, 0x05, + 0x42, 0x85, 0x6a, 0xf6, 0x9e, 0x5a, 0x3e, 0x3b, 0x72, 0x88, 0x63, 0x91, 0x24, 0xf2, 0xfa, 0x62, + 0x60, 0x8d, 0xe8, 0xa2, 0x11, 0xc7, 0xf4, 0x3f, 0xba, 0x0a, 0x29, 0xd7, 0xf4, 0xad, 0xdd, 0xb1, + 0x47, 0x97, 0x85, 0xf8, 0x66, 0xf6, 0xe8, 0xe5, 0x46, 0x0a, 0x9b, 0xbe, 0xb5, 0xd9, 0x6c, 0x61, + 0x91, 0x27, 0xd0, 0xc6, 0x63, 0x8f, 0x4e, 0xfe, 0x0a, 0x5a, 0x53, 0xa0, 0x8d, 0xc7, 0xf4, 0x86, + 0x86, 0x6b, 0x7d, 0x31, 0xb1, 0x26, 0xf4, 0x44, 0x97, 0x94, 0x22, 0xd3, 0xc5, 0x1f, 0x4a, 0x40, + 0xce, 0x18, 0x2b, 0xa2, 0x5a, 0x07, 0xd8, 0x72, 0xdc, 0x67, 0xa6, 0xdb, 0xb7, 0x47, 0xfb, 0xb4, + 0x13, 0x63, 0x58, 0x81, 0x90, 0xfc, 0x0a, 0x33, 0xa2, 0xdb, 0xed, 0x2a, 0x95, 0x58, 0x0c, 0x2b, + 0x10, 0x92, 0x6f, 0x8c, 0xb0, 0xd5, 0xb3, 0xec, 0x43, 0x2e, 0xb9, 0x18, 0x56, 0x20, 0xe8, 0x32, + 0x64, 0x8d, 0xd1, 0x4e, 0xdf, 0xd5, 0x5d, 0xd7, 0x71, 0x99, 0x10, 0x63, 0x58, 0x05, 0xa1, 0x22, + 0xe4, 0x8c, 0x51, 0xa9, 0x2f, 0x51, 0x12, 0x14, 0x25, 0x04, 0x43, 0x57, 0x20, 0x4f, 0xea, 0x54, + 0x31, 0x7d, 0x73, 0xdf, 0x35, 0x87, 0x4c, 0xa8, 0x31, 0x1c, 0x06, 0xa2, 0xeb, 0xb0, 0x6c, 0x8c, + 0x3a, 0xa3, 0xa7, 0x23, 0xe7, 0xd9, 0x88, 0x1e, 0x15, 0xb0, 0xad, 0x99, 0x18, 0x9e, 0x06, 0xb3, + 0x5a, 0x57, 0x6c, 0xaf, 0x67, 0xba, 0x7d, 0x26, 0x73, 0x5a, 0x6b, 0x01, 0xe1, 0xf9, 0xd6, 0xc0, + 0x3e, 0x24, 0xae, 0x57, 0x46, 0xe6, 0x73, 0x08, 0x69, 0x55, 0x63, 0xe2, 0x63, 0x22, 0x55, 0xcf, + 0x67, 0x52, 0x8e, 0x61, 0x15, 0xc4, 0x31, 0x64, 0x11, 0x59, 0x89, 0x21, 0xcb, 0x60, 0x18, 0x75, + 0x07, 0x3b, 0xd4, 0x9d, 0xca, 0x49, 0x0c, 0x01, 0x22, 0x92, 0xc1, 0x96, 0xe9, 0x0d, 0xf9, 0xad, + 0x02, 0xba, 0x39, 0x1a, 0xc3, 0x21, 0x18, 0xa9, 0x29, 0x4d, 0x63, 0xeb, 0x8b, 0x3e, 0xdb, 0x04, + 0x8d, 0x61, 0x05, 0x42, 0x94, 0x81, 0xa6, 0x1a, 0x8f, 0x3c, 0xba, 0xfb, 0x19, 0xc3, 0x32, 0x2d, + 0x69, 0xb7, 0x4c, 0x7b, 0xe0, 0xad, 0x69, 0x0a, 0x2d, 0x85, 0x10, 0x25, 0xde, 0x72, 0xcd, 0x7d, + 0x42, 0x7a, 0x86, 0x66, 0x8a, 0x24, 0x99, 0x56, 0xc9, 0x5f, 0x46, 0x88, 0x68, 0x5e, 0x00, 0x20, + 0x2d, 0x23, 0x89, 0xb2, 0x6b, 0x99, 0xa4, 0x65, 0x2b, 0xac, 0x65, 0x0a, 0xa8, 0xf8, 0x2f, 0x52, + 0xb0, 0x64, 0xf4, 0x86, 0xaa, 0x22, 0xae, 0x42, 0xd2, 0x18, 0xd5, 0xbc, 0x7d, 0x8f, 0x2b, 0x21, + 0x4f, 0x91, 0x06, 0x18, 0x23, 0xae, 0x1a, 0x4c, 0xfd, 0x64, 0x9a, 0xa9, 0x4e, 0xd9, 0x9b, 0x0c, + 0x79, 0x7e, 0x4c, 0xa8, 0x4e, 0x00, 0x43, 0xd7, 0x60, 0x89, 0x74, 0x9c, 0xe7, 0x77, 0x46, 0xae, + 0x65, 0xf6, 0x0e, 0x84, 0x0e, 0x4e, 0x41, 0x99, 0xa2, 0x12, 0xa9, 0xea, 0xcf, 0x7b, 0x7d, 0xa1, + 0x85, 0x2a, 0x88, 0x61, 0x34, 0x4d, 0x77, 0xd8, 0x74, 0x9d, 0x5d, 0xa1, 0x82, 0x2a, 0x88, 0xd5, + 0xa7, 0xe5, 0xf6, 0xbe, 0x31, 0xb1, 0x46, 0xa4, 0xa4, 0x94, 0xa8, 0x4f, 0x00, 0x63, 0x5c, 0xb0, + 0xd5, 0xb7, 0x5d, 0xab, 0xe7, 0x0b, 0xdd, 0x53, 0x41, 0x44, 0xec, 0xc6, 0x48, 0xef, 0x1d, 0x38, + 0x42, 0xf3, 0x44, 0x92, 0xa9, 0x25, 0xf9, 0x8b, 0xad, 0xb1, 0xd0, 0x3a, 0x05, 0xc2, 0xca, 0x27, + 0x15, 0xf6, 0x7c, 0x73, 0x38, 0x16, 0x5a, 0x17, 0x82, 0xb1, 0x41, 0x22, 0xd3, 0x94, 0x51, 0x4e, + 0x0c, 0x92, 0x10, 0x98, 0xd5, 0x94, 0x0c, 0xc2, 0x9a, 0xe9, 0x3d, 0xf5, 0xb8, 0xf6, 0xa9, 0x20, + 0x26, 0x5b, 0x91, 0xa4, 0xac, 0x96, 0x84, 0x6c, 0x55, 0x28, 0x69, 0x51, 0x63, 0xe2, 0xd3, 0xce, + 0x65, 0x3a, 0x28, 0x92, 0x44, 0x91, 0x1a, 0x13, 0x9f, 0x77, 0x1f, 0xd3, 0xc0, 0x00, 0x40, 0xea, + 0x4a, 0x46, 0x8c, 0xda, 0x79, 0x4c, 0x11, 0xa7, 0xc1, 0xa4, 0xe5, 0x8d, 0x89, 0x1f, 0x74, 0x1f, + 0xd3, 0xc9, 0x10, 0x8c, 0xe3, 0x04, 0x1d, 0xb8, 0x22, 0x71, 0x82, 0x1e, 0xbc, 0x02, 0xf9, 0xc6, + 0xc4, 0x57, 0xba, 0xf0, 0x2c, 0x9b, 0x68, 0x42, 0x40, 0xce, 0x29, 0xe8, 0xc4, 0x73, 0x92, 0x53, + 0xd0, 0x8b, 0x05, 0x48, 0x93, 0x86, 0xd0, 0x6e, 0x5c, 0x65, 0x7a, 0x2b, 0xd2, 0x7c, 0xe8, 0xcb, + 0x8e, 0x7c, 0x5d, 0x0e, 0x7d, 0xd9, 0x93, 0xac, 0x1e, 0x4a, 0x57, 0xae, 0xc9, 0x7a, 0x28, 0x7d, + 0xf9, 0x36, 0x68, 0x2a, 0x80, 0x32, 0x3b, 0x4f, 0x11, 0x67, 0xe0, 0xbc, 0xce, 0x41, 0x77, 0x16, + 0x64, 0x9d, 0x83, 0xfe, 0x64, 0xf2, 0x0e, 0x75, 0xe8, 0x05, 0x29, 0x6f, 0x15, 0x5c, 0xfc, 0xf5, + 0x18, 0xe4, 0xdb, 0x3d, 0x75, 0xfc, 0x92, 0xc9, 0xca, 0x77, 0x4a, 0x83, 0x7d, 0xc7, 0xb5, 0xfd, + 0x83, 0x21, 0x1f, 0xc5, 0x21, 0x18, 0x19, 0xe3, 0xd8, 0x77, 0x6a, 0xf6, 0x88, 0x8f, 0x64, 0x9e, + 0x12, 0x70, 0xf3, 0x39, 0x1f, 0xc1, 0x3c, 0x45, 0xf4, 0xa6, 0x66, 0x3e, 0x2f, 0x3b, 0xa3, 0x11, + 0x1f, 0xb4, 0x22, 0x49, 0x24, 0x58, 0xea, 0xf9, 0xf6, 0xa1, 0xd5, 0x18, 0x5b, 0x23, 0x39, 0x5a, + 0x15, 0x10, 0xa9, 0x4f, 0xd3, 0xf4, 0x3c, 0x89, 0xc2, 0x86, 0x6b, 0x08, 0x46, 0x70, 0x4a, 0xbe, + 0x6f, 0x0d, 0xc7, 0x3e, 0x9b, 0xc9, 0xf8, 0x78, 0x55, 0x61, 0xa4, 0x24, 0xdd, 0xf3, 0xcd, 0x5d, + 0x62, 0x78, 0x07, 0xe3, 0x55, 0x01, 0x11, 0x1d, 0x2e, 0x4f, 0x5c, 0x97, 0x82, 0xf8, 0x88, 0x0d, + 0x00, 0x6c, 0x5e, 0x6b, 0x59, 0xfb, 0x62, 0xbc, 0xf2, 0x14, 0x1f, 0x13, 0x34, 0x23, 0x2b, 0xc7, + 0x04, 0xcd, 0xb9, 0x0c, 0x59, 0x6c, 0xf9, 0xae, 0x39, 0xf2, 0x68, 0x2e, 0x5f, 0x18, 0x14, 0x10, + 0xe3, 0xa9, 0xbb, 0xae, 0x18, 0x94, 0x3c, 0xc5, 0x79, 0x62, 0xb2, 0x24, 0x2d, 0x49, 0x9e, 0x24, + 0x39, 0x33, 0x53, 0x2e, 0xcf, 0xce, 0x94, 0xc5, 0xbf, 0x1f, 0x85, 0x7c, 0xa7, 0xaf, 0xf6, 0x29, + 0x9d, 0x01, 0x82, 0x45, 0x37, 0x22, 0x66, 0x80, 0x60, 0xc9, 0x5d, 0x83, 0x54, 0xdd, 0x69, 0x3a, + 0xae, 0x2f, 0x26, 0x67, 0x91, 0x0c, 0xcd, 0xdb, 0xb1, 0xd9, 0x79, 0x9b, 0x0c, 0x60, 0xc9, 0x38, + 0x2e, 0x75, 0x31, 0xe0, 0x4c, 0xf4, 0xa9, 0x77, 0xb8, 0x3b, 0xd9, 0x0b, 0x9b, 0x05, 0x2a, 0x8c, + 0xe0, 0xb4, 0x46, 0xfd, 0x00, 0x87, 0xf7, 0xb1, 0x0a, 0x9b, 0x69, 0x79, 0x6a, 0xce, 0x1a, 0x41, + 0x70, 0xf6, 0x47, 0x8e, 0x6b, 0xf5, 0x6b, 0x93, 0x81, 0x6f, 0xf3, 0x4e, 0x0e, 0xc1, 0x8a, 0x7f, + 0x33, 0x0a, 0x4b, 0xad, 0x7a, 0xad, 0xa9, 0x88, 0xe7, 0x23, 0x48, 0xdb, 0xe3, 0xae, 0xe7, 0x9b, + 0xbe, 0x37, 0x75, 0x51, 0x40, 0x35, 0xb1, 0x98, 0x95, 0x66, 0x50, 0x42, 0x0f, 0xa7, 0x6c, 0x9a, + 0xe5, 0xa1, 0x32, 0x80, 0xdd, 0x1b, 0x0a, 0xf2, 0x68, 0xe8, 0xba, 0x55, 0x78, 0x69, 0xdc, 0xcc, + 0x1f, 0xbd, 0xdc, 0xc8, 0x18, 0xe5, 0x1a, 0x67, 0x91, 0xb1, 0x79, 0xb6, 0x87, 0x3e, 0x85, 0x8c, + 0xdf, 0x13, 0x3c, 0x62, 0xa1, 0x4d, 0xee, 0xd0, 0xe8, 0x64, 0x37, 0x00, 0xdb, 0x65, 0xce, 0x21, + 0xed, 0xf7, 0x02, 0x06, 0x93, 0xbe, 0x60, 0x10, 0xde, 0x25, 0x0f, 0xa9, 0x02, 0x63, 0xd0, 0xa9, + 0x08, 0x06, 0x13, 0x96, 0xe9, 0x15, 0x7f, 0x3d, 0x02, 0x4b, 0xc4, 0x43, 0x51, 0xc4, 0x12, 0xf8, + 0x75, 0x91, 0x57, 0xf2, 0xeb, 0xa6, 0xfd, 0xcf, 0xe8, 0x97, 0xf5, 0x3f, 0x37, 0x20, 0x4b, 0xcd, + 0xf0, 0xae, 0x6a, 0xce, 0x03, 0x05, 0x6d, 0x52, 0x9b, 0xfe, 0x12, 0xc0, 0xc4, 0xb3, 0xfa, 0x3c, + 0x9f, 0x19, 0xf6, 0x19, 0x02, 0xa1, 0xd9, 0xc5, 0x5f, 0x58, 0x09, 0xee, 0x6d, 0x87, 0x66, 0xb8, + 0x8c, 0x2f, 0xa6, 0xd4, 0xd0, 0xc6, 0x66, 0x00, 0x46, 0x65, 0x58, 0xe9, 0x8d, 0x27, 0x5e, 0x77, + 0xe2, 0xf1, 0x7b, 0xa2, 0x5d, 0xcf, 0xea, 0xf1, 0x8b, 0x53, 0x9b, 0x67, 0x8f, 0x5e, 0x6e, 0x68, + 0xe5, 0x66, 0xc7, 0xeb, 0x78, 0xec, 0xaa, 0x68, 0xcb, 0xea, 0x79, 0x58, 0x23, 0x04, 0x2a, 0x04, + 0x19, 0x70, 0x8e, 0x32, 0xf1, 0x5e, 0x78, 0xbe, 0x35, 0x54, 0xd8, 0xd0, 0x3b, 0x55, 0x9b, 0xab, + 0x47, 0x2f, 0x37, 0x10, 0x61, 0xd3, 0xa2, 0xf9, 0x92, 0x11, 0x22, 0x44, 0x61, 0x18, 0xba, 0x05, + 0x40, 0x59, 0xd1, 0xc6, 0xb3, 0x5b, 0x56, 0x4c, 0x9d, 0x08, 0x7d, 0x95, 0x00, 0x71, 0x86, 0x20, + 0xd0, 0xbf, 0xe8, 0x3d, 0xc8, 0x0f, 0xad, 0x61, 0xd7, 0xf5, 0x3c, 0x2e, 0x1a, 0xea, 0xd8, 0xb0, + 0x3b, 0x06, 0x35, 0x6b, 0x88, 0x5b, 0x2d, 0x2a, 0x20, 0x9c, 0x1d, 0x5a, 0x43, 0xec, 0x79, 0x4c, + 0x98, 0xd7, 0x60, 0x99, 0x10, 0xa9, 0x12, 0x67, 0x2e, 0x0f, 0xe1, 0x55, 0x0d, 0x84, 0xfe, 0x00, + 0x96, 0x69, 0x55, 0x46, 0x2e, 0x3f, 0xec, 0x67, 0x63, 0x31, 0xbf, 0x79, 0xe6, 0xe8, 0xe5, 0x46, + 0x9e, 0xd4, 0xa7, 0xee, 0xb2, 0x53, 0x7d, 0x0f, 0xe7, 0x09, 0xa6, 0x4c, 0xa2, 0x4f, 0xe1, 0x8c, + 0x20, 0xf5, 0x0f, 0x5c, 0xc7, 0xf7, 0x07, 0x16, 0xbb, 0x13, 0x91, 0xdf, 0x5c, 0x39, 0x7a, 0xb9, + 0xb1, 0xcc, 0x88, 0xdb, 0x22, 0x0b, 0x2f, 0x33, 0x72, 0x09, 0x40, 0x18, 0xd6, 0x28, 0x03, 0x49, + 0xad, 0x08, 0x35, 0x43, 0x85, 0x72, 0xfe, 0xe8, 0xe5, 0xc6, 0x39, 0xc2, 0x47, 0x12, 0x49, 0xb9, + 0xd2, 0xce, 0x98, 0x01, 0xa3, 0x2b, 0xb0, 0x44, 0xda, 0x4d, 0x3c, 0x65, 0xde, 0x6c, 0xe6, 0x6c, + 0xe5, 0x86, 0xd6, 0x70, 0xcb, 0x1e, 0x58, 0xac, 0xd5, 0x1c, 0xcb, 0x1c, 0x39, 0x23, 0x8e, 0x95, + 0x95, 0x58, 0xa5, 0x91, 0x33, 0x62, 0x58, 0xef, 0xc2, 0x39, 0x82, 0x35, 0x34, 0xc7, 0x63, 0xab, + 0xaf, 0xb2, 0xcc, 0x51, 0x64, 0x34, 0xb4, 0x86, 0x35, 0x9a, 0x17, 0x30, 0xbe, 0x01, 0xf1, 0xb1, + 0xe5, 0xee, 0xf1, 0x1b, 0x13, 0x62, 0xe6, 0x68, 0x5a, 0xee, 0x5e, 0xa0, 0xb2, 0x98, 0xa2, 0x90, + 0x3a, 0x8c, 0x2c, 0xbf, 0xeb, 0x3e, 0xef, 0x0a, 0x9f, 0x74, 0x89, 0xd5, 0x61, 0x64, 0xf9, 0xf8, + 0x79, 0x93, 0x3b, 0xa6, 0x97, 0x21, 0xc7, 0xb1, 0x58, 0xd1, 0xcb, 0x6c, 0xd8, 0x50, 0x1c, 0x56, + 0x64, 0x11, 0xf2, 0x1c, 0xc3, 0x0a, 0x0c, 0xb6, 0x38, 0xce, 0x52, 0x14, 0xe9, 0xa9, 0x89, 0xb2, + 0x88, 0xa3, 0x3c, 0xb6, 0xfa, 0xd4, 0x62, 0x13, 0x65, 0x55, 0x18, 0x4c, 0x60, 0xf9, 0x41, 0x8d, + 0x90, 0xc4, 0x6a, 0x4f, 0xd7, 0xc8, 0x17, 0x35, 0x5a, 0x91, 0x35, 0x6a, 0x87, 0x6b, 0xe4, 0xcb, + 0x1a, 0x9d, 0x95, 0x35, 0x6a, 0x4f, 0xd5, 0xc8, 0x0f, 0x6a, 0x74, 0x4e, 0x29, 0x4b, 0xd4, 0xa8, + 0x05, 0xe7, 0x29, 0x56, 0x6f, 0xdc, 0x75, 0x7d, 0xbf, 0x3b, 0xb4, 0x7b, 0xae, 0x43, 0xd4, 0xa3, + 0x3b, 0xbe, 0x7f, 0x97, 0xda, 0x6f, 0x5c, 0x45, 0xea, 0x96, 0xdf, 0x2e, 0x37, 0xb1, 0xef, 0xd7, + 0x04, 0x46, 0xf3, 0xfe, 0x5d, 0x7c, 0x8e, 0xf0, 0xea, 0x8d, 0xa7, 0xc0, 0x0b, 0x98, 0x3e, 0xb8, + 0x4b, 0xad, 0xbe, 0xe3, 0x99, 0x3e, 0x98, 0xcf, 0xf4, 0xc1, 0x42, 0xa6, 0xf7, 0xa9, 0x99, 0xb8, + 0x80, 0xe9, 0xfd, 0xf9, 0x4c, 0xef, 0x2f, 0x62, 0xfa, 0x80, 0x9a, 0x94, 0x0b, 0x98, 0x3e, 0x98, + 0xcf, 0xf4, 0x01, 0xba, 0x0e, 0x5a, 0xdf, 0xf6, 0x9e, 0x86, 0xa6, 0x86, 0x02, 0x95, 0xfd, 0x12, + 0x81, 0x2b, 0x73, 0xc3, 0x35, 0x58, 0xa6, 0x98, 0xca, 0xac, 0x7c, 0x81, 0xcd, 0x21, 0x04, 0xdc, + 0x11, 0x33, 0x33, 0xfa, 0x0c, 0x0a, 0xa2, 0x9a, 0x26, 0xb5, 0xf5, 0xba, 0x3d, 0x67, 0x34, 0xb2, + 0x7a, 0x6c, 0x23, 0xf8, 0x22, 0xad, 0xe7, 0x85, 0xa3, 0x97, 0x1b, 0xaf, 0xb3, 0x7a, 0x32, 0x7b, + 0xb0, 0x1c, 0xa0, 0xe0, 0xd7, 0x59, 0x4d, 0x67, 0x32, 0x50, 0x17, 0x2e, 0x09, 0xce, 0x74, 0x6a, + 0x78, 0x66, 0xda, 0x7e, 0x88, 0xf9, 0x25, 0xca, 0xfc, 0xd2, 0xd1, 0xcb, 0x8d, 0xf3, 0x8c, 0x39, + 0x99, 0x08, 0x9e, 0x98, 0xb6, 0xaf, 0xb2, 0x3f, 0xcf, 0xd8, 0xcf, 0xc9, 0x62, 0x3b, 0x91, 0x4e, + 0xcf, 0xf2, 0x3c, 0xcb, 0x5b, 0x5b, 0x27, 0x73, 0x17, 0x0e, 0x00, 0xc4, 0x8e, 0xf2, 0x0f, 0x5c, + 0xcb, 0xec, 0x7b, 0x6b, 0x1b, 0x34, 0x4f, 0x24, 0xd1, 0x57, 0x60, 0x8d, 0x4e, 0xaf, 0xce, 0xb3, + 0xee, 0xd8, 0xb5, 0x3c, 0x6f, 0xe2, 0x92, 0x46, 0x4f, 0x46, 0xbe, 0xe5, 0xae, 0x5d, 0xa6, 0x32, + 0x22, 0x53, 0x47, 0xd5, 0x79, 0xd6, 0xe4, 0xb9, 0x65, 0x96, 0x89, 0x3e, 0x86, 0x0b, 0x74, 0x4e, + 0xb1, 0xfa, 0xf6, 0x64, 0x38, 0x4b, 0xfb, 0x06, 0xa5, 0x25, 0xbc, 0x6b, 0x14, 0x63, 0x9a, 0xbc, + 0x04, 0x97, 0x08, 0x79, 0xcf, 0xb5, 0x7d, 0xbb, 0x67, 0x0e, 0x66, 0x19, 0x14, 0x29, 0x83, 0xc2, + 0xd0, 0x1a, 0x96, 0x39, 0xce, 0x34, 0x8b, 0x1f, 0x84, 0x75, 0x2a, 0x53, 0xb6, 0x4d, 0x47, 0xa4, + 0xe9, 0xbb, 0xce, 0x80, 0x1a, 0x1b, 0x6c, 0x7e, 0x5a, 0x7b, 0x33, 0xb4, 0x75, 0x7f, 0xdc, 0x7e, + 0x1e, 0x5f, 0x66, 0x2f, 0x10, 0xe1, 0x1e, 0xb7, 0xe5, 0xc7, 0x57, 0x21, 0xdf, 0xf1, 0xcd, 0x01, + 0xd7, 0xa0, 0x2b, 0x72, 0x15, 0x6a, 0x13, 0x68, 0x68, 0xa6, 0x65, 0x78, 0x43, 0x6b, 0xe8, 0x3d, + 0xe3, 0xd8, 0x57, 0xe5, 0x4c, 0x4b, 0xb1, 0x6b, 0x24, 0x8b, 0x91, 0xdc, 0x81, 0xb3, 0x84, 0xc4, + 0x73, 0xf6, 0xfc, 0x90, 0x2a, 0x5f, 0xa3, 0x14, 0x67, 0x86, 0xd6, 0xb0, 0xe5, 0xec, 0xf9, 0x61, + 0x6d, 0xa6, 0xa2, 0x33, 0x7b, 0x07, 0x62, 0x1e, 0x7f, 0x4b, 0xd6, 0xa5, 0x4c, 0xa0, 0xa1, 0xb5, + 0xc1, 0x7b, 0x66, 0x8e, 0x39, 0xda, 0x75, 0xb9, 0x36, 0xb4, 0x9e, 0x99, 0x63, 0x86, 0x75, 0x8f, + 0xd5, 0x78, 0x32, 0xb2, 0x0e, 0xed, 0x1e, 0xbd, 0x45, 0xc9, 0x91, 0x6f, 0x50, 0xe4, 0x95, 0xa1, + 0x35, 0xec, 0x04, 0x79, 0x8c, 0xe6, 0x07, 0x60, 0x85, 0x48, 0xde, 0x1b, 0x71, 0x03, 0x93, 0x8b, + 0xfb, 0xed, 0xd0, 0x5a, 0x11, 0xb6, 0x66, 0x37, 0xcf, 0x1d, 0xbd, 0xdc, 0x38, 0x53, 0xb7, 0xfc, + 0x30, 0x18, 0x9f, 0x19, 0x59, 0x7e, 0x6b, 0x14, 0xda, 0xaa, 0xa9, 0xf0, 0xd1, 0xaa, 0x70, 0xbe, + 0x49, 0x3b, 0xf2, 0x5c, 0x70, 0xef, 0xef, 0xe9, 0x4c, 0xf7, 0xd1, 0x31, 0xaf, 0x70, 0xa9, 0x81, + 0xb6, 0x3b, 0x78, 0x6a, 0x3b, 0x2a, 0x9b, 0x5b, 0xb4, 0x82, 0x45, 0x71, 0x8e, 0xbe, 0xef, 0x3a, + 0x93, 0x31, 0xb5, 0xf5, 0x36, 0x09, 0xe6, 0x6d, 0xa5, 0x5a, 0xcb, 0x94, 0x36, 0x00, 0x14, 0xff, + 0x20, 0x0e, 0x79, 0x61, 0xb4, 0x75, 0x3c, 0x73, 0xdf, 0x42, 0x25, 0xc8, 0x88, 0x9b, 0x9c, 0xe2, + 0x22, 0xee, 0xf4, 0x69, 0x19, 0x45, 0x94, 0xf7, 0x00, 0x85, 0x39, 0x27, 0xa9, 0xd0, 0x4d, 0x48, + 0x50, 0x4d, 0xe1, 0x97, 0x1d, 0x8e, 0xb9, 0x75, 0xc2, 0x70, 0x0a, 0xdf, 0x8b, 0x41, 0x5a, 0xb0, + 0x42, 0x9f, 0x40, 0x3e, 0xb8, 0x80, 0x3a, 0xda, 0x73, 0xf8, 0x15, 0x81, 0x95, 0x39, 0x57, 0x0f, + 0xc5, 0xc9, 0x94, 0xa5, 0x5e, 0x60, 0x7d, 0x0f, 0x32, 0xfc, 0x08, 0xcd, 0xea, 0x2f, 0x2e, 0x3d, + 0xc0, 0x43, 0x0f, 0x00, 0x14, 0x61, 0xc6, 0xe6, 0x1e, 0xb2, 0x29, 0x32, 0x54, 0x90, 0xd1, 0xd7, + 0x21, 0x27, 0x6f, 0x8d, 0x74, 0xe9, 0x91, 0x42, 0x74, 0xfe, 0xc7, 0x8d, 0x9b, 0x2b, 0x7c, 0x43, + 0x5d, 0xfd, 0x62, 0x12, 0x67, 0x25, 0xb1, 0xd1, 0x47, 0x9f, 0x40, 0xc2, 0xa7, 0x7b, 0x0c, 0xec, + 0xb2, 0x46, 0x71, 0xa1, 0xd0, 0x6f, 0xb7, 0x4d, 0xef, 0xa9, 0x14, 0x24, 0x21, 0x2b, 0xfc, 0xa3, + 0x08, 0xc4, 0x09, 0x74, 0xc1, 0xd1, 0xf1, 0x0d, 0xba, 0xc3, 0xcf, 0x6e, 0x2f, 0x8a, 0x93, 0x0d, + 0xf6, 0x45, 0xe8, 0xcc, 0x86, 0xff, 0x97, 0xba, 0x3d, 0x14, 0x1c, 0xe0, 0xc5, 0x17, 0x1c, 0xe0, + 0x15, 0xff, 0xfa, 0x0a, 0x2c, 0x85, 0x4d, 0xae, 0x53, 0x79, 0x09, 0x97, 0x43, 0x9f, 0x00, 0x06, + 0x28, 0x12, 0x4a, 0x3c, 0xfc, 0xde, 0x8b, 0xde, 0x40, 0x7a, 0x2f, 0x3c, 0x85, 0x3e, 0x80, 0xd7, + 0x3d, 0xdf, 0x1c, 0x10, 0x0b, 0x96, 0x41, 0xba, 0x7b, 0xae, 0x33, 0xf2, 0xad, 0x51, 0x9f, 0xbb, + 0x31, 0xe7, 0x78, 0x76, 0x99, 0xe6, 0x6e, 0xf1, 0x4c, 0xf4, 0x3e, 0xac, 0x4e, 0xd1, 0xed, 0x12, + 0x23, 0x6b, 0xd4, 0xe7, 0x67, 0x17, 0x67, 0x43, 0x64, 0x9b, 0x2c, 0x8f, 0xf8, 0xc5, 0xf6, 0xc8, + 0xf3, 0xdd, 0x09, 0x5f, 0x03, 0x99, 0x5d, 0x1f, 0x82, 0xa1, 0x1b, 0xa0, 0xb1, 0x89, 0xce, 0xb5, + 0xf6, 0x2c, 0x97, 0xf8, 0x5f, 0x1e, 0x3f, 0xdb, 0x58, 0xa6, 0x70, 0x2c, 0xc1, 0xe8, 0x0d, 0xc8, + 0x31, 0xd4, 0xa1, 0x4d, 0x57, 0xc1, 0x34, 0x33, 0xd6, 0x28, 0xac, 0x46, 0x41, 0xa8, 0x00, 0xe9, + 0x5d, 0xd7, 0x1c, 0xf5, 0x0e, 0x2c, 0x7e, 0xc6, 0x81, 0x65, 0x1a, 0xbd, 0x09, 0x79, 0xf6, 0x5f, + 0xd0, 0x73, 0x7b, 0x9b, 0x01, 0x39, 0x83, 0x4b, 0x00, 0xbb, 0x13, 0x8f, 0x37, 0x92, 0xdb, 0xda, + 0x99, 0xdd, 0x89, 0xc7, 0x1a, 0x46, 0xb2, 0x5d, 0x6b, 0x4f, 0x64, 0x33, 0xeb, 0x3a, 0xe3, 0x5a, + 0x7b, 0x3c, 0xfb, 0x06, 0x10, 0x6f, 0xa8, 0xdb, 0x1b, 0x38, 0xbd, 0xa7, 0xd4, 0xb2, 0x8e, 0x30, + 0xc7, 0xb7, 0xdc, 0xec, 0x94, 0x09, 0x0c, 0xa7, 0x7b, 0xe3, 0x09, 0xfd, 0x47, 0x38, 0x11, 0x6d, + 0xe5, 0xb8, 0xc4, 0xa0, 0x8e, 0xe0, 0x0c, 0x81, 0xb0, 0xec, 0x0d, 0xc8, 0x8e, 0xcd, 0x7d, 0xab, + 0x4b, 0x0f, 0x4a, 0xa4, 0x31, 0x4d, 0x40, 0xf4, 0x66, 0x2d, 0x15, 0xc6, 0xd0, 0x1e, 0x39, 0xae, + 0xc0, 0xe0, 0xb6, 0x34, 0x85, 0x29, 0x28, 0xe6, 0x0f, 0x06, 0x28, 0x67, 0x38, 0x0a, 0x81, 0x71, + 0x14, 0x22, 0x7d, 0xd2, 0xc5, 0xcf, 0xfd, 0xae, 0xf7, 0xcc, 0xf6, 0xa9, 0xdc, 0x10, 0x97, 0x3e, + 0x83, 0xb7, 0x38, 0x18, 0x7d, 0x08, 0x4b, 0xa4, 0x6d, 0x43, 0x7b, 0xdf, 0xe5, 0x07, 0xe7, 0xd4, + 0x9e, 0x96, 0xee, 0x57, 0x4d, 0x66, 0x50, 0xf7, 0x2b, 0x48, 0x92, 0x42, 0xcc, 0x81, 0xbd, 0x4f, + 0xbf, 0x34, 0x10, 0x75, 0x61, 0x86, 0xf6, 0xb2, 0x84, 0x07, 0xf5, 0xb1, 0x86, 0x93, 0x01, 0xbb, + 0x2f, 0xc0, 0x51, 0x99, 0xb9, 0xbd, 0x2c, 0xe1, 0x1c, 0xf5, 0x1a, 0x2c, 0x0f, 0xde, 0xed, 0xf6, + 0x99, 0x46, 0x0c, 0x1c, 0x62, 0xfa, 0xac, 0xb2, 0x55, 0x72, 0xf0, 0x6e, 0x85, 0x42, 0xab, 0x04, + 0x48, 0x56, 0xec, 0x30, 0x9e, 0xe8, 0xfe, 0xd7, 0xd9, 0x8a, 0xad, 0x62, 0x73, 0x25, 0xb8, 0x0e, + 0x5a, 0x40, 0xe2, 0xf9, 0x8e, 0x6b, 0xb1, 0x0d, 0xd4, 0x38, 0x5e, 0x12, 0xd8, 0x2d, 0x0a, 0x45, + 0xef, 0xc1, 0xea, 0x14, 0xa6, 0xe0, 0x7e, 0x9e, 0xad, 0xae, 0x21, 0x7c, 0xce, 0xfe, 0x2e, 0x9c, + 0x0d, 0x88, 0xc6, 0x44, 0xef, 0x99, 0xe0, 0x0b, 0xe1, 0x0a, 0x35, 0x65, 0x0e, 0x7a, 0x00, 0xe7, + 0x67, 0x29, 0x44, 0x49, 0xcc, 0xd2, 0x5d, 0x9d, 0x26, 0xe3, 0x85, 0x31, 0x31, 0xd9, 0xaa, 0x98, + 0x2e, 0x0a, 0x31, 0x19, 0x33, 0x62, 0xb2, 0x67, 0xc5, 0x74, 0x49, 0xd4, 0xca, 0x98, 0x16, 0x13, + 0x6b, 0x87, 0x3d, 0xd3, 0x8e, 0xf5, 0x30, 0xc5, 0x4c, 0x3b, 0xec, 0xf9, 0xed, 0xd8, 0x10, 0xed, + 0x30, 0xe6, 0xb5, 0xe3, 0x06, 0x64, 0x06, 0x83, 0x1e, 0x6f, 0x01, 0x35, 0x5c, 0xd9, 0xd0, 0xaa, + 0x56, 0xcb, 0xb4, 0x01, 0x38, 0x3d, 0x18, 0xf4, 0x58, 0x53, 0x1e, 0xc0, 0xb2, 0x40, 0x15, 0xbc, + 0xdf, 0x08, 0x54, 0x95, 0x13, 0x30, 0xb6, 0x38, 0xcf, 0xa9, 0x78, 0x29, 0xb7, 0x00, 0x08, 0x29, + 0xef, 0x73, 0x6a, 0xa2, 0xb2, 0xfd, 0x8e, 0x6a, 0xb5, 0xcc, 0xba, 0x1c, 0x93, 0x6a, 0xf0, 0xde, + 0xff, 0x2a, 0x68, 0x12, 0x5b, 0x94, 0xf4, 0x26, 0xa5, 0x41, 0x47, 0x2f, 0x37, 0x96, 0x04, 0x0d, + 0x2f, 0x6a, 0x49, 0x10, 0xf2, 0xb2, 0x3e, 0x04, 0x02, 0x51, 0x05, 0x77, 0x25, 0x54, 0xcb, 0x40, + 0x6e, 0xb4, 0x96, 0x8a, 0x18, 0x75, 0x58, 0x51, 0x29, 0x45, 0xd1, 0xd4, 0x04, 0x65, 0x76, 0x98, + 0x42, 0xce, 0x4b, 0x3f, 0xa3, 0xb0, 0x08, 0x1a, 0xdb, 0xf7, 0x07, 0xbb, 0x5c, 0xa6, 0xd7, 0x82, + 0xc6, 0x56, 0xda, 0xd5, 0x4d, 0x26, 0xd4, 0x0c, 0x41, 0x60, 0x52, 0xfd, 0x2a, 0x68, 0x12, 0x5b, + 0x94, 0xf8, 0x56, 0xd0, 0x58, 0x41, 0x23, 0x1a, 0x2b, 0x08, 0x79, 0x59, 0x77, 0x20, 0x4b, 0xa9, + 0xb9, 0x64, 0xa9, 0xa1, 0xca, 0x6e, 0xe9, 0x10, 0x42, 0x2e, 0x5a, 0x5a, 0x1d, 0x2e, 0xdb, 0x4f, + 0xe1, 0x4c, 0x40, 0x20, 0xca, 0xa3, 0x26, 0x2b, 0xdb, 0xb3, 0x91, 0x64, 0xbc, 0xc0, 0x65, 0x49, + 0xcb, 0x4b, 0xfc, 0x08, 0x28, 0x48, 0x95, 0xef, 0xdb, 0xe1, 0xea, 0x2a, 0x02, 0xa6, 0xd5, 0x55, + 0x24, 0xbc, 0x03, 0x67, 0x43, 0xc4, 0xa2, 0x02, 0x37, 0x29, 0x07, 0xba, 0x83, 0xa6, 0x72, 0xe0, + 0x75, 0x40, 0x2a, 0x97, 0x40, 0xc8, 0x76, 0x20, 0xe4, 0x5b, 0x81, 0x90, 0x8d, 0x40, 0xc8, 0xb6, + 0x2a, 0x64, 0x7b, 0x5a, 0xc8, 0xef, 0x04, 0xb5, 0x36, 0xa6, 0x84, 0x6c, 0x87, 0x85, 0xfc, 0x06, + 0xf0, 0xc5, 0x8c, 0x97, 0x76, 0x9b, 0x4d, 0xf8, 0x0c, 0xc6, 0x0a, 0xb8, 0x05, 0x48, 0x41, 0x11, + 0x45, 0xdc, 0xa1, 0x88, 0x5a, 0x80, 0x18, 0xac, 0x86, 0x23, 0xa7, 0x2f, 0xe6, 0x8d, 0xbb, 0x6c, + 0xb9, 0x23, 0x10, 0xc6, 0xec, 0x3a, 0x68, 0x32, 0x5b, 0xb0, 0x7a, 0x97, 0xcd, 0x93, 0x02, 0x89, + 0x33, 0xda, 0x80, 0x2c, 0xc5, 0xe4, 0xdd, 0x7f, 0x8f, 0xef, 0xc4, 0x38, 0x7d, 0x31, 0x91, 0xbe, + 0x0d, 0x67, 0x02, 0x04, 0xc1, 0xeb, 0x3d, 0x36, 0xf3, 0x4b, 0x34, 0xce, 0xec, 0x2d, 0xa0, 0x20, + 0xb5, 0x67, 0xdf, 0x0f, 0x4a, 0x55, 0x7a, 0xf1, 0x2e, 0x9c, 0x0d, 0x21, 0x0a, 0xbe, 0xf7, 0xd9, + 0x04, 0xa5, 0x62, 0x33, 0xd6, 0xc5, 0x43, 0x48, 0xf1, 0x23, 0x78, 0xf4, 0x01, 0xa4, 0xcd, 0x7d, + 0xb2, 0x62, 0xc9, 0x6b, 0xce, 0xd3, 0x97, 0xfe, 0xe9, 0xc6, 0x3c, 0x4f, 0xe0, 0x14, 0x45, 0x36, + 0xa6, 0xec, 0xc5, 0xe8, 0xe9, 0xec, 0xc5, 0xe2, 0xcf, 0x22, 0x48, 0xd0, 0xf8, 0x26, 0x3c, 0xa8, + 0x40, 0x24, 0x14, 0xa6, 0x82, 0x47, 0x3e, 0x99, 0x31, 0x4d, 0xbf, 0x3e, 0xf5, 0x99, 0x57, 0x34, + 0x64, 0x74, 0xab, 0x9f, 0x79, 0x49, 0xa3, 0xfb, 0xd8, 0x4f, 0xbd, 0x1e, 0x2a, 0xcd, 0x8d, 0x85, + 0x83, 0x64, 0xf0, 0xe6, 0x2e, 0x73, 0x1e, 0xb3, 0x4d, 0x56, 0x3f, 0xd4, 0x88, 0x9f, 0xfc, 0xa1, + 0xc6, 0x69, 0xbf, 0x79, 0x33, 0x20, 0xa7, 0x7c, 0x84, 0x47, 0xcc, 0xc7, 0xd8, 0xfc, 0xaf, 0xf0, + 0x64, 0xeb, 0x02, 0x98, 0x87, 0xb3, 0xc1, 0x67, 0x78, 0xd3, 0xdf, 0x7c, 0xa4, 0x4e, 0x7d, 0xf5, + 0xfc, 0x2a, 0xc4, 0x26, 0xee, 0x80, 0x5f, 0xb6, 0x04, 0x71, 0xb2, 0x81, 0xab, 0xec, 0x13, 0xa0, + 0x0e, 0xae, 0x62, 0x92, 0x3f, 0x27, 0x6c, 0x45, 0xe6, 0x15, 0xc2, 0x56, 0xcc, 0xbb, 0x26, 0x09, + 0x5f, 0xea, 0x9a, 0x64, 0xf0, 0x81, 0x49, 0xf6, 0xa4, 0x0f, 0x4c, 0x7e, 0x29, 0x0f, 0x19, 0x19, + 0x2a, 0x06, 0xdd, 0x0f, 0x7d, 0x5f, 0x72, 0x41, 0xd5, 0xbb, 0xdb, 0x12, 0x6b, 0xf6, 0xd6, 0xda, + 0x7d, 0xe2, 0xe6, 0x4c, 0x46, 0x3d, 0x71, 0x6f, 0xed, 0xd2, 0x31, 0x84, 0x55, 0x8a, 0x84, 0x39, + 0x32, 0xfa, 0x10, 0x52, 0xec, 0x1a, 0xa5, 0xb8, 0xba, 0xb7, 0x7e, 0x0c, 0x1d, 0xbb, 0xad, 0x68, + 0x61, 0x81, 0x8e, 0x3e, 0x81, 0xcc, 0x64, 0x24, 0x68, 0xe3, 0xa1, 0xef, 0xd2, 0xa7, 0x69, 0x3b, + 0x02, 0x0f, 0x07, 0x24, 0xa4, 0xc2, 0x3d, 0x7a, 0x87, 0x84, 0xdf, 0x6a, 0x3b, 0xae, 0xc2, 0xec, + 0xa2, 0x09, 0xe6, 0xc8, 0xa4, 0xc2, 0x7d, 0xcb, 0xf3, 0x5d, 0xe7, 0x05, 0xbf, 0xb8, 0x7c, 0x5c, + 0x85, 0x2b, 0x0c, 0x0b, 0x0b, 0x74, 0xa4, 0x43, 0x8e, 0x35, 0xba, 0x4b, 0x37, 0x23, 0xf8, 0x5d, + 0xdf, 0xe2, 0x42, 0x39, 0x6d, 0x13, 0x4c, 0x9c, 0x1d, 0x04, 0x09, 0xb4, 0x03, 0x79, 0x56, 0x95, + 0x2e, 0xbf, 0x19, 0x99, 0x0e, 0x7d, 0x7a, 0x30, 0xbf, 0xfa, 0xfc, 0xbe, 0x64, 0xae, 0xa7, 0xa4, + 0xd0, 0x23, 0x58, 0xe2, 0x75, 0x13, 0xac, 0x32, 0xa1, 0x73, 0xb2, 0x63, 0x5a, 0xc4, 0x79, 0xe5, + 0xfb, 0x6a, 0x92, 0xb4, 0x8e, 0x57, 0x6b, 0x97, 0xba, 0x31, 0xb0, 0xb0, 0x75, 0xac, 0x56, 0x9b, + 0xd4, 0x11, 0xca, 0xf6, 0x82, 0x04, 0x69, 0x9d, 0xa8, 0x13, 0xe3, 0x93, 0x5d, 0xd8, 0x3a, 0x5e, + 0x25, 0xc6, 0x28, 0xd7, 0x57, 0x52, 0x7c, 0xf6, 0xcc, 0x85, 0xbe, 0x09, 0x52, 0x02, 0x22, 0xa9, + 0x77, 0x1c, 0x0b, 0x9f, 0x40, 0x92, 0xc9, 0x1b, 0xbd, 0xcf, 0x7d, 0x31, 0x32, 0xf2, 0xc4, 0x56, + 0xcf, 0xb2, 0xba, 0x2b, 0x10, 0xec, 0xb2, 0x50, 0x17, 0x8d, 0xa4, 0xbd, 0xc2, 0xff, 0x03, 0x59, + 0xa5, 0xbf, 0xd0, 0x7d, 0x48, 0x8b, 0x19, 0xe7, 0xe4, 0xcd, 0x1a, 0x89, 0x8a, 0x1e, 0xf0, 0xb2, + 0x99, 0x7a, 0x44, 0x43, 0x1f, 0x82, 0x90, 0xb2, 0xb7, 0xc5, 0x1e, 0x96, 0x5a, 0x01, 0x0a, 0x2c, + 0x7c, 0x42, 0x16, 0x2b, 0xa6, 0xd7, 0xa1, 0xf9, 0x35, 0x72, 0xba, 0xf9, 0xb5, 0xf0, 0x35, 0xc8, + 0xc8, 0x41, 0xf2, 0xe5, 0x38, 0x3c, 0x80, 0x24, 0xeb, 0x54, 0x74, 0x07, 0x52, 0x4c, 0x9d, 0x4e, + 0x20, 0x16, 0x58, 0x85, 0x87, 0x90, 0xe2, 0xfd, 0xf8, 0xea, 0xb4, 0x3f, 0x1a, 0x81, 0x9c, 0xaa, + 0xe2, 0xe8, 0x1d, 0xe5, 0xc8, 0x38, 0x7a, 0x3c, 0x03, 0x71, 0x50, 0xfc, 0x08, 0xb2, 0xbe, 0xe9, + 0xee, 0x5b, 0x7e, 0x57, 0xf9, 0x7e, 0xe0, 0x55, 0xee, 0xec, 0x02, 0x23, 0x27, 0x90, 0xc2, 0x27, + 0x90, 0x0f, 0x8d, 0x11, 0x52, 0x19, 0x3e, 0xb2, 0x16, 0x57, 0x86, 0x21, 0x15, 0xbe, 0x0a, 0x59, + 0x65, 0x60, 0xbc, 0x62, 0x53, 0x0a, 0x1f, 0x41, 0x4e, 0x1d, 0x0e, 0xe8, 0x26, 0x24, 0xd8, 0x10, + 0x5a, 0x48, 0xcd, 0x70, 0x8a, 0xbf, 0x18, 0x39, 0xe6, 0xca, 0x77, 0xb5, 0xd4, 0xa9, 0x97, 0x77, + 0xd8, 0x17, 0x6a, 0xec, 0x7f, 0x77, 0x1b, 0x37, 0x3a, 0x4d, 0x2d, 0x49, 0x50, 0xd9, 0x17, 0x81, + 0xba, 0x16, 0x45, 0x79, 0xc8, 0x74, 0xea, 0x22, 0x19, 0xa3, 0x1f, 0x34, 0x63, 0xbd, 0xd4, 0xd6, + 0xb5, 0x38, 0xfb, 0xd2, 0xb9, 0xd5, 0xc6, 0x8d, 0xcf, 0xb5, 0x04, 0x3a, 0x03, 0x79, 0x96, 0xd1, + 0x7d, 0xdc, 0xa8, 0x76, 0x6a, 0xba, 0x96, 0x42, 0x08, 0x96, 0x78, 0xbe, 0x80, 0xa5, 0x49, 0x69, + 0x1c, 0x8d, 0x5d, 0xea, 0xcd, 0x10, 0x42, 0x81, 0xc5, 0x40, 0xc0, 0x3f, 0x91, 0xfb, 0xed, 0x28, + 0xe4, 0x8c, 0xd1, 0xa1, 0xe5, 0x7a, 0x16, 0xb3, 0x9b, 0xee, 0x2c, 0xb0, 0x9b, 0xa4, 0xe5, 0xc2, + 0x01, 0xd4, 0x78, 0xe2, 0x4b, 0x7b, 0xf4, 0x84, 0xa5, 0x7d, 0xda, 0xc6, 0x8a, 0x7d, 0x1f, 0x36, + 0x96, 0x6a, 0x52, 0xc6, 0x5f, 0xc1, 0xa4, 0x2c, 0xcf, 0x98, 0x17, 0x09, 0x5a, 0x8b, 0xf9, 0xe6, + 0x85, 0xd8, 0x2f, 0x9f, 0x32, 0x32, 0x42, 0x03, 0x3c, 0x79, 0x4a, 0xbb, 0xf4, 0x28, 0x0e, 0x69, + 0x31, 0x03, 0x2e, 0xd8, 0x4e, 0xfd, 0x00, 0x52, 0x6c, 0x02, 0x3d, 0x66, 0x4f, 0x75, 0x89, 0x8b, + 0x86, 0x47, 0xdd, 0xc3, 0x49, 0x3a, 0x8b, 0x7e, 0x7f, 0x46, 0x67, 0xa8, 0x3d, 0xf1, 0x53, 0x9a, + 0x94, 0x77, 0x94, 0x49, 0x3a, 0x11, 0xba, 0x72, 0xa3, 0x4e, 0xd2, 0xca, 0xf4, 0x2c, 0x02, 0x38, + 0x24, 0x95, 0x00, 0x0e, 0xaf, 0x16, 0x8b, 0xe1, 0x3e, 0xe4, 0x0e, 0x68, 0x84, 0x96, 0x2e, 0x8d, + 0xdc, 0x35, 0x15, 0x8b, 0x41, 0x09, 0xde, 0x82, 0xb3, 0x07, 0x4a, 0xf0, 0x9d, 0xd0, 0xf7, 0xa7, + 0x99, 0xd3, 0x85, 0x52, 0x08, 0x76, 0x9d, 0x61, 0x71, 0x34, 0x03, 0x25, 0xe2, 0x42, 0xf6, 0x74, + 0x11, 0x17, 0xee, 0x41, 0xf6, 0xa9, 0x3d, 0x18, 0x74, 0xc7, 0x34, 0xce, 0x09, 0x5f, 0x61, 0x85, + 0x79, 0x19, 0x04, 0x40, 0xc1, 0xf0, 0x34, 0x08, 0x86, 0x72, 0x0d, 0x12, 0xac, 0xc9, 0xf9, 0xd0, + 0x07, 0x52, 0x32, 0x9e, 0x0b, 0x66, 0xd9, 0xc5, 0xaf, 0x42, 0x3e, 0xb4, 0xd2, 0xd1, 0x63, 0x13, + 0x7a, 0x00, 0xb0, 0x70, 0x29, 0x66, 0x38, 0xc5, 0x7f, 0x97, 0x38, 0x71, 0xb7, 0xff, 0xcb, 0xaa, + 0xe7, 0x5f, 0xe4, 0xd8, 0xdf, 0x0c, 0x47, 0x14, 0x89, 0x87, 0x04, 0xa8, 0xf8, 0x32, 0x4b, 0x0b, + 0xa2, 0x89, 0xa8, 0xc3, 0x25, 0xf1, 0x8a, 0xc3, 0xe5, 0x1a, 0x8d, 0x31, 0xe8, 0x5b, 0x6b, 0x49, + 0xba, 0xda, 0x69, 0x8a, 0x04, 0x5a, 0x04, 0x8e, 0x59, 0x76, 0x78, 0x58, 0xa5, 0x4e, 0x39, 0xac, + 0xde, 0x53, 0x62, 0x00, 0xa5, 0x43, 0x5e, 0x9a, 0xe0, 0x3f, 0x11, 0xc7, 0x78, 0x41, 0x70, 0xa0, + 0xaf, 0xc1, 0x0a, 0xfb, 0xdf, 0x9d, 0x8c, 0xfb, 0xc4, 0x86, 0x64, 0xf5, 0xcb, 0x50, 0x17, 0x64, + 0xb6, 0x7e, 0x67, 0x18, 0x72, 0x87, 0xe2, 0x52, 0x10, 0xda, 0x04, 0x14, 0xe6, 0x30, 0x99, 0xd8, + 0xec, 0xf3, 0xb4, 0x1c, 0xbb, 0x2c, 0xd5, 0x52, 0x48, 0x3a, 0x1d, 0xa3, 0x82, 0x35, 0x95, 0x49, + 0x67, 0x62, 0xf7, 0x4f, 0x1b, 0x78, 0xee, 0xcb, 0x44, 0x29, 0x09, 0x0d, 0xe1, 0xfc, 0xe9, 0x86, + 0xb0, 0x08, 0xb9, 0xb3, 0x14, 0x84, 0xdc, 0x29, 0xd6, 0x60, 0xb5, 0x4d, 0x2f, 0xce, 0x32, 0x71, + 0xd3, 0x93, 0x62, 0xe6, 0xb6, 0x7d, 0x19, 0xa3, 0xad, 0x78, 0x11, 0xe2, 0x44, 0x16, 0x41, 0xcc, + 0x1f, 0x32, 0x60, 0x72, 0xe2, 0x43, 0xd5, 0xdf, 0x8d, 0xaa, 0x7e, 0xe1, 0x74, 0x20, 0x99, 0xc8, + 0x97, 0x0c, 0x24, 0xa3, 0xae, 0x7c, 0xd1, 0x57, 0x58, 0xf9, 0xee, 0x42, 0x9c, 0xba, 0xc3, 0x6c, + 0xe4, 0xad, 0xce, 0x77, 0x08, 0xc4, 0x58, 0xb7, 0x59, 0x74, 0x81, 0xfc, 0xc0, 0xf4, 0x2d, 0xcf, + 0xef, 0xb2, 0xae, 0xe6, 0x27, 0x91, 0xab, 0xd3, 0xce, 0x40, 0x48, 0x29, 0x73, 0x8c, 0x84, 0xc1, + 0xd0, 0x87, 0x8a, 0x36, 0x27, 0x42, 0x01, 0x98, 0xe6, 0x53, 0x07, 0x2a, 0xfd, 0x0e, 0xc4, 0xa9, + 0x0a, 0x26, 0x69, 0x99, 0x59, 0xb1, 0x3c, 0x77, 0x8c, 0x8a, 0x12, 0xab, 0x89, 0xe8, 0x21, 0x45, + 0x2b, 0xfe, 0x44, 0x14, 0x96, 0xa7, 0x58, 0x12, 0x89, 0x3b, 0x02, 0x34, 0x2b, 0x71, 0xd5, 0x97, + 0xa1, 0x12, 0x57, 0x00, 0x38, 0x2b, 0x09, 0x8d, 0x3e, 0x7a, 0x57, 0x8c, 0x77, 0x66, 0xdd, 0x9e, + 0x9b, 0xd7, 0x02, 0x4b, 0x89, 0x2c, 0x4a, 0x3f, 0x31, 0x4e, 0x0d, 0x2d, 0xcf, 0x33, 0xf7, 0xc5, + 0x17, 0x85, 0x22, 0x89, 0xb6, 0x60, 0xa5, 0xe7, 0x10, 0x6b, 0xcb, 0xb7, 0xfa, 0xdd, 0x53, 0xae, + 0xba, 0x48, 0x52, 0x60, 0x39, 0x4f, 0xdc, 0xe0, 0xf2, 0x61, 0x4b, 0x6f, 0x48, 0x3e, 0xe9, 0x29, + 0xd9, 0xbc, 0x8c, 0xc2, 0x32, 0x5d, 0x29, 0x98, 0x5c, 0xf8, 0xf6, 0xc6, 0xc9, 0x11, 0x0c, 0xe5, + 0xf7, 0x74, 0x53, 0x11, 0x22, 0xd6, 0x55, 0xec, 0x80, 0xe7, 0x6c, 0x04, 0xc3, 0x07, 0xa1, 0x08, + 0x86, 0x17, 0x8e, 0x21, 0x9b, 0x1b, 0xc7, 0xf0, 0x3e, 0x0b, 0xcf, 0x16, 0x0f, 0x7d, 0x1f, 0x3b, + 0x4d, 0x39, 0x1b, 0x48, 0xf0, 0x5a, 0x10, 0x48, 0xf0, 0x02, 0x64, 0xac, 0xe7, 0xf4, 0xe6, 0x50, + 0x9f, 0x35, 0x33, 0x41, 0x6c, 0x11, 0xdb, 0x2f, 0x3b, 0x7d, 0xab, 0xf0, 0x16, 0x8f, 0x18, 0xb8, + 0x01, 0x59, 0x3e, 0xed, 0x49, 0xb4, 0x3c, 0x3b, 0x8c, 0x9f, 0x78, 0x14, 0xf1, 0x4d, 0x16, 0x24, + 0xf0, 0x22, 0x64, 0xbc, 0x49, 0xaf, 0x67, 0x59, 0x7d, 0x8b, 0xe9, 0x51, 0x1a, 0x07, 0x80, 0xe2, + 0x9f, 0x2e, 0x01, 0x04, 0xb3, 0xb3, 0xba, 0x46, 0x46, 0x5e, 0x65, 0x8d, 0xbc, 0x16, 0xd6, 0xb3, + 0x63, 0xd7, 0x15, 0x61, 0x48, 0xc5, 0x14, 0x43, 0x4a, 0x51, 0xb8, 0x78, 0x58, 0xe1, 0x3e, 0x08, + 0xad, 0x74, 0xa7, 0x9f, 0x2f, 0x2e, 0xaa, 0xa7, 0xe7, 0x49, 0x7e, 0xa8, 0x2a, 0xcf, 0xcd, 0xa7, + 0xd6, 0xe0, 0xd4, 0x97, 0x59, 0x83, 0xd7, 0x20, 0xc5, 0xcc, 0xb4, 0x17, 0xd4, 0x92, 0x4b, 0x63, + 0x91, 0x44, 0x77, 0xa5, 0xe7, 0x96, 0x09, 0x85, 0x89, 0x0a, 0x84, 0x3c, 0x7d, 0x61, 0xf9, 0x2e, + 0x24, 0x5d, 0xcb, 0xf4, 0x1c, 0x16, 0x0f, 0x66, 0x2e, 0x05, 0xa6, 0xf9, 0x98, 0xe3, 0xa1, 0x8b, + 0x7c, 0x00, 0x65, 0xe9, 0x1a, 0x37, 0x35, 0x66, 0x94, 0xb5, 0x2c, 0xb7, 0x68, 0x2d, 0x2b, 0xb1, + 0x43, 0x5f, 0x76, 0x57, 0x83, 0xcf, 0x92, 0x6c, 0x79, 0x5a, 0x9d, 0x5e, 0x9e, 0x58, 0x2d, 0xd8, + 0x61, 0xb0, 0x02, 0x40, 0x0f, 0x41, 0x9b, 0xb0, 0x6f, 0x67, 0xe8, 0x85, 0x22, 0x22, 0x62, 0x1e, + 0x41, 0x6b, 0x3a, 0x78, 0x31, 0x5e, 0x56, 0x10, 0x09, 0x10, 0x3d, 0x80, 0x1c, 0xb5, 0xfb, 0x44, + 0xd1, 0xcb, 0xe1, 0xa2, 0xc3, 0xc3, 0x05, 0x67, 0x7b, 0x01, 0x00, 0x7d, 0x0c, 0xec, 0x1a, 0x36, + 0xbb, 0xfa, 0xa0, 0x85, 0xb6, 0xf0, 0xe6, 0x2f, 0x91, 0x58, 0x21, 0x28, 0x6e, 0xca, 0xcf, 0x75, + 0xcf, 0x40, 0x9e, 0x47, 0xae, 0xa9, 0x95, 0x5a, 0x6d, 0x1d, 0xb3, 0x98, 0x44, 0x1c, 0x44, 0x43, + 0x13, 0x69, 0x11, 0xb4, 0x02, 0xcb, 0x1c, 0xa2, 0x7f, 0xa6, 0x97, 0x3b, 0xed, 0x06, 0xd6, 0xa2, + 0xc5, 0x5f, 0x4e, 0x43, 0x92, 0x75, 0x0a, 0x2a, 0xc2, 0x3a, 0xd6, 0x4b, 0xad, 0x46, 0xbd, 0xcb, + 0xe3, 0x04, 0x4a, 0xbc, 0xee, 0x56, 0xc9, 0xa8, 0xea, 0x15, 0xed, 0xb5, 0x10, 0x4e, 0xbd, 0x5d, + 0x32, 0xea, 0x3a, 0xee, 0x72, 0x8f, 0x9a, 0xe3, 0x9c, 0x43, 0x1b, 0x70, 0x61, 0x16, 0xc7, 0xa8, + 0x19, 0x6d, 0x1a, 0x74, 0x47, 0x5b, 0x41, 0x57, 0xe0, 0xf2, 0x02, 0x84, 0x6e, 0xc5, 0x68, 0x3d, + 0xd2, 0xce, 0xa2, 0x6b, 0x50, 0x5c, 0x84, 0x55, 0xd3, 0x6b, 0x0d, 0xfc, 0xb9, 0x96, 0x46, 0xeb, + 0x50, 0x98, 0xc1, 0x6b, 0x62, 0x5d, 0xaf, 0x35, 0xdb, 0x7a, 0x45, 0x3b, 0x33, 0xb7, 0xca, 0x2c, + 0x4e, 0x93, 0xa8, 0xf2, 0x2a, 0xba, 0x0e, 0x57, 0x38, 0x8e, 0x6c, 0x32, 0xd6, 0xb7, 0x8d, 0x56, + 0x1b, 0xb3, 0xc2, 0xda, 0x46, 0x4d, 0x6f, 0x74, 0xda, 0xda, 0xeb, 0xe8, 0x6d, 0xb8, 0x36, 0x8b, + 0x39, 0x17, 0x77, 0x4d, 0xa9, 0x99, 0xc4, 0x6d, 0xeb, 0xb8, 0x66, 0xd4, 0x4b, 0xa4, 0x66, 0x11, + 0x74, 0x19, 0x2e, 0x4e, 0xe7, 0x77, 0xea, 0x8c, 0x97, 0x8e, 0xf5, 0x8a, 0x16, 0x45, 0x17, 0x61, + 0x8d, 0x63, 0x6c, 0xe1, 0x52, 0x4d, 0x7f, 0xd2, 0xc0, 0x8f, 0xba, 0x58, 0xaf, 0x35, 0x1e, 0xeb, + 0x15, 0x2d, 0x46, 0x3a, 0x94, 0xe7, 0x6e, 0x97, 0xbb, 0x3a, 0xc6, 0x0d, 0xac, 0xc5, 0x95, 0x42, + 0x8d, 0xfa, 0xe3, 0x52, 0xd5, 0xa8, 0x04, 0xa4, 0x46, 0x45, 0x4b, 0xa0, 0xf3, 0x70, 0x6e, 0x2a, + 0xbf, 0xb1, 0xb5, 0xa5, 0xe3, 0x96, 0x96, 0x54, 0xea, 0x63, 0x34, 0xba, 0xad, 0x27, 0x46, 0xbb, + 0xbc, 0xb3, 0xd9, 0x28, 0x61, 0xa2, 0x07, 0x06, 0xa9, 0xf1, 0x05, 0x85, 0x39, 0xd3, 0x33, 0xd2, + 0x57, 0xe5, 0x46, 0xbd, 0xae, 0x97, 0x49, 0x7e, 0x4a, 0x61, 0x8e, 0xf5, 0x72, 0xa3, 0x5e, 0x36, + 0xaa, 0x06, 0xeb, 0xf4, 0x8c, 0xd2, 0x14, 0x19, 0x2b, 0xb8, 0x2b, 0x36, 0x69, 0x10, 0xba, 0x04, + 0xe7, 0x79, 0x2e, 0x0b, 0xa4, 0x15, 0xe2, 0x0b, 0x68, 0x0d, 0xce, 0x86, 0xb2, 0x85, 0x0c, 0xb2, + 0x8a, 0x2e, 0x85, 0x72, 0xba, 0x9b, 0x9f, 0x77, 0x1b, 0x4d, 0x1d, 0x97, 0x88, 0x96, 0x6f, 0xcc, + 0xb0, 0x17, 0x5d, 0x46, 0xc5, 0x7c, 0x99, 0x85, 0x85, 0x0a, 0x65, 0xb7, 0xda, 0x25, 0x4c, 0x8a, + 0xce, 0xcd, 0x14, 0x2d, 0xea, 0x9c, 0x57, 0x8a, 0x96, 0xf1, 0x92, 0xf5, 0x4a, 0xb7, 0xd2, 0xc1, + 0x46, 0x7d, 0x9b, 0x0f, 0x0a, 0x6d, 0x7d, 0x1a, 0xab, 0xbc, 0xa3, 0x97, 0x1f, 0xd1, 0x98, 0xca, + 0x9d, 0x16, 0x57, 0xc3, 0x8a, 0x76, 0x11, 0xdd, 0x84, 0xb7, 0x54, 0xac, 0x1d, 0xbd, 0x54, 0x6d, + 0xef, 0xcc, 0x47, 0xbe, 0xa4, 0xb4, 0x86, 0x22, 0xd3, 0xad, 0x2c, 0xd1, 0x9b, 0xda, 0x79, 0x45, + 0xe1, 0x95, 0xec, 0x4e, 0xbd, 0xd4, 0x69, 0xef, 0x34, 0xb0, 0xf1, 0x4d, 0xbd, 0xa2, 0x15, 0x58, + 0xf4, 0xe7, 0x00, 0x47, 0x10, 0x2f, 0x29, 0xdd, 0x44, 0x33, 0x42, 0x64, 0xcb, 0xd3, 0x64, 0x42, + 0x16, 0x5a, 0xf1, 0x3d, 0x48, 0x6d, 0xd9, 0x03, 0xdf, 0xa2, 0x5f, 0x29, 0x2e, 0xb9, 0xd6, 0xde, + 0xc4, 0xb3, 0xba, 0x41, 0x1c, 0x7d, 0x1a, 0x18, 0xfc, 0x3e, 0xce, 0xb3, 0x0c, 0x1e, 0x5f, 0xb6, + 0xf8, 0x0f, 0xa3, 0x90, 0x55, 0x42, 0x78, 0xa2, 0x4f, 0x21, 0x73, 0x68, 0xba, 0x36, 0x99, 0x59, + 0x85, 0xf9, 0x7f, 0x61, 0x36, 0xd2, 0xe7, 0xed, 0xc7, 0x1c, 0x47, 0xb8, 0x02, 0x92, 0xa6, 0xf0, + 0x6b, 0x11, 0x48, 0x8b, 0xdc, 0x05, 0xfe, 0xb3, 0xf4, 0x14, 0xa2, 0x6a, 0x74, 0xd0, 0x8f, 0x64, + 0x58, 0x26, 0x35, 0x26, 0xd9, 0xbc, 0x82, 0xa9, 0x61, 0xf6, 0x30, 0xf1, 0xb8, 0x54, 0xed, 0xe8, + 0xdc, 0x3e, 0xbb, 0x0a, 0x49, 0xcf, 0xea, 0xb9, 0x32, 0x72, 0x90, 0x58, 0xaa, 0x5a, 0x14, 0x88, + 0x79, 0x66, 0xf1, 0xee, 0xbc, 0x0d, 0xca, 0x0c, 0x30, 0x56, 0x2c, 0x84, 0x62, 0x4b, 0x2f, 0x63, + 0xbd, 0x2d, 0x63, 0x67, 0x7d, 0x0a, 0x19, 0x19, 0x93, 0x1f, 0xad, 0x42, 0xec, 0xa9, 0xf5, 0x22, + 0xd4, 0x22, 0x02, 0x08, 0x22, 0xf5, 0x44, 0x67, 0x23, 0xf5, 0x6c, 0x02, 0x48, 0x06, 0x1e, 0x7a, + 0x1f, 0x32, 0x63, 0x91, 0xe2, 0x22, 0x3e, 0x2e, 0xf4, 0x7f, 0x80, 0x58, 0xdc, 0x01, 0x28, 0xbb, + 0x56, 0xdf, 0x1a, 0xf9, 0xb6, 0x39, 0x40, 0xc5, 0x70, 0xac, 0x8f, 0xa0, 0x44, 0x25, 0xe2, 0xc7, + 0xaa, 0x94, 0x47, 0x94, 0x47, 0xd7, 0x65, 0x02, 0xd8, 0xa1, 0xbb, 0xc3, 0x9c, 0x93, 0x87, 0x1e, + 0x40, 0xb6, 0x17, 0x24, 0x79, 0x85, 0x84, 0x05, 0x13, 0x20, 0x8a, 0x37, 0x18, 0x14, 0xdc, 0xe2, + 0x4f, 0x45, 0x21, 0xc9, 0xa4, 0x8b, 0x6e, 0x85, 0xec, 0x68, 0x14, 0x12, 0xfd, 0xbc, 0x43, 0xbe, + 0x8c, 0xbc, 0x9b, 0xc7, 0x8d, 0xe9, 0xd7, 0xc3, 0x24, 0xf2, 0x8e, 0x1e, 0x0e, 0x30, 0xd1, 0x0d, + 0x35, 0xa4, 0x6c, 0xb0, 0xcf, 0xc6, 0x49, 0x68, 0x94, 0x1c, 0x11, 0xd2, 0xe9, 0x2b, 0x90, 0x91, + 0x2c, 0x16, 0xa8, 0xa1, 0xc6, 0x7a, 0x93, 0x09, 0x88, 0xfc, 0x2d, 0x5c, 0x10, 0xc1, 0xb0, 0x84, + 0x75, 0xc9, 0x5c, 0x59, 0xfa, 0xbf, 0xf8, 0xde, 0x3c, 0xdd, 0xc9, 0x43, 0x06, 0xeb, 0x5b, 0x3a, + 0xd6, 0xeb, 0x34, 0x02, 0x9b, 0x54, 0x25, 0xa1, 0x3e, 0x7b, 0x90, 0xc1, 0xa6, 0xcf, 0x0c, 0x08, + 0x74, 0x1e, 0x62, 0x5f, 0x8c, 0xf9, 0x70, 0x64, 0x36, 0xfb, 0x37, 0x9a, 0x2d, 0x4c, 0x60, 0xe1, + 0x3e, 0x8d, 0xce, 0xef, 0xd3, 0x02, 0xa4, 0x7b, 0xe6, 0xd8, 0xec, 0x89, 0x67, 0x0c, 0xe2, 0x58, + 0xa6, 0x8b, 0xbf, 0x12, 0x01, 0x90, 0x05, 0x79, 0xe8, 0x36, 0x24, 0x79, 0x2c, 0x88, 0xb0, 0x8e, + 0x49, 0x14, 0xb1, 0xed, 0xcf, 0xe3, 0x43, 0x3c, 0x82, 0x73, 0xe6, 0xfe, 0xbe, 0x6b, 0xed, 0x9b, + 0xbe, 0xd5, 0x15, 0x81, 0xce, 0x48, 0x5d, 0xd9, 0x97, 0x62, 0xaf, 0x1f, 0xbd, 0xdc, 0x58, 0x29, + 0x09, 0x04, 0x1e, 0x6e, 0x81, 0xd4, 0x7d, 0xc5, 0x9c, 0x06, 0x8e, 0x3d, 0xf4, 0x55, 0x28, 0xcc, + 0x32, 0x9b, 0xaa, 0xf9, 0xda, 0x34, 0x61, 0x59, 0xb4, 0xe4, 0xa7, 0x63, 0x90, 0x30, 0x86, 0xc4, + 0x68, 0xbf, 0x3a, 0x37, 0x22, 0x19, 0xcd, 0x53, 0x5d, 0xb3, 0xab, 0x10, 0x37, 0xc7, 0xe3, 0x1e, + 0x57, 0xa5, 0x30, 0x5a, 0x69, 0x3c, 0xee, 0x61, 0x9a, 0x8d, 0x6e, 0x42, 0xb2, 0xef, 0xf4, 0x9e, + 0x5a, 0xd3, 0x61, 0x9b, 0x18, 0x62, 0x85, 0x66, 0x61, 0x8e, 0x82, 0x2e, 0x42, 0x92, 0x5e, 0x1a, + 0x63, 0x1b, 0x6b, 0x22, 0x2c, 0x30, 0x87, 0x15, 0xba, 0x10, 0x27, 0x8c, 0x17, 0xa8, 0xd6, 0x2a, + 0xbf, 0x0f, 0x3c, 0x1d, 0x07, 0x25, 0xb0, 0xa8, 0x63, 0x0b, 0x2c, 0xea, 0xc2, 0xb7, 0x23, 0x90, + 0x64, 0x35, 0x5a, 0x50, 0xc6, 0x7d, 0x80, 0x60, 0x3c, 0x4e, 0xb5, 0x5e, 0x19, 0xba, 0xd1, 0xb5, + 0x08, 0x56, 0x10, 0x49, 0x15, 0x7a, 0xce, 0x68, 0xcf, 0xde, 0x9f, 0xaa, 0x82, 0x98, 0x29, 0x59, + 0x66, 0xb1, 0xc8, 0xb5, 0x3d, 0x0d, 0xf1, 0x52, 0xb3, 0x59, 0x66, 0x73, 0x63, 0xa5, 0x51, 0x7e, + 0xa4, 0x63, 0xa9, 0xdc, 0x3f, 0x12, 0x01, 0x8d, 0x46, 0x5d, 0x69, 0xba, 0xce, 0xd8, 0xdc, 0x67, + 0x5b, 0x3c, 0x77, 0xf9, 0xfb, 0x1c, 0x6c, 0x32, 0x90, 0xb1, 0x42, 0xa7, 0xd0, 0x94, 0x47, 0x3a, + 0x8a, 0x65, 0xfe, 0xca, 0x46, 0x68, 0x60, 0x9d, 0x83, 0x33, 0x3b, 0x8d, 0x56, 0xbb, 0xdb, 0x6e, + 0x04, 0x66, 0xa3, 0x16, 0x21, 0x86, 0xf6, 0xa6, 0x51, 0x31, 0xb0, 0x5e, 0x26, 0x66, 0x4d, 0xa9, + 0x2a, 0xeb, 0xf2, 0x87, 0x29, 0x48, 0xf2, 0x03, 0xb3, 0x9b, 0xb0, 0x14, 0xf8, 0x23, 0x34, 0x0a, + 0x8e, 0x2a, 0xbc, 0xbc, 0xcc, 0xa3, 0xc1, 0x64, 0x2e, 0x40, 0xe6, 0xc0, 0xf1, 0xfc, 0xae, 0x12, + 0x9f, 0x9c, 0x5e, 0x33, 0xa1, 0x99, 0xd7, 0x78, 0x5b, 0x62, 0x54, 0x03, 0x51, 0x28, 0x6e, 0x90, + 0xfa, 0xcc, 0x48, 0x11, 0x12, 0xf6, 0x50, 0xb8, 0x9d, 0xd9, 0x7b, 0x39, 0x55, 0xb5, 0x30, 0xcb, + 0x42, 0xb7, 0xa4, 0x3b, 0x97, 0x08, 0x6d, 0xdd, 0x71, 0x6e, 0x53, 0x31, 0x85, 0x7e, 0x2c, 0x29, + 0x7d, 0x8b, 0xf7, 0x42, 0xb3, 0xeb, 0xf9, 0x79, 0x64, 0xb3, 0x93, 0xec, 0x16, 0xe4, 0x99, 0x2a, + 0x77, 0x43, 0xa1, 0x8f, 0xde, 0x98, 0x4b, 0xcd, 0x54, 0x4d, 0x1c, 0xef, 0xf7, 0x95, 0x14, 0x2a, + 0x43, 0xce, 0x33, 0x47, 0xfd, 0x5d, 0xe7, 0x79, 0x57, 0x3e, 0x61, 0x13, 0xdc, 0x91, 0x08, 0xb3, + 0x69, 0x31, 0x44, 0x1a, 0x4b, 0x28, 0xeb, 0x05, 0x89, 0x53, 0x2e, 0xce, 0xe8, 0xa1, 0xda, 0x15, + 0xe1, 0xfb, 0x14, 0xe1, 0x82, 0x76, 0x78, 0xff, 0x04, 0x3d, 0x55, 0xf8, 0x16, 0xe4, 0xd4, 0x56, + 0x90, 0xf5, 0xaf, 0xef, 0xda, 0x87, 0x74, 0x91, 0xa5, 0xeb, 0x1f, 0x4b, 0x2d, 0x08, 0x6f, 0xf9, + 0x21, 0x2c, 0x31, 0x9c, 0xae, 0x33, 0x66, 0xf7, 0x91, 0x63, 0xa1, 0x21, 0x15, 0x2c, 0xe2, 0x38, + 0xcf, 0x10, 0x1b, 0x0c, 0xaf, 0xf0, 0x83, 0x90, 0x16, 0x35, 0xa2, 0xc1, 0x5a, 0xa7, 0x35, 0x8e, + 0xc5, 0x55, 0xaa, 0xc0, 0x19, 0x1a, 0x23, 0xa9, 0x3b, 0x0e, 0x46, 0xc1, 0xd4, 0xf2, 0x37, 0x3d, + 0x48, 0xb0, 0x36, 0x9c, 0x82, 0x14, 0x7e, 0x22, 0x02, 0x59, 0x45, 0xce, 0xe8, 0xd3, 0x90, 0x72, + 0x5c, 0x3d, 0xa9, 0x5f, 0x66, 0x15, 0x65, 0x4d, 0x06, 0x8a, 0x9a, 0xaa, 0x70, 0xf1, 0xce, 0x31, + 0x51, 0x93, 0x5a, 0x7a, 0x75, 0x8b, 0x4d, 0x07, 0xcd, 0x12, 0x26, 0x9e, 0xad, 0x18, 0x82, 0x9f, + 0xcf, 0x23, 0x38, 0x03, 0x79, 0x36, 0x6b, 0x88, 0x63, 0xd9, 0x08, 0x59, 0x33, 0xe9, 0xd0, 0xa6, + 0xe1, 0x97, 0xe2, 0xd4, 0x51, 0x2e, 0xd5, 0x2b, 0x9b, 0x8d, 0xcf, 0x18, 0x24, 0xaa, 0x58, 0x61, + 0x22, 0x2a, 0xfe, 0x6a, 0xf0, 0x10, 0x0f, 0x7e, 0xa2, 0x45, 0xe8, 0x6f, 0x43, 0x8b, 0x16, 0xff, + 0x76, 0x1c, 0xb2, 0x4a, 0x44, 0x7e, 0xd2, 0xed, 0xf4, 0xe2, 0x03, 0xfb, 0xb2, 0x22, 0x83, 0x79, + 0xea, 0x94, 0xdf, 0x4f, 0xa0, 0x36, 0xe4, 0xec, 0x71, 0x97, 0x07, 0x4a, 0x96, 0xbb, 0xb5, 0x17, + 0xe7, 0x84, 0xfe, 0x37, 0x9a, 0xe2, 0xad, 0x27, 0x79, 0x54, 0x23, 0x41, 0x96, 0x87, 0xb3, 0xf6, + 0x58, 0x26, 0x64, 0xd4, 0xf3, 0xa4, 0x12, 0xf5, 0xdc, 0x80, 0xfc, 0xd8, 0x71, 0x7d, 0xfa, 0x89, + 0xad, 0x3d, 0xda, 0x17, 0x47, 0x23, 0xeb, 0xf3, 0x5e, 0x19, 0x70, 0x5c, 0xbf, 0xc6, 0xd0, 0xc4, + 0xf6, 0xf2, 0x38, 0x00, 0x79, 0x85, 0xe7, 0x90, 0x91, 0x45, 0x87, 0x1e, 0x2e, 0x88, 0xbc, 0xf2, + 0xc3, 0x05, 0xf4, 0x76, 0xa9, 0x14, 0x00, 0x5f, 0xbf, 0xd8, 0xed, 0x52, 0x51, 0x02, 0xce, 0xc8, + 0xa6, 0x15, 0x5e, 0x40, 0x56, 0xa9, 0x1c, 0x7a, 0x43, 0x8c, 0xdf, 0xe9, 0x37, 0x15, 0xd8, 0x30, + 0x75, 0x5c, 0x7f, 0x6a, 0x6a, 0x26, 0x78, 0x51, 0x05, 0x4f, 0x99, 0x9a, 0x09, 0x72, 0x41, 0x69, + 0x0b, 0xdb, 0x40, 0x0e, 0x5e, 0x58, 0x58, 0x87, 0xb4, 0x68, 0x04, 0xd1, 0x49, 0xd2, 0x0c, 0xf6, + 0xaa, 0x82, 0xd1, 0x3c, 0xfc, 0x40, 0x8b, 0x16, 0x8f, 0x12, 0xb0, 0x14, 0x04, 0x31, 0xa6, 0xba, + 0x51, 0x99, 0x0a, 0x66, 0xcd, 0x62, 0x05, 0x8b, 0xa9, 0x2c, 0x8c, 0xac, 0x24, 0xc3, 0xa1, 0xac, + 0x8b, 0x3f, 0x92, 0x08, 0x05, 0x52, 0x9e, 0xba, 0xe9, 0x90, 0x28, 0xef, 0x90, 0xbf, 0xbf, 0x93, + 0x42, 0x67, 0x20, 0x57, 0x29, 0x95, 0xbb, 0x8d, 0xc7, 0x3a, 0xc6, 0x46, 0x45, 0xd7, 0x7e, 0x37, + 0x85, 0xce, 0xc2, 0x32, 0x01, 0x61, 0xbd, 0x54, 0xe9, 0xb6, 0xf4, 0x12, 0x2e, 0xef, 0x68, 0xff, + 0x31, 0x85, 0xb2, 0x90, 0xdc, 0x6a, 0x3c, 0x21, 0xab, 0xdb, 0x7f, 0x62, 0x89, 0x96, 0xde, 0x36, + 0x2a, 0xda, 0xef, 0xa5, 0x50, 0x06, 0xe2, 0xc4, 0xa7, 0xd5, 0xfe, 0x33, 0x85, 0xb7, 0xf4, 0xf6, + 0xb6, 0x51, 0xd1, 0xfe, 0x8b, 0x48, 0x74, 0x8c, 0x8a, 0xf6, 0xfb, 0x29, 0x94, 0x83, 0x54, 0x4b, + 0x6f, 0x37, 0xcb, 0xa5, 0xa6, 0xf6, 0x3d, 0x5a, 0x44, 0xd5, 0xa8, 0x77, 0x3e, 0xeb, 0x1a, 0xb5, + 0x5a, 0xa7, 0x5d, 0xda, 0xac, 0xea, 0xda, 0x7f, 0x4d, 0xa1, 0x73, 0xa0, 0xd5, 0xf5, 0x76, 0x77, + 0xd3, 0xa8, 0x57, 0x64, 0x6c, 0xe0, 0x3f, 0x48, 0x21, 0x04, 0x79, 0x0a, 0xc6, 0x8d, 0x52, 0xa5, + 0x5c, 0x6a, 0xb5, 0xb5, 0x3f, 0x4c, 0xa1, 0x25, 0xc8, 0x10, 0x58, 0xa9, 0x52, 0x33, 0xea, 0xda, + 0x1f, 0x51, 0xf6, 0x24, 0x8d, 0x4b, 0x4f, 0xb4, 0xff, 0x96, 0x42, 0x79, 0x48, 0x1b, 0xcd, 0x72, + 0x97, 0xde, 0x9c, 0xf8, 0xef, 0x14, 0x99, 0x24, 0x59, 0xed, 0xff, 0x38, 0x85, 0x96, 0x01, 0x5a, + 0x9f, 0xb7, 0xba, 0xb5, 0x46, 0xa5, 0x53, 0xd5, 0xb5, 0x3f, 0xa1, 0x08, 0x04, 0x80, 0x4b, 0x4f, + 0x8c, 0x86, 0xf6, 0x3f, 0x24, 0x42, 0x79, 0x07, 0x37, 0x1a, 0x6d, 0xed, 0x7f, 0x4a, 0x40, 0xb3, + 0x8d, 0x4b, 0x65, 0x5d, 0xfb, 0x53, 0x49, 0xd1, 0x2c, 0x95, 0xcb, 0x6d, 0xed, 0xcf, 0x64, 0x9a, + 0xd5, 0xe7, 0x7f, 0xd1, 0x1a, 0x90, 0xf4, 0x26, 0xa1, 0xff, 0x73, 0x99, 0xac, 0x93, 0x16, 0xfd, + 0x6f, 0x2a, 0x74, 0x5a, 0x1e, 0xdf, 0xe0, 0xd0, 0xbe, 0x9d, 0x16, 0x18, 0x6d, 0xa3, 0xa6, 0x6b, + 0xff, 0x6f, 0x1a, 0xad, 0xc0, 0x12, 0x4d, 0xb6, 0x3f, 0x27, 0x66, 0xc5, 0x96, 0xb1, 0xad, 0xfd, + 0x7f, 0x69, 0xd2, 0x6f, 0xb5, 0x47, 0xf5, 0x46, 0x45, 0xfb, 0xff, 0xe9, 0xff, 0xaa, 0x5e, 0x6a, + 0xe9, 0xda, 0x0f, 0xa5, 0x91, 0x06, 0xd9, 0x52, 0xa7, 0x62, 0xb4, 0xbb, 0x4f, 0xb0, 0xd1, 0xd6, + 0xb5, 0x1f, 0x4e, 0x13, 0x91, 0x31, 0x08, 0x8f, 0xbf, 0xac, 0xfd, 0x95, 0x34, 0xef, 0x81, 0x2d, + 0xd2, 0x03, 0x7f, 0x35, 0x4d, 0xaa, 0x50, 0x53, 0xfb, 0xfd, 0x3b, 0x69, 0xd2, 0x06, 0x02, 0x62, + 0x6d, 0xf8, 0x91, 0x34, 0xed, 0xbf, 0xcf, 0x5b, 0xd5, 0xc6, 0xb6, 0xf6, 0xa3, 0x69, 0x22, 0x81, + 0x27, 0xa5, 0x47, 0x7a, 0xb7, 0x54, 0x2d, 0xe1, 0x9a, 0xf6, 0xd7, 0x68, 0x11, 0xf4, 0x6a, 0x4a, + 0xb7, 0xd5, 0x69, 0x35, 0xf5, 0x7a, 0x45, 0xfb, 0x31, 0x8a, 0xc4, 0x8a, 0x25, 0xba, 0xa3, 0xfd, + 0xb8, 0x78, 0x8f, 0xe9, 0xe7, 0xa2, 0x90, 0xa9, 0xda, 0xa3, 0xc9, 0x73, 0xaa, 0xdf, 0x9b, 0xb0, + 0x2c, 0x35, 0xf5, 0x85, 0xf8, 0xc8, 0x2f, 0xf4, 0x6a, 0x52, 0x48, 0xc5, 0xa9, 0x61, 0xb8, 0xd4, + 0x0b, 0x8f, 0x91, 0xaf, 0xc3, 0xb9, 0x5d, 0x67, 0x32, 0xea, 0xdb, 0xa3, 0xfd, 0x6e, 0x68, 0xb0, + 0x44, 0x17, 0x70, 0xc2, 0x67, 0x05, 0x4d, 0x59, 0x7d, 0x82, 0xab, 0x0a, 0xab, 0xd6, 0xde, 0x9e, + 0xc5, 0xbf, 0x8b, 0x56, 0x99, 0xc5, 0x16, 0x31, 0x3b, 0x27, 0x89, 0x42, 0xdc, 0x74, 0x58, 0xa1, + 0x41, 0x40, 0xbb, 0x63, 0xbb, 0xdf, 0x25, 0x53, 0xa8, 0x37, 0x36, 0x7b, 0xfc, 0x5d, 0x0e, 0xf6, + 0x8d, 0x02, 0x8d, 0xc6, 0xd7, 0x34, 0x2a, 0x75, 0x91, 0x89, 0xcf, 0x50, 0x8a, 0xa6, 0xdd, 0x97, + 0xa0, 0xe2, 0xaf, 0xc7, 0x00, 0x30, 0xf5, 0x80, 0xf8, 0xbb, 0x28, 0x29, 0x37, 0xe4, 0x28, 0xc9, + 0xa8, 0xa9, 0x12, 0x87, 0xff, 0x15, 0x77, 0xc6, 0x38, 0x7a, 0xe1, 0x3b, 0x31, 0x48, 0xb2, 0x1c, + 0xf4, 0x95, 0xd0, 0x1a, 0x7c, 0xe9, 0x38, 0x0e, 0xb3, 0x6b, 0x2f, 0x82, 0xf8, 0x81, 0xe9, 0xf6, + 0x79, 0xe0, 0x3f, 0xfa, 0x9f, 0xc0, 0x3c, 0x67, 0xcf, 0xe7, 0x6e, 0x12, 0xfd, 0x5f, 0xfc, 0xc9, + 0xe8, 0x31, 0x6f, 0x3f, 0xe0, 0x6a, 0xad, 0xdd, 0x2d, 0xb5, 0xd8, 0x9a, 0x4a, 0x13, 0xe5, 0x06, + 0xd6, 0xb5, 0x28, 0xca, 0x41, 0x9a, 0x25, 0x9b, 0x1d, 0x2d, 0x26, 0x33, 0x2b, 0xa5, 0x76, 0x49, + 0x8b, 0xa3, 0x25, 0x22, 0x82, 0x5a, 0xbb, 0xbb, 0xd5, 0x32, 0xbe, 0xc9, 0x9f, 0x06, 0xa3, 0x69, + 0xa2, 0x75, 0x2d, 0x2d, 0x49, 0x9f, 0xff, 0x22, 0xe9, 0x9a, 0x5e, 0xa3, 0x23, 0x9d, 0x8c, 0xab, + 0x3c, 0x83, 0xb4, 0xb6, 0xbf, 0xd1, 0xd1, 0x3b, 0xba, 0x96, 0x96, 0x3c, 0xe9, 0xd0, 0xcb, 0xa0, + 0x65, 0xc8, 0xb2, 0x64, 0x63, 0xcb, 0xa8, 0xea, 0x1a, 0x48, 0xa6, 0xf5, 0x26, 0x6e, 0x94, 0xb5, + 0xac, 0xac, 0x11, 0x6e, 0xb5, 0xb4, 0x9c, 0x44, 0xc7, 0xed, 0x26, 0x36, 0x1a, 0x5a, 0x5e, 0x01, + 0xd0, 0x91, 0xba, 0x44, 0xf7, 0x56, 0x09, 0xa0, 0x65, 0x6c, 0x93, 0x51, 0x60, 0xd4, 0xb7, 0xb5, + 0x65, 0xc9, 0xb4, 0xd5, 0x2e, 0x95, 0x1f, 0x69, 0x1a, 0x1f, 0x06, 0x3f, 0x1e, 0x81, 0x54, 0xbb, + 0xfd, 0x39, 0xed, 0xd0, 0x87, 0x90, 0x7d, 0x66, 0x8f, 0xfa, 0xce, 0xb3, 0xae, 0x67, 0x7f, 0xcb, + 0x9a, 0x8a, 0x27, 0xce, 0x91, 0x6e, 0x3f, 0xa1, 0x18, 0x2d, 0xfb, 0x5b, 0x16, 0x86, 0x67, 0xf2, + 0x7f, 0x61, 0x0b, 0x20, 0xc8, 0x21, 0x86, 0x91, 0xeb, 0x3c, 0xf3, 0xc2, 0x8f, 0x03, 0x11, 0x08, + 0x5a, 0x87, 0x54, 0x8f, 0x18, 0x58, 0x23, 0x2f, 0xb4, 0x7a, 0x09, 0x60, 0xf1, 0x65, 0x1a, 0xf2, + 0xe1, 0x10, 0xf5, 0xef, 0x84, 0x3c, 0xd9, 0xf3, 0xf3, 0x0e, 0xed, 0x55, 0x8f, 0xf6, 0x9d, 0xe0, + 0x02, 0x23, 0xbb, 0xf0, 0x1f, 0x8e, 0x58, 0x3a, 0x75, 0x7d, 0x11, 0x7d, 0x65, 0xca, 0xb3, 0xdd, + 0x98, 0xcb, 0x9f, 0x99, 0xc7, 0xe2, 0xce, 0x36, 0xf5, 0x2d, 0x0b, 0xa1, 0x7b, 0xf6, 0xe1, 0x97, + 0x26, 0xde, 0x07, 0xf6, 0x06, 0x2b, 0x37, 0xc4, 0xd7, 0xe7, 0xf2, 0xac, 0x11, 0x18, 0xbb, 0x7a, + 0x43, 0xb3, 0xd1, 0xc7, 0x34, 0x00, 0x06, 0x3b, 0xdd, 0xa7, 0x97, 0x5f, 0x53, 0xa1, 0x68, 0xd8, + 0x8a, 0x0d, 0x22, 0x4c, 0x99, 0x51, 0x00, 0xf2, 0xd0, 0x1d, 0x80, 0x01, 0x99, 0xcf, 0xd8, 0xec, + 0x95, 0x0e, 0x5d, 0xf3, 0x91, 0x13, 0x1d, 0xce, 0x0c, 0xe4, 0x9c, 0x77, 0x0f, 0xb2, 0x6c, 0x40, + 0x32, 0x8a, 0x4c, 0xc8, 0x62, 0x0f, 0x46, 0x20, 0x06, 0x86, 0x45, 0x69, 0x3e, 0x80, 0xb4, 0x2f, + 0x26, 0x48, 0x08, 0x9d, 0x05, 0x72, 0xfd, 0x60, 0x67, 0x81, 0x3c, 0x81, 0x53, 0x3e, 0x9b, 0x98, + 0x0a, 0x3f, 0x1f, 0x07, 0x08, 0x84, 0x88, 0x0a, 0xc2, 0xe7, 0x0b, 0x45, 0xe7, 0x66, 0xbe, 0xde, + 0x36, 0xa4, 0x78, 0xbb, 0xf8, 0xeb, 0x51, 0x6f, 0x9d, 0xd0, 0x25, 0x42, 0x32, 0x0f, 0xe3, 0xc4, + 0x32, 0xc6, 0x82, 0x1a, 0x3d, 0x9e, 0x36, 0x13, 0xd9, 0x07, 0xc3, 0x37, 0x4f, 0x62, 0x77, 0x82, + 0xcd, 0x88, 0xae, 0x02, 0x8c, 0x5d, 0xfb, 0xd0, 0x1e, 0x58, 0xfb, 0x72, 0x8f, 0x43, 0x3c, 0x08, + 0x19, 0x64, 0xa0, 0x0f, 0x00, 0xe4, 0x26, 0xe4, 0xf4, 0xd3, 0x16, 0xd3, 0xdb, 0x95, 0x0a, 0x26, + 0xba, 0x0e, 0xda, 0x9e, 0xe3, 0xf6, 0xac, 0xee, 0x78, 0x32, 0x18, 0x74, 0x99, 0x98, 0xe8, 0xfb, + 0x4e, 0x78, 0x89, 0xc2, 0x9b, 0x93, 0xc1, 0x80, 0xed, 0xf1, 0xbc, 0x05, 0x79, 0xa6, 0xc6, 0x5d, + 0xee, 0xae, 0xa5, 0xe4, 0x23, 0x40, 0x39, 0x96, 0x51, 0xa1, 0xf0, 0xff, 0x9b, 0xb6, 0xe6, 0x03, + 0x48, 0xf1, 0xee, 0xa1, 0xcf, 0x76, 0x35, 0x5a, 0xfc, 0xb1, 0x9d, 0x4d, 0x6c, 0x54, 0xb6, 0x75, + 0x16, 0x63, 0xbd, 0xde, 0xa8, 0xeb, 0x5a, 0x8c, 0xfc, 0xeb, 0xb4, 0x82, 0x67, 0x2b, 0x0a, 0x77, + 0x20, 0x23, 0xc7, 0x48, 0xb0, 0x4b, 0x10, 0x39, 0x76, 0x97, 0xa0, 0xf8, 0x66, 0x10, 0xd7, 0x9d, + 0x6f, 0xb6, 0xb0, 0xf8, 0xb4, 0x7a, 0xab, 0xd1, 0x92, 0x8e, 0xd6, 0xb7, 0xa3, 0xb0, 0x3c, 0x75, + 0xa4, 0x3a, 0x3b, 0xf2, 0x22, 0xaf, 0x34, 0xf2, 0xee, 0x41, 0xb6, 0x47, 0x7d, 0x25, 0x36, 0x2e, + 0xa6, 0x76, 0x93, 0x64, 0xe0, 0x03, 0x0c, 0x3d, 0xf9, 0x1f, 0xdd, 0x53, 0xbe, 0xa7, 0x19, 0xf3, + 0x97, 0x4b, 0xf3, 0xec, 0x1a, 0x89, 0x38, 0xec, 0x6e, 0x1a, 0x95, 0xe0, 0xc3, 0x99, 0xa6, 0x4d, + 0x5f, 0x92, 0x9a, 0xfa, 0xae, 0xff, 0x98, 0x47, 0x8b, 0x19, 0x9f, 0xe3, 0xbe, 0xe9, 0x2f, 0xfe, + 0x4c, 0x16, 0x20, 0xa8, 0x16, 0xfa, 0x98, 0x0e, 0xb8, 0x6e, 0x6f, 0x20, 0x22, 0x9f, 0xad, 0xcd, + 0xc6, 0x6c, 0xa8, 0x5b, 0x7e, 0x79, 0xe0, 0x6d, 0xc2, 0xd1, 0xcb, 0x8d, 0x24, 0xf9, 0x5f, 0x6d, + 0xe1, 0xe4, 0x88, 0xc2, 0x0a, 0x3f, 0x0b, 0x90, 0xa0, 0x21, 0x1d, 0x0a, 0x4d, 0xb1, 0x03, 0xfc, + 0x2e, 0x44, 0x9d, 0xf1, 0xd4, 0x13, 0x35, 0x33, 0x01, 0x20, 0xe4, 0xed, 0x17, 0x1c, 0x75, 0xc6, + 0xe1, 0x63, 0x8d, 0xb8, 0xd8, 0x8c, 0xfe, 0xa3, 0x38, 0xc4, 0xca, 0x5b, 0xdf, 0x28, 0xfc, 0x5e, + 0x1c, 0x40, 0xf9, 0x2e, 0xff, 0x16, 0x24, 0xfb, 0xd6, 0xa1, 0x2d, 0xa3, 0x92, 0xc9, 0xdb, 0x5f, + 0x14, 0x78, 0xbb, 0x3e, 0x19, 0xee, 0xd2, 0xfd, 0x48, 0x9a, 0x44, 0x6b, 0x90, 0xf2, 0xac, 0x9e, + 0x2f, 0x82, 0x8e, 0xc6, 0xb1, 0x48, 0x12, 0x7b, 0x81, 0x9e, 0x96, 0x73, 0x7b, 0x81, 0xfc, 0x47, + 0x18, 0xb2, 0xb6, 0xd3, 0xe5, 0xaf, 0x9b, 0xf4, 0xf9, 0xb5, 0x9a, 0x4b, 0xc7, 0x35, 0x82, 0xb6, + 0x37, 0x78, 0x79, 0xcc, 0x68, 0xf0, 0x37, 0x47, 0xfa, 0x18, 0x6c, 0x47, 0xfc, 0x47, 0x5d, 0xd0, + 0x02, 0x9e, 0x32, 0x1c, 0xd7, 0x29, 0x18, 0xaf, 0x72, 0xc6, 0x4b, 0x92, 0x31, 0x0b, 0xda, 0xb5, + 0x24, 0x99, 0x8b, 0x18, 0x21, 0xcb, 0x4a, 0x01, 0xb4, 0x4d, 0xc9, 0xd3, 0xf0, 0x3f, 0xc7, 0xf9, + 0xe7, 0x25, 0xff, 0xb6, 0x3d, 0xb4, 0x70, 0x5e, 0xb2, 0xa7, 0x97, 0x04, 0x5a, 0x90, 0xb3, 0x1d, + 0x16, 0x45, 0x87, 0xb2, 0x4e, 0xbd, 0xa2, 0x4c, 0x9e, 0x98, 0x36, 0x0d, 0x60, 0x49, 0x64, 0x22, + 0xfe, 0xa3, 0x2a, 0x64, 0x6c, 0xa7, 0x3b, 0xb4, 0xdc, 0x7d, 0x1a, 0xff, 0xeb, 0x14, 0x1c, 0x35, + 0xce, 0x31, 0x6d, 0x34, 0x6a, 0x94, 0x0c, 0xa7, 0x6d, 0x87, 0xfd, 0xe3, 0xdc, 0x68, 0x60, 0xe4, + 0x3e, 0x7f, 0x69, 0xe9, 0xf4, 0xdc, 0xbe, 0x41, 0xc9, 0x08, 0x37, 0xf6, 0xaf, 0xf0, 0xe7, 0x11, + 0x00, 0x1e, 0x24, 0xcc, 0x1e, 0xed, 0x17, 0x7e, 0x3f, 0xf2, 0x7d, 0x68, 0xdf, 0x94, 0x3e, 0x45, + 0xff, 0xb2, 0xf4, 0x29, 0xf6, 0x17, 0xa8, 0x4f, 0x85, 0x1f, 0x8e, 0x86, 0x5a, 0xac, 0x43, 0xac, + 0xb7, 0xf7, 0x05, 0x9f, 0x15, 0xaf, 0x1d, 0x57, 0x44, 0x79, 0xeb, 0x1b, 0xb7, 0xd5, 0x50, 0x89, + 0xbc, 0x2c, 0x32, 0x80, 0x31, 0xa1, 0x47, 0x26, 0xe4, 0x7b, 0x7b, 0x5f, 0x74, 0x5d, 0xab, 0x37, + 0x71, 0x3d, 0xfb, 0xd0, 0xe2, 0xc2, 0x38, 0x2d, 0xc3, 0xb3, 0x9c, 0x61, 0x8e, 0x30, 0x14, 0x3c, + 0x70, 0xae, 0xb7, 0xf7, 0x85, 0x4c, 0xa1, 0x1a, 0x80, 0x2f, 0x3b, 0x8e, 0xcb, 0xe4, 0x9d, 0xe3, + 0xf8, 0x07, 0x5d, 0xac, 0x46, 0xa3, 0x51, 0x18, 0x14, 0x5b, 0xea, 0xfd, 0xcb, 0xe9, 0x73, 0xcf, + 0x76, 0xa3, 0x5d, 0xaa, 0xb2, 0x8d, 0x13, 0xea, 0x5a, 0xd2, 0x08, 0xe8, 0xcc, 0xdb, 0xa5, 0x8b, + 0x59, 0xeb, 0xf3, 0x7a, 0x59, 0x8b, 0x13, 0x60, 0x89, 0xfe, 0x4d, 0xc8, 0x75, 0x2d, 0xc9, 0xa6, + 0x53, 0x74, 0x15, 0x52, 0xbd, 0x81, 0xe9, 0x79, 0xfc, 0x6a, 0x61, 0x9e, 0x19, 0x4f, 0x65, 0x02, + 0x32, 0x2a, 0x58, 0xe4, 0x15, 0xdf, 0x87, 0x24, 0xdb, 0x6b, 0x43, 0x6f, 0xcb, 0xad, 0x38, 0xd6, + 0x17, 0x39, 0x75, 0x2b, 0x4e, 0x1e, 0x4b, 0xb1, 0x78, 0x26, 0xf7, 0x21, 0x41, 0xc1, 0xc7, 0x1e, + 0xbc, 0xce, 0x3d, 0x49, 0x2e, 0xfe, 0x52, 0x04, 0xe2, 0x74, 0x55, 0xbf, 0x08, 0xc9, 0x11, 0x55, + 0xe5, 0x90, 0x89, 0xc0, 0x61, 0x72, 0x5f, 0x2e, 0x1a, 0x7a, 0x8d, 0xf0, 0x58, 0x3b, 0x00, 0x7d, + 0x0a, 0x70, 0x68, 0x7b, 0x36, 0xff, 0x64, 0x82, 0x3d, 0x88, 0xb0, 0x31, 0xef, 0xd2, 0xee, 0xed, + 0xc7, 0x12, 0x0d, 0x2b, 0x24, 0xca, 0x2e, 0x64, 0x62, 0x51, 0x14, 0x97, 0xbb, 0x90, 0x60, 0x31, + 0x4b, 0xdf, 0x82, 0xc4, 0x98, 0xc6, 0x32, 0x65, 0x92, 0x12, 0xf7, 0x1b, 0x49, 0xa6, 0xb0, 0x37, + 0x69, 0x7e, 0xf1, 0x5f, 0x47, 0x21, 0x1f, 0xaa, 0x01, 0xd2, 0x43, 0x75, 0x65, 0x7e, 0xc7, 0x49, + 0x75, 0x15, 0x86, 0x9c, 0x52, 0xe3, 0x79, 0x22, 0xba, 0x1c, 0x7e, 0x11, 0x94, 0x49, 0x29, 0xf4, + 0xfa, 0x67, 0x01, 0xd2, 0xe2, 0x33, 0x52, 0xe1, 0x57, 0x88, 0xb4, 0xfa, 0x82, 0x5d, 0x22, 0xfc, + 0x82, 0x5d, 0x51, 0xb4, 0x36, 0x19, 0x32, 0x8f, 0xa8, 0x28, 0x78, 0x43, 0x15, 0x09, 0xa6, 0x16, + 0x49, 0xf0, 0x03, 0x80, 0xa0, 0x59, 0xc4, 0x55, 0x95, 0x57, 0x70, 0xf8, 0x3b, 0xac, 0xd5, 0x0e, + 0xbd, 0xa5, 0x45, 0x5f, 0x74, 0xd7, 0x3f, 0x6b, 0xeb, 0x98, 0x1e, 0x25, 0x15, 0x3f, 0x01, 0x78, + 0x62, 0xd9, 0xfb, 0x07, 0x3e, 0x7f, 0x53, 0x23, 0xf9, 0x8c, 0xa6, 0x42, 0x71, 0x73, 0x38, 0x4c, + 0x3e, 0x96, 0x11, 0x0d, 0x1e, 0xcb, 0x28, 0xfe, 0x87, 0x08, 0x64, 0x1f, 0xb3, 0xe6, 0x50, 0x0e, + 0xeb, 0x41, 0x63, 0x55, 0xd5, 0x95, 0x4d, 0xa6, 0xd1, 0x61, 0xec, 0x41, 0xbf, 0xdb, 0x67, 0x37, + 0x1e, 0xe9, 0x7b, 0x10, 0x14, 0x52, 0x31, 0x7d, 0x2b, 0xc8, 0x96, 0x2b, 0x7c, 0x84, 0x67, 0xd3, + 0xe5, 0x47, 0x66, 0xd3, 0x1b, 0xde, 0x71, 0x85, 0xba, 0xe3, 0x59, 0x2e, 0x7a, 0x13, 0x52, 0xfb, + 0xb6, 0xdf, 0xf5, 0x0e, 0xd8, 0x93, 0x0b, 0x19, 0x66, 0xf9, 0x6c, 0xdb, 0x7e, 0x6b, 0xa7, 0x84, + 0x93, 0xfb, 0xb6, 0xdf, 0x3a, 0x30, 0x09, 0x0f, 0x82, 0xc4, 0xbe, 0xd4, 0xe7, 0x3b, 0xd4, 0x99, + 0x7d, 0xdb, 0xdf, 0xa4, 0x00, 0xf4, 0x3a, 0xe3, 0xe1, 0x9b, 0xfb, 0xfc, 0xd5, 0x77, 0x42, 0xd7, + 0x36, 0xf7, 0x8b, 0x1f, 0x40, 0x7c, 0x6b, 0x60, 0xee, 0xbf, 0xea, 0x25, 0x8f, 0xe2, 0xcf, 0x44, + 0x20, 0x8e, 0x9d, 0x85, 0xb7, 0x43, 0x02, 0xb1, 0x47, 0xe7, 0x88, 0xfd, 0x43, 0x00, 0x79, 0x11, + 0x5c, 0xac, 0x18, 0xf3, 0xee, 0x8f, 0x73, 0x5d, 0x0e, 0x70, 0xbf, 0xd4, 0x07, 0x3e, 0xc5, 0x0f, + 0x21, 0x59, 0xb3, 0x7c, 0xd7, 0xee, 0x9d, 0xb6, 0xa5, 0x11, 0xd1, 0xd2, 0x7f, 0x19, 0x81, 0xf4, + 0x96, 0x3d, 0x90, 0x2f, 0x4d, 0x1e, 0x73, 0x2c, 0x74, 0x16, 0x12, 0xa3, 0x81, 0x3d, 0x62, 0x8e, + 0x62, 0x02, 0xb3, 0x04, 0xdd, 0x05, 0xb2, 0xbf, 0x25, 0xad, 0x3a, 0xf2, 0x1f, 0x5d, 0x85, 0xc4, + 0x90, 0x2a, 0x42, 0x7c, 0xfe, 0xc5, 0x48, 0x96, 0x4b, 0x48, 0xe9, 0x99, 0x25, 0x7d, 0x90, 0x9a, + 0x9f, 0x4f, 0x9e, 0x87, 0xd8, 0x84, 0xbf, 0x35, 0xc8, 0x5f, 0x9b, 0xec, 0x18, 0x15, 0x4c, 0x60, + 0x24, 0x6b, 0x9f, 0xdf, 0x5d, 0xe5, 0x59, 0xdb, 0x24, 0x6b, 0xdf, 0xee, 0x17, 0xff, 0x5e, 0x04, + 0x92, 0xcc, 0x20, 0x90, 0x0f, 0x38, 0x47, 0x94, 0x07, 0x9c, 0x6f, 0xc9, 0xc9, 0x35, 0xba, 0xc8, + 0x86, 0x60, 0x38, 0x85, 0x3a, 0x24, 0x19, 0x24, 0x08, 0x23, 0xa4, 0x4c, 0xcd, 0x22, 0x8c, 0x90, + 0x82, 0x42, 0x83, 0x11, 0xc9, 0x02, 0xa2, 0x32, 0x18, 0x11, 0x43, 0x21, 0xe2, 0xcd, 0xb1, 0x92, + 0x4a, 0xbd, 0x9e, 0xe5, 0x79, 0xf4, 0x7c, 0x5f, 0x98, 0x34, 0xea, 0x7d, 0x63, 0x86, 0x24, 0xb4, + 0x88, 0x5b, 0x34, 0x1f, 0x42, 0xd2, 0xa4, 0x64, 0xfc, 0x03, 0x9e, 0x42, 0x08, 0x99, 0x71, 0xbc, + 0xcd, 0x7e, 0x04, 0x25, 0xc3, 0x2f, 0xec, 0x40, 0x92, 0x17, 0x48, 0x26, 0x00, 0xcb, 0x14, 0x37, + 0xa1, 0xe9, 0x7f, 0xd2, 0x9b, 0xcf, 0x5c, 0xdb, 0x17, 0x4f, 0x0d, 0xb3, 0x04, 0x81, 0x0e, 0x9f, + 0x8e, 0x1c, 0xe6, 0x21, 0xa5, 0x31, 0x4b, 0x14, 0x3b, 0xb0, 0xcc, 0x8a, 0x7b, 0x72, 0x60, 0xfb, + 0xd6, 0xc0, 0xf6, 0x7c, 0xb4, 0xc9, 0x3e, 0xdc, 0x7f, 0x66, 0xf5, 0xbb, 0xac, 0xa2, 0x62, 0xea, + 0x5f, 0x99, 0x53, 0x3f, 0xf1, 0x5d, 0x1e, 0xa7, 0x60, 0x59, 0xde, 0xdb, 0x3f, 0x00, 0x49, 0xee, + 0x12, 0xae, 0x02, 0xaa, 0x60, 0xe3, 0xb1, 0x8e, 0xbb, 0xf5, 0x06, 0xdd, 0x33, 0xc3, 0xec, 0xda, + 0x23, 0x82, 0x25, 0x0e, 0xc7, 0x9d, 0x7a, 0xdd, 0xa8, 0x6f, 0x6b, 0x51, 0x05, 0x56, 0xda, 0x6c, + 0x50, 0xbc, 0x98, 0x02, 0x6b, 0xb5, 0x1b, 0xcd, 0xa6, 0x5e, 0xd1, 0xe2, 0x6f, 0xff, 0x58, 0x14, + 0x32, 0xf2, 0x2e, 0x36, 0xd2, 0x20, 0x47, 0xef, 0xa1, 0xb5, 0xda, 0xa5, 0x6d, 0xc2, 0x27, 0x89, + 0xce, 0x40, 0x5e, 0x40, 0x70, 0x9b, 0x80, 0x5e, 0x93, 0x48, 0xa2, 0xb0, 0x88, 0x84, 0x3c, 0x32, + 0xaa, 0x55, 0x02, 0x49, 0x4b, 0xb2, 0x2d, 0xa3, 0x6e, 0xb4, 0x76, 0xe8, 0xd5, 0xcb, 0x65, 0xc8, + 0x32, 0x10, 0xbb, 0x23, 0x1a, 0x93, 0x00, 0x76, 0xcf, 0x8f, 0xed, 0x63, 0x52, 0x00, 0xbb, 0x79, + 0x99, 0x22, 0xf3, 0x3c, 0x4d, 0x57, 0x89, 0x87, 0x9e, 0x90, 0xa5, 0x54, 0x30, 0xab, 0x7c, 0x06, + 0x9d, 0x05, 0x8d, 0x5f, 0x9b, 0xc3, 0x7a, 0xa9, 0xbc, 0x43, 0x8f, 0x47, 0x40, 0x92, 0x6d, 0x13, + 0x17, 0x3e, 0x8b, 0xce, 0xc3, 0x39, 0x99, 0x0c, 0xdd, 0x62, 0xcc, 0x49, 0x8e, 0xf2, 0x0a, 0xe2, + 0xdb, 0x3f, 0x19, 0x81, 0xa5, 0xf0, 0x27, 0x10, 0x84, 0x9e, 0x91, 0x18, 0x8d, 0x7a, 0xb7, 0x53, + 0x6f, 0x75, 0x9a, 0x4d, 0x26, 0x50, 0x7a, 0xa7, 0x21, 0xc8, 0x12, 0xbb, 0x9a, 0x11, 0xd2, 0x4f, + 0x01, 0x58, 0x91, 0xc0, 0x59, 0xd0, 0x14, 0xb8, 0x10, 0xc3, 0x0a, 0x2c, 0x07, 0x50, 0x71, 0xe9, + 0x34, 0xc4, 0x59, 0x34, 0x38, 0xb1, 0x59, 0xfe, 0xb5, 0xef, 0xae, 0xbf, 0xf6, 0x1b, 0xdf, 0x5d, + 0x7f, 0xed, 0x37, 0xbf, 0xbb, 0x1e, 0xf9, 0xde, 0x77, 0xd7, 0x23, 0x7f, 0xf2, 0xdd, 0xf5, 0xc8, + 0xb7, 0x8f, 0xd6, 0x23, 0x3f, 0x7d, 0xb4, 0x1e, 0xf9, 0xc5, 0xa3, 0xf5, 0xc8, 0xbf, 0x3a, 0x5a, + 0x8f, 0xfc, 0xea, 0xd1, 0x7a, 0xe4, 0xd7, 0x8e, 0xd6, 0x23, 0xbf, 0x73, 0xb4, 0xfe, 0xda, 0xf7, + 0x8e, 0xd6, 0x23, 0x7f, 0xe3, 0xb7, 0xd6, 0x5f, 0xfb, 0x07, 0xbf, 0xb5, 0x1e, 0xf9, 0x26, 0xdb, + 0xd3, 0xfb, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x8e, 0xcf, 0xed, 0x0a, 0x99, 0x89, 0x00, 0x00, +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/mesos.pb_ffjson.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/mesos.pb_ffjson.go new file mode 100644 index 00000000..ae5cc2bf --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/mesos.pb_ffjson.go @@ -0,0 +1,63507 @@ +// DO NOT EDIT! +// Code generated by ffjson +// source: mesos.pb.go +// DO NOT EDIT! + +package mesos + +import ( + "bytes" + "encoding/base64" + "errors" + "fmt" + fflib "github.com/pquerna/ffjson/fflib/v1" + "reflect" +) + +func (mj *Address) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Address) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteByte('{') + if mj.Hostname != nil { + if true { + buf.WriteString(`"hostname":`) + fflib.WriteJsonString(buf, string(*mj.Hostname)) + buf.WriteByte(',') + } + } + if mj.IP != nil { + if true { + buf.WriteString(`"ip":`) + fflib.WriteJsonString(buf, string(*mj.IP)) + buf.WriteByte(',') + } + } + buf.WriteString(`"port":`) + fflib.FormatBits2(buf, uint64(mj.Port), 10, mj.Port < 0) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Addressbase = iota + ffj_t_Addressno_such_key + + ffj_t_Address_Hostname + + ffj_t_Address_IP + + ffj_t_Address_Port +) + +var ffj_key_Address_Hostname = []byte("hostname") + +var ffj_key_Address_IP = []byte("ip") + +var ffj_key_Address_Port = []byte("port") + +func (uj *Address) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Address) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Addressbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Addressno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'h': + + if bytes.Equal(ffj_key_Address_Hostname, kn) { + currentKey = ffj_t_Address_Hostname + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'i': + + if bytes.Equal(ffj_key_Address_IP, kn) { + currentKey = ffj_t_Address_IP + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_Address_Port, kn) { + currentKey = ffj_t_Address_Port + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Address_Port, kn) { + currentKey = ffj_t_Address_Port + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Address_IP, kn) { + currentKey = ffj_t_Address_IP + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Address_Hostname, kn) { + currentKey = ffj_t_Address_Hostname + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Addressno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Address_Hostname: + goto handle_Hostname + + case ffj_t_Address_IP: + goto handle_IP + + case ffj_t_Address_Port: + goto handle_Port + + case ffj_t_Addressno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Hostname: + + /* handler: uj.Hostname type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Hostname = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Hostname = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_IP: + + /* handler: uj.IP type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.IP = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.IP = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Port: + + /* handler: uj.Port type=int32 kind=int32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + uj.Port = int32(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *AgentID) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *AgentID) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"value":`) + fflib.WriteJsonString(buf, string(mj.Value)) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_AgentIDbase = iota + ffj_t_AgentIDno_such_key + + ffj_t_AgentID_Value +) + +var ffj_key_AgentID_Value = []byte("value") + +func (uj *AgentID) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *AgentID) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_AgentIDbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_AgentIDno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'v': + + if bytes.Equal(ffj_key_AgentID_Value, kn) { + currentKey = ffj_t_AgentID_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_AgentID_Value, kn) { + currentKey = ffj_t_AgentID_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_AgentIDno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_AgentID_Value: + goto handle_Value + + case ffj_t_AgentIDno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Value: + + /* handler: uj.Value type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Value = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *AgentInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *AgentInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "hostname":`) + fflib.WriteJsonString(buf, string(mj.Hostname)) + buf.WriteByte(',') + if mj.Port != nil { + if true { + buf.WriteString(`"port":`) + fflib.FormatBits2(buf, uint64(*mj.Port), 10, *mj.Port < 0) + buf.WriteByte(',') + } + } + buf.WriteString(`"resources":`) + if mj.Resources != nil { + buf.WriteString(`[`) + for i, v := range mj.Resources { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteString(`,"attributes":`) + if mj.Attributes != nil { + buf.WriteString(`[`) + for i, v := range mj.Attributes { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.ID != nil { + if true { + buf.WriteString(`"id":`) + + { + + err = mj.ID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Domain != nil { + if true { + buf.WriteString(`"domain":`) + + { + + err = mj.Domain.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_AgentInfobase = iota + ffj_t_AgentInfono_such_key + + ffj_t_AgentInfo_Hostname + + ffj_t_AgentInfo_Port + + ffj_t_AgentInfo_Resources + + ffj_t_AgentInfo_Attributes + + ffj_t_AgentInfo_ID + + ffj_t_AgentInfo_Domain +) + +var ffj_key_AgentInfo_Hostname = []byte("hostname") + +var ffj_key_AgentInfo_Port = []byte("port") + +var ffj_key_AgentInfo_Resources = []byte("resources") + +var ffj_key_AgentInfo_Attributes = []byte("attributes") + +var ffj_key_AgentInfo_ID = []byte("id") + +var ffj_key_AgentInfo_Domain = []byte("domain") + +func (uj *AgentInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *AgentInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_AgentInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_AgentInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'a': + + if bytes.Equal(ffj_key_AgentInfo_Attributes, kn) { + currentKey = ffj_t_AgentInfo_Attributes + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'd': + + if bytes.Equal(ffj_key_AgentInfo_Domain, kn) { + currentKey = ffj_t_AgentInfo_Domain + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'h': + + if bytes.Equal(ffj_key_AgentInfo_Hostname, kn) { + currentKey = ffj_t_AgentInfo_Hostname + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'i': + + if bytes.Equal(ffj_key_AgentInfo_ID, kn) { + currentKey = ffj_t_AgentInfo_ID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_AgentInfo_Port, kn) { + currentKey = ffj_t_AgentInfo_Port + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_AgentInfo_Resources, kn) { + currentKey = ffj_t_AgentInfo_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_AgentInfo_Domain, kn) { + currentKey = ffj_t_AgentInfo_Domain + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_AgentInfo_ID, kn) { + currentKey = ffj_t_AgentInfo_ID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_AgentInfo_Attributes, kn) { + currentKey = ffj_t_AgentInfo_Attributes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_AgentInfo_Resources, kn) { + currentKey = ffj_t_AgentInfo_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_AgentInfo_Port, kn) { + currentKey = ffj_t_AgentInfo_Port + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_AgentInfo_Hostname, kn) { + currentKey = ffj_t_AgentInfo_Hostname + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_AgentInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_AgentInfo_Hostname: + goto handle_Hostname + + case ffj_t_AgentInfo_Port: + goto handle_Port + + case ffj_t_AgentInfo_Resources: + goto handle_Resources + + case ffj_t_AgentInfo_Attributes: + goto handle_Attributes + + case ffj_t_AgentInfo_ID: + goto handle_ID + + case ffj_t_AgentInfo_Domain: + goto handle_Domain + + case ffj_t_AgentInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Hostname: + + /* handler: uj.Hostname type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Hostname = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Port: + + /* handler: uj.Port type=int32 kind=int32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Port = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int32(tval) + uj.Port = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Resources: + + /* handler: uj.Resources type=[]mesos.Resource kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Resources = nil + } else { + + uj.Resources = []Resource{} + + wantVal := true + + for { + + var tmp_uj__Resources Resource + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Resources type=mesos.Resource kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Resources.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Resources = append(uj.Resources, tmp_uj__Resources) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Attributes: + + /* handler: uj.Attributes type=[]mesos.Attribute kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Attributes = nil + } else { + + uj.Attributes = []Attribute{} + + wantVal := true + + for { + + var tmp_uj__Attributes Attribute + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Attributes type=mesos.Attribute kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Attributes.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Attributes = append(uj.Attributes, tmp_uj__Attributes) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ID: + + /* handler: uj.ID type=mesos.AgentID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.ID = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.ID == nil { + uj.ID = new(AgentID) + } + + err = uj.ID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Domain: + + /* handler: uj.Domain type=mesos.DomainInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Domain = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Domain == nil { + uj.Domain = new(DomainInfo) + } + + err = uj.Domain.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *AgentInfo_Capability) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *AgentInfo_Capability) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_AgentInfo_Capabilitybase = iota + ffj_t_AgentInfo_Capabilityno_such_key + + ffj_t_AgentInfo_Capability_Type +) + +var ffj_key_AgentInfo_Capability_Type = []byte("type") + +func (uj *AgentInfo_Capability) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *AgentInfo_Capability) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_AgentInfo_Capabilitybase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_AgentInfo_Capabilityno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 't': + + if bytes.Equal(ffj_key_AgentInfo_Capability_Type, kn) { + currentKey = ffj_t_AgentInfo_Capability_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_AgentInfo_Capability_Type, kn) { + currentKey = ffj_t_AgentInfo_Capability_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_AgentInfo_Capabilityno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_AgentInfo_Capability_Type: + goto handle_Type + + case ffj_t_AgentInfo_Capabilityno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=mesos.AgentInfo_Capability_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Attribute) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Attribute) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "name":`) + fflib.WriteJsonString(buf, string(mj.Name)) + buf.WriteString(`,"type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + if mj.Scalar != nil { + if true { + buf.WriteString(`"scalar":`) + + { + + err = mj.Scalar.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Ranges != nil { + if true { + buf.WriteString(`"ranges":`) + + { + + err = mj.Ranges.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Set != nil { + if true { + buf.WriteString(`"set":`) + + { + + err = mj.Set.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Text != nil { + if true { + buf.WriteString(`"text":`) + + { + + err = mj.Text.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Attributebase = iota + ffj_t_Attributeno_such_key + + ffj_t_Attribute_Name + + ffj_t_Attribute_Type + + ffj_t_Attribute_Scalar + + ffj_t_Attribute_Ranges + + ffj_t_Attribute_Set + + ffj_t_Attribute_Text +) + +var ffj_key_Attribute_Name = []byte("name") + +var ffj_key_Attribute_Type = []byte("type") + +var ffj_key_Attribute_Scalar = []byte("scalar") + +var ffj_key_Attribute_Ranges = []byte("ranges") + +var ffj_key_Attribute_Set = []byte("set") + +var ffj_key_Attribute_Text = []byte("text") + +func (uj *Attribute) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Attribute) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Attributebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Attributeno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'n': + + if bytes.Equal(ffj_key_Attribute_Name, kn) { + currentKey = ffj_t_Attribute_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_Attribute_Ranges, kn) { + currentKey = ffj_t_Attribute_Ranges + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_Attribute_Scalar, kn) { + currentKey = ffj_t_Attribute_Scalar + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Attribute_Set, kn) { + currentKey = ffj_t_Attribute_Set + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_Attribute_Type, kn) { + currentKey = ffj_t_Attribute_Type + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Attribute_Text, kn) { + currentKey = ffj_t_Attribute_Text + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Attribute_Text, kn) { + currentKey = ffj_t_Attribute_Text + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Attribute_Set, kn) { + currentKey = ffj_t_Attribute_Set + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Attribute_Ranges, kn) { + currentKey = ffj_t_Attribute_Ranges + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Attribute_Scalar, kn) { + currentKey = ffj_t_Attribute_Scalar + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Attribute_Type, kn) { + currentKey = ffj_t_Attribute_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Attribute_Name, kn) { + currentKey = ffj_t_Attribute_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Attributeno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Attribute_Name: + goto handle_Name + + case ffj_t_Attribute_Type: + goto handle_Type + + case ffj_t_Attribute_Scalar: + goto handle_Scalar + + case ffj_t_Attribute_Ranges: + goto handle_Ranges + + case ffj_t_Attribute_Set: + goto handle_Set + + case ffj_t_Attribute_Text: + goto handle_Text + + case ffj_t_Attributeno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Name: + + /* handler: uj.Name type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Name = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Type: + + /* handler: uj.Type type=mesos.Value_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Scalar: + + /* handler: uj.Scalar type=mesos.Value_Scalar kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Scalar = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Scalar == nil { + uj.Scalar = new(Value_Scalar) + } + + err = uj.Scalar.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Ranges: + + /* handler: uj.Ranges type=mesos.Value_Ranges kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Ranges = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Ranges == nil { + uj.Ranges = new(Value_Ranges) + } + + err = uj.Ranges.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Set: + + /* handler: uj.Set type=mesos.Value_Set kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Set = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Set == nil { + uj.Set = new(Value_Set) + } + + err = uj.Set.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Text: + + /* handler: uj.Text type=mesos.Value_Text kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Text = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Text == nil { + uj.Text = new(Value_Text) + } + + err = uj.Text.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *CSIPluginContainerInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CSIPluginContainerInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if len(mj.Services) != 0 { + buf.WriteString(`"services":`) + if mj.Services != nil { + buf.WriteString(`[`) + for i, v := range mj.Services { + if i != 0 { + buf.WriteString(`,`) + } + + { + + obj, err = v.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + } + if mj.Command != nil { + if true { + buf.WriteString(`"command":`) + + { + + err = mj.Command.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"resources":`) + if mj.Resources != nil { + buf.WriteString(`[`) + for i, v := range mj.Resources { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.Container != nil { + if true { + buf.WriteString(`"container":`) + + { + + err = mj.Container.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_CSIPluginContainerInfobase = iota + ffj_t_CSIPluginContainerInfono_such_key + + ffj_t_CSIPluginContainerInfo_Services + + ffj_t_CSIPluginContainerInfo_Command + + ffj_t_CSIPluginContainerInfo_Resources + + ffj_t_CSIPluginContainerInfo_Container +) + +var ffj_key_CSIPluginContainerInfo_Services = []byte("services") + +var ffj_key_CSIPluginContainerInfo_Command = []byte("command") + +var ffj_key_CSIPluginContainerInfo_Resources = []byte("resources") + +var ffj_key_CSIPluginContainerInfo_Container = []byte("container") + +func (uj *CSIPluginContainerInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CSIPluginContainerInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CSIPluginContainerInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CSIPluginContainerInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_CSIPluginContainerInfo_Command, kn) { + currentKey = ffj_t_CSIPluginContainerInfo_Command + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_CSIPluginContainerInfo_Container, kn) { + currentKey = ffj_t_CSIPluginContainerInfo_Container + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_CSIPluginContainerInfo_Resources, kn) { + currentKey = ffj_t_CSIPluginContainerInfo_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_CSIPluginContainerInfo_Services, kn) { + currentKey = ffj_t_CSIPluginContainerInfo_Services + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_CSIPluginContainerInfo_Container, kn) { + currentKey = ffj_t_CSIPluginContainerInfo_Container + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_CSIPluginContainerInfo_Resources, kn) { + currentKey = ffj_t_CSIPluginContainerInfo_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CSIPluginContainerInfo_Command, kn) { + currentKey = ffj_t_CSIPluginContainerInfo_Command + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_CSIPluginContainerInfo_Services, kn) { + currentKey = ffj_t_CSIPluginContainerInfo_Services + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_CSIPluginContainerInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CSIPluginContainerInfo_Services: + goto handle_Services + + case ffj_t_CSIPluginContainerInfo_Command: + goto handle_Command + + case ffj_t_CSIPluginContainerInfo_Resources: + goto handle_Resources + + case ffj_t_CSIPluginContainerInfo_Container: + goto handle_Container + + case ffj_t_CSIPluginContainerInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Services: + + /* handler: uj.Services type=[]mesos.CSIPluginContainerInfo_Service kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Services = nil + } else { + + uj.Services = []CSIPluginContainerInfo_Service{} + + wantVal := true + + for { + + var tmp_uj__Services CSIPluginContainerInfo_Service + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Services type=mesos.CSIPluginContainerInfo_Service kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = tmp_uj__Services.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + uj.Services = append(uj.Services, tmp_uj__Services) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Command: + + /* handler: uj.Command type=mesos.CommandInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Command = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Command == nil { + uj.Command = new(CommandInfo) + } + + err = uj.Command.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Resources: + + /* handler: uj.Resources type=[]mesos.Resource kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Resources = nil + } else { + + uj.Resources = []Resource{} + + wantVal := true + + for { + + var tmp_uj__Resources Resource + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Resources type=mesos.Resource kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Resources.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Resources = append(uj.Resources, tmp_uj__Resources) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Container: + + /* handler: uj.Container type=mesos.ContainerInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Container = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Container == nil { + uj.Container = new(ContainerInfo) + } + + err = uj.Container.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *CSIPluginInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CSIPluginInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"type":`) + fflib.WriteJsonString(buf, string(mj.Type)) + buf.WriteString(`,"name":`) + fflib.WriteJsonString(buf, string(mj.Name)) + buf.WriteString(`,"containers":`) + if mj.Containers != nil { + buf.WriteString(`[`) + for i, v := range mj.Containers { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_CSIPluginInfobase = iota + ffj_t_CSIPluginInfono_such_key + + ffj_t_CSIPluginInfo_Type + + ffj_t_CSIPluginInfo_Name + + ffj_t_CSIPluginInfo_Containers +) + +var ffj_key_CSIPluginInfo_Type = []byte("type") + +var ffj_key_CSIPluginInfo_Name = []byte("name") + +var ffj_key_CSIPluginInfo_Containers = []byte("containers") + +func (uj *CSIPluginInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CSIPluginInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CSIPluginInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CSIPluginInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_CSIPluginInfo_Containers, kn) { + currentKey = ffj_t_CSIPluginInfo_Containers + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'n': + + if bytes.Equal(ffj_key_CSIPluginInfo_Name, kn) { + currentKey = ffj_t_CSIPluginInfo_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_CSIPluginInfo_Type, kn) { + currentKey = ffj_t_CSIPluginInfo_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_CSIPluginInfo_Containers, kn) { + currentKey = ffj_t_CSIPluginInfo_Containers + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CSIPluginInfo_Name, kn) { + currentKey = ffj_t_CSIPluginInfo_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CSIPluginInfo_Type, kn) { + currentKey = ffj_t_CSIPluginInfo_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_CSIPluginInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CSIPluginInfo_Type: + goto handle_Type + + case ffj_t_CSIPluginInfo_Name: + goto handle_Name + + case ffj_t_CSIPluginInfo_Containers: + goto handle_Containers + + case ffj_t_CSIPluginInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Type = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Name: + + /* handler: uj.Name type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Name = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Containers: + + /* handler: uj.Containers type=[]mesos.CSIPluginContainerInfo kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Containers = nil + } else { + + uj.Containers = []CSIPluginContainerInfo{} + + wantVal := true + + for { + + var tmp_uj__Containers CSIPluginContainerInfo + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Containers type=mesos.CSIPluginContainerInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Containers.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Containers = append(uj.Containers, tmp_uj__Containers) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *CapabilityInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CapabilityInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if len(mj.Capabilities) != 0 { + buf.WriteString(`"capabilities":`) + if mj.Capabilities != nil { + buf.WriteString(`[`) + for i, v := range mj.Capabilities { + if i != 0 { + buf.WriteString(`,`) + } + + { + + obj, err = v.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_CapabilityInfobase = iota + ffj_t_CapabilityInfono_such_key + + ffj_t_CapabilityInfo_Capabilities +) + +var ffj_key_CapabilityInfo_Capabilities = []byte("capabilities") + +func (uj *CapabilityInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CapabilityInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CapabilityInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CapabilityInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_CapabilityInfo_Capabilities, kn) { + currentKey = ffj_t_CapabilityInfo_Capabilities + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_CapabilityInfo_Capabilities, kn) { + currentKey = ffj_t_CapabilityInfo_Capabilities + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_CapabilityInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CapabilityInfo_Capabilities: + goto handle_Capabilities + + case ffj_t_CapabilityInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Capabilities: + + /* handler: uj.Capabilities type=[]mesos.CapabilityInfo_Capability kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Capabilities = nil + } else { + + uj.Capabilities = []CapabilityInfo_Capability{} + + wantVal := true + + for { + + var tmp_uj__Capabilities CapabilityInfo_Capability + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Capabilities type=mesos.CapabilityInfo_Capability kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = tmp_uj__Capabilities.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + uj.Capabilities = append(uj.Capabilities, tmp_uj__Capabilities) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *CgroupInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CgroupInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.NetCLS != nil { + if true { + buf.WriteString(`"net_cls":`) + + { + + err = mj.NetCLS.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_CgroupInfobase = iota + ffj_t_CgroupInfono_such_key + + ffj_t_CgroupInfo_NetCLS +) + +var ffj_key_CgroupInfo_NetCLS = []byte("net_cls") + +func (uj *CgroupInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CgroupInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CgroupInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CgroupInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'n': + + if bytes.Equal(ffj_key_CgroupInfo_NetCLS, kn) { + currentKey = ffj_t_CgroupInfo_NetCLS + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_CgroupInfo_NetCLS, kn) { + currentKey = ffj_t_CgroupInfo_NetCLS + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_CgroupInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CgroupInfo_NetCLS: + goto handle_NetCLS + + case ffj_t_CgroupInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_NetCLS: + + /* handler: uj.NetCLS type=mesos.CgroupInfo_NetCls kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.NetCLS = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.NetCLS == nil { + uj.NetCLS = new(CgroupInfo_NetCls) + } + + err = uj.NetCLS.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *CgroupInfo_Blkio) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CgroupInfo_Blkio) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{}`) + return nil +} + +const ( + ffj_t_CgroupInfo_Blkiobase = iota + ffj_t_CgroupInfo_Blkiono_such_key +) + +func (uj *CgroupInfo_Blkio) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CgroupInfo_Blkio) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CgroupInfo_Blkiobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CgroupInfo_Blkiono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + } + + currentKey = ffj_t_CgroupInfo_Blkiono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CgroupInfo_Blkiono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *CgroupInfo_Blkio_CFQ) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CgroupInfo_Blkio_CFQ) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{}`) + return nil +} + +const ( + ffj_t_CgroupInfo_Blkio_CFQbase = iota + ffj_t_CgroupInfo_Blkio_CFQno_such_key +) + +func (uj *CgroupInfo_Blkio_CFQ) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CgroupInfo_Blkio_CFQ) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CgroupInfo_Blkio_CFQbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CgroupInfo_Blkio_CFQno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + } + + currentKey = ffj_t_CgroupInfo_Blkio_CFQno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CgroupInfo_Blkio_CFQno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *CgroupInfo_Blkio_CFQ_Statistics) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CgroupInfo_Blkio_CFQ_Statistics) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteByte('{') + if mj.Device != nil { + if true { + buf.WriteString(`"device":`) + + { + + err = mj.Device.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Sectors != nil { + if true { + buf.WriteString(`"sectors":`) + fflib.FormatBits2(buf, uint64(*mj.Sectors), 10, false) + buf.WriteByte(',') + } + } + if mj.Time != nil { + if true { + buf.WriteString(`"time":`) + fflib.FormatBits2(buf, uint64(*mj.Time), 10, false) + buf.WriteByte(',') + } + } + buf.WriteString(`"io_serviced":`) + if mj.IOServiced != nil { + buf.WriteString(`[`) + for i, v := range mj.IOServiced { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteString(`,"io_service_bytes":`) + if mj.IOServiceBytes != nil { + buf.WriteString(`[`) + for i, v := range mj.IOServiceBytes { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteString(`,"io_service_time":`) + if mj.IOServiceTime != nil { + buf.WriteString(`[`) + for i, v := range mj.IOServiceTime { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteString(`,"io_wait_time":`) + if mj.IOWaitTime != nil { + buf.WriteString(`[`) + for i, v := range mj.IOWaitTime { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteString(`,"io_merged":`) + if mj.IOMerged != nil { + buf.WriteString(`[`) + for i, v := range mj.IOMerged { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteString(`,"io_queued":`) + if mj.IOQueued != nil { + buf.WriteString(`[`) + for i, v := range mj.IOQueued { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_CgroupInfo_Blkio_CFQ_Statisticsbase = iota + ffj_t_CgroupInfo_Blkio_CFQ_Statisticsno_such_key + + ffj_t_CgroupInfo_Blkio_CFQ_Statistics_Device + + ffj_t_CgroupInfo_Blkio_CFQ_Statistics_Sectors + + ffj_t_CgroupInfo_Blkio_CFQ_Statistics_Time + + ffj_t_CgroupInfo_Blkio_CFQ_Statistics_IOServiced + + ffj_t_CgroupInfo_Blkio_CFQ_Statistics_IOServiceBytes + + ffj_t_CgroupInfo_Blkio_CFQ_Statistics_IOServiceTime + + ffj_t_CgroupInfo_Blkio_CFQ_Statistics_IOWaitTime + + ffj_t_CgroupInfo_Blkio_CFQ_Statistics_IOMerged + + ffj_t_CgroupInfo_Blkio_CFQ_Statistics_IOQueued +) + +var ffj_key_CgroupInfo_Blkio_CFQ_Statistics_Device = []byte("device") + +var ffj_key_CgroupInfo_Blkio_CFQ_Statistics_Sectors = []byte("sectors") + +var ffj_key_CgroupInfo_Blkio_CFQ_Statistics_Time = []byte("time") + +var ffj_key_CgroupInfo_Blkio_CFQ_Statistics_IOServiced = []byte("io_serviced") + +var ffj_key_CgroupInfo_Blkio_CFQ_Statistics_IOServiceBytes = []byte("io_service_bytes") + +var ffj_key_CgroupInfo_Blkio_CFQ_Statistics_IOServiceTime = []byte("io_service_time") + +var ffj_key_CgroupInfo_Blkio_CFQ_Statistics_IOWaitTime = []byte("io_wait_time") + +var ffj_key_CgroupInfo_Blkio_CFQ_Statistics_IOMerged = []byte("io_merged") + +var ffj_key_CgroupInfo_Blkio_CFQ_Statistics_IOQueued = []byte("io_queued") + +func (uj *CgroupInfo_Blkio_CFQ_Statistics) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CgroupInfo_Blkio_CFQ_Statistics) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CgroupInfo_Blkio_CFQ_Statisticsbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CgroupInfo_Blkio_CFQ_Statisticsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'd': + + if bytes.Equal(ffj_key_CgroupInfo_Blkio_CFQ_Statistics_Device, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_CFQ_Statistics_Device + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'i': + + if bytes.Equal(ffj_key_CgroupInfo_Blkio_CFQ_Statistics_IOServiced, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_CFQ_Statistics_IOServiced + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_CgroupInfo_Blkio_CFQ_Statistics_IOServiceBytes, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_CFQ_Statistics_IOServiceBytes + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_CgroupInfo_Blkio_CFQ_Statistics_IOServiceTime, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_CFQ_Statistics_IOServiceTime + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_CgroupInfo_Blkio_CFQ_Statistics_IOWaitTime, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_CFQ_Statistics_IOWaitTime + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_CgroupInfo_Blkio_CFQ_Statistics_IOMerged, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_CFQ_Statistics_IOMerged + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_CgroupInfo_Blkio_CFQ_Statistics_IOQueued, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_CFQ_Statistics_IOQueued + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_CgroupInfo_Blkio_CFQ_Statistics_Sectors, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_CFQ_Statistics_Sectors + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_CgroupInfo_Blkio_CFQ_Statistics_Time, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_CFQ_Statistics_Time + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_CgroupInfo_Blkio_CFQ_Statistics_IOQueued, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_CFQ_Statistics_IOQueued + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_CgroupInfo_Blkio_CFQ_Statistics_IOMerged, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_CFQ_Statistics_IOMerged + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_CgroupInfo_Blkio_CFQ_Statistics_IOWaitTime, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_CFQ_Statistics_IOWaitTime + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_CgroupInfo_Blkio_CFQ_Statistics_IOServiceTime, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_CFQ_Statistics_IOServiceTime + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_CgroupInfo_Blkio_CFQ_Statistics_IOServiceBytes, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_CFQ_Statistics_IOServiceBytes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_CgroupInfo_Blkio_CFQ_Statistics_IOServiced, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_CFQ_Statistics_IOServiced + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CgroupInfo_Blkio_CFQ_Statistics_Time, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_CFQ_Statistics_Time + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_CgroupInfo_Blkio_CFQ_Statistics_Sectors, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_CFQ_Statistics_Sectors + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CgroupInfo_Blkio_CFQ_Statistics_Device, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_CFQ_Statistics_Device + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_CgroupInfo_Blkio_CFQ_Statisticsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CgroupInfo_Blkio_CFQ_Statistics_Device: + goto handle_Device + + case ffj_t_CgroupInfo_Blkio_CFQ_Statistics_Sectors: + goto handle_Sectors + + case ffj_t_CgroupInfo_Blkio_CFQ_Statistics_Time: + goto handle_Time + + case ffj_t_CgroupInfo_Blkio_CFQ_Statistics_IOServiced: + goto handle_IOServiced + + case ffj_t_CgroupInfo_Blkio_CFQ_Statistics_IOServiceBytes: + goto handle_IOServiceBytes + + case ffj_t_CgroupInfo_Blkio_CFQ_Statistics_IOServiceTime: + goto handle_IOServiceTime + + case ffj_t_CgroupInfo_Blkio_CFQ_Statistics_IOWaitTime: + goto handle_IOWaitTime + + case ffj_t_CgroupInfo_Blkio_CFQ_Statistics_IOMerged: + goto handle_IOMerged + + case ffj_t_CgroupInfo_Blkio_CFQ_Statistics_IOQueued: + goto handle_IOQueued + + case ffj_t_CgroupInfo_Blkio_CFQ_Statisticsno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Device: + + /* handler: uj.Device type=mesos.Device_Number kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Device = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Device == nil { + uj.Device = new(Device_Number) + } + + err = uj.Device.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Sectors: + + /* handler: uj.Sectors type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Sectors = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.Sectors = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Time: + + /* handler: uj.Time type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Time = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.Time = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_IOServiced: + + /* handler: uj.IOServiced type=[]mesos.CgroupInfo_Blkio_Value kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.IOServiced = nil + } else { + + uj.IOServiced = []CgroupInfo_Blkio_Value{} + + wantVal := true + + for { + + var tmp_uj__IOServiced CgroupInfo_Blkio_Value + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__IOServiced type=mesos.CgroupInfo_Blkio_Value kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__IOServiced.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.IOServiced = append(uj.IOServiced, tmp_uj__IOServiced) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_IOServiceBytes: + + /* handler: uj.IOServiceBytes type=[]mesos.CgroupInfo_Blkio_Value kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.IOServiceBytes = nil + } else { + + uj.IOServiceBytes = []CgroupInfo_Blkio_Value{} + + wantVal := true + + for { + + var tmp_uj__IOServiceBytes CgroupInfo_Blkio_Value + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__IOServiceBytes type=mesos.CgroupInfo_Blkio_Value kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__IOServiceBytes.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.IOServiceBytes = append(uj.IOServiceBytes, tmp_uj__IOServiceBytes) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_IOServiceTime: + + /* handler: uj.IOServiceTime type=[]mesos.CgroupInfo_Blkio_Value kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.IOServiceTime = nil + } else { + + uj.IOServiceTime = []CgroupInfo_Blkio_Value{} + + wantVal := true + + for { + + var tmp_uj__IOServiceTime CgroupInfo_Blkio_Value + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__IOServiceTime type=mesos.CgroupInfo_Blkio_Value kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__IOServiceTime.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.IOServiceTime = append(uj.IOServiceTime, tmp_uj__IOServiceTime) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_IOWaitTime: + + /* handler: uj.IOWaitTime type=[]mesos.CgroupInfo_Blkio_Value kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.IOWaitTime = nil + } else { + + uj.IOWaitTime = []CgroupInfo_Blkio_Value{} + + wantVal := true + + for { + + var tmp_uj__IOWaitTime CgroupInfo_Blkio_Value + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__IOWaitTime type=mesos.CgroupInfo_Blkio_Value kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__IOWaitTime.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.IOWaitTime = append(uj.IOWaitTime, tmp_uj__IOWaitTime) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_IOMerged: + + /* handler: uj.IOMerged type=[]mesos.CgroupInfo_Blkio_Value kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.IOMerged = nil + } else { + + uj.IOMerged = []CgroupInfo_Blkio_Value{} + + wantVal := true + + for { + + var tmp_uj__IOMerged CgroupInfo_Blkio_Value + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__IOMerged type=mesos.CgroupInfo_Blkio_Value kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__IOMerged.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.IOMerged = append(uj.IOMerged, tmp_uj__IOMerged) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_IOQueued: + + /* handler: uj.IOQueued type=[]mesos.CgroupInfo_Blkio_Value kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.IOQueued = nil + } else { + + uj.IOQueued = []CgroupInfo_Blkio_Value{} + + wantVal := true + + for { + + var tmp_uj__IOQueued CgroupInfo_Blkio_Value + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__IOQueued type=mesos.CgroupInfo_Blkio_Value kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__IOQueued.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.IOQueued = append(uj.IOQueued, tmp_uj__IOQueued) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *CgroupInfo_Blkio_Statistics) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CgroupInfo_Blkio_Statistics) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "cfq":`) + if mj.CFQ != nil { + buf.WriteString(`[`) + for i, v := range mj.CFQ { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteString(`,"cfq_recursive":`) + if mj.CFQRecursive != nil { + buf.WriteString(`[`) + for i, v := range mj.CFQRecursive { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if len(mj.Throttling) != 0 { + buf.WriteString(`"throttling":`) + if mj.Throttling != nil { + buf.WriteString(`[`) + for i, v := range mj.Throttling { + if i != 0 { + buf.WriteString(`,`) + } + + { + + if v == nil { + buf.WriteString("null") + return nil + } + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_CgroupInfo_Blkio_Statisticsbase = iota + ffj_t_CgroupInfo_Blkio_Statisticsno_such_key + + ffj_t_CgroupInfo_Blkio_Statistics_CFQ + + ffj_t_CgroupInfo_Blkio_Statistics_CFQRecursive + + ffj_t_CgroupInfo_Blkio_Statistics_Throttling +) + +var ffj_key_CgroupInfo_Blkio_Statistics_CFQ = []byte("cfq") + +var ffj_key_CgroupInfo_Blkio_Statistics_CFQRecursive = []byte("cfq_recursive") + +var ffj_key_CgroupInfo_Blkio_Statistics_Throttling = []byte("throttling") + +func (uj *CgroupInfo_Blkio_Statistics) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CgroupInfo_Blkio_Statistics) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CgroupInfo_Blkio_Statisticsbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CgroupInfo_Blkio_Statisticsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_CgroupInfo_Blkio_Statistics_CFQ, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_Statistics_CFQ + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_CgroupInfo_Blkio_Statistics_CFQRecursive, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_Statistics_CFQRecursive + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_CgroupInfo_Blkio_Statistics_Throttling, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_Statistics_Throttling + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_CgroupInfo_Blkio_Statistics_Throttling, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_Statistics_Throttling + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_CgroupInfo_Blkio_Statistics_CFQRecursive, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_Statistics_CFQRecursive + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CgroupInfo_Blkio_Statistics_CFQ, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_Statistics_CFQ + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_CgroupInfo_Blkio_Statisticsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CgroupInfo_Blkio_Statistics_CFQ: + goto handle_CFQ + + case ffj_t_CgroupInfo_Blkio_Statistics_CFQRecursive: + goto handle_CFQRecursive + + case ffj_t_CgroupInfo_Blkio_Statistics_Throttling: + goto handle_Throttling + + case ffj_t_CgroupInfo_Blkio_Statisticsno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_CFQ: + + /* handler: uj.CFQ type=[]mesos.CgroupInfo_Blkio_CFQ_Statistics kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.CFQ = nil + } else { + + uj.CFQ = []CgroupInfo_Blkio_CFQ_Statistics{} + + wantVal := true + + for { + + var tmp_uj__CFQ CgroupInfo_Blkio_CFQ_Statistics + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__CFQ type=mesos.CgroupInfo_Blkio_CFQ_Statistics kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__CFQ.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.CFQ = append(uj.CFQ, tmp_uj__CFQ) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_CFQRecursive: + + /* handler: uj.CFQRecursive type=[]mesos.CgroupInfo_Blkio_CFQ_Statistics kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.CFQRecursive = nil + } else { + + uj.CFQRecursive = []CgroupInfo_Blkio_CFQ_Statistics{} + + wantVal := true + + for { + + var tmp_uj__CFQRecursive CgroupInfo_Blkio_CFQ_Statistics + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__CFQRecursive type=mesos.CgroupInfo_Blkio_CFQ_Statistics kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__CFQRecursive.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.CFQRecursive = append(uj.CFQRecursive, tmp_uj__CFQRecursive) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Throttling: + + /* handler: uj.Throttling type=[]*mesos.CgroupInfo_Blkio_Throttling_Statistics kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Throttling = nil + } else { + + uj.Throttling = []*CgroupInfo_Blkio_Throttling_Statistics{} + + wantVal := true + + for { + + var tmp_uj__Throttling *CgroupInfo_Blkio_Throttling_Statistics + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Throttling type=*mesos.CgroupInfo_Blkio_Throttling_Statistics kind=ptr quoted=false*/ + + { + if tok == fflib.FFTok_null { + + tmp_uj__Throttling = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if tmp_uj__Throttling == nil { + tmp_uj__Throttling = new(CgroupInfo_Blkio_Throttling_Statistics) + } + + err = tmp_uj__Throttling.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Throttling = append(uj.Throttling, tmp_uj__Throttling) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *CgroupInfo_Blkio_Throttling) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CgroupInfo_Blkio_Throttling) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{}`) + return nil +} + +const ( + ffj_t_CgroupInfo_Blkio_Throttlingbase = iota + ffj_t_CgroupInfo_Blkio_Throttlingno_such_key +) + +func (uj *CgroupInfo_Blkio_Throttling) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CgroupInfo_Blkio_Throttling) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CgroupInfo_Blkio_Throttlingbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CgroupInfo_Blkio_Throttlingno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + } + + currentKey = ffj_t_CgroupInfo_Blkio_Throttlingno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CgroupInfo_Blkio_Throttlingno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *CgroupInfo_Blkio_Throttling_Statistics) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CgroupInfo_Blkio_Throttling_Statistics) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteByte('{') + if mj.Device != nil { + if true { + buf.WriteString(`"device":`) + + { + + err = mj.Device.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"io_serviced":`) + if mj.IOServiced != nil { + buf.WriteString(`[`) + for i, v := range mj.IOServiced { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteString(`,"io_service_bytes":`) + if mj.IOServiceBytes != nil { + buf.WriteString(`[`) + for i, v := range mj.IOServiceBytes { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_CgroupInfo_Blkio_Throttling_Statisticsbase = iota + ffj_t_CgroupInfo_Blkio_Throttling_Statisticsno_such_key + + ffj_t_CgroupInfo_Blkio_Throttling_Statistics_Device + + ffj_t_CgroupInfo_Blkio_Throttling_Statistics_IOServiced + + ffj_t_CgroupInfo_Blkio_Throttling_Statistics_IOServiceBytes +) + +var ffj_key_CgroupInfo_Blkio_Throttling_Statistics_Device = []byte("device") + +var ffj_key_CgroupInfo_Blkio_Throttling_Statistics_IOServiced = []byte("io_serviced") + +var ffj_key_CgroupInfo_Blkio_Throttling_Statistics_IOServiceBytes = []byte("io_service_bytes") + +func (uj *CgroupInfo_Blkio_Throttling_Statistics) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CgroupInfo_Blkio_Throttling_Statistics) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CgroupInfo_Blkio_Throttling_Statisticsbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CgroupInfo_Blkio_Throttling_Statisticsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'd': + + if bytes.Equal(ffj_key_CgroupInfo_Blkio_Throttling_Statistics_Device, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_Throttling_Statistics_Device + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'i': + + if bytes.Equal(ffj_key_CgroupInfo_Blkio_Throttling_Statistics_IOServiced, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_Throttling_Statistics_IOServiced + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_CgroupInfo_Blkio_Throttling_Statistics_IOServiceBytes, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_Throttling_Statistics_IOServiceBytes + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_CgroupInfo_Blkio_Throttling_Statistics_IOServiceBytes, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_Throttling_Statistics_IOServiceBytes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_CgroupInfo_Blkio_Throttling_Statistics_IOServiced, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_Throttling_Statistics_IOServiced + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CgroupInfo_Blkio_Throttling_Statistics_Device, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_Throttling_Statistics_Device + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_CgroupInfo_Blkio_Throttling_Statisticsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CgroupInfo_Blkio_Throttling_Statistics_Device: + goto handle_Device + + case ffj_t_CgroupInfo_Blkio_Throttling_Statistics_IOServiced: + goto handle_IOServiced + + case ffj_t_CgroupInfo_Blkio_Throttling_Statistics_IOServiceBytes: + goto handle_IOServiceBytes + + case ffj_t_CgroupInfo_Blkio_Throttling_Statisticsno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Device: + + /* handler: uj.Device type=mesos.Device_Number kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Device = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Device == nil { + uj.Device = new(Device_Number) + } + + err = uj.Device.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_IOServiced: + + /* handler: uj.IOServiced type=[]mesos.CgroupInfo_Blkio_Value kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.IOServiced = nil + } else { + + uj.IOServiced = []CgroupInfo_Blkio_Value{} + + wantVal := true + + for { + + var tmp_uj__IOServiced CgroupInfo_Blkio_Value + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__IOServiced type=mesos.CgroupInfo_Blkio_Value kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__IOServiced.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.IOServiced = append(uj.IOServiced, tmp_uj__IOServiced) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_IOServiceBytes: + + /* handler: uj.IOServiceBytes type=[]mesos.CgroupInfo_Blkio_Value kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.IOServiceBytes = nil + } else { + + uj.IOServiceBytes = []CgroupInfo_Blkio_Value{} + + wantVal := true + + for { + + var tmp_uj__IOServiceBytes CgroupInfo_Blkio_Value + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__IOServiceBytes type=mesos.CgroupInfo_Blkio_Value kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__IOServiceBytes.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.IOServiceBytes = append(uj.IOServiceBytes, tmp_uj__IOServiceBytes) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *CgroupInfo_Blkio_Value) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CgroupInfo_Blkio_Value) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Op != nil { + if true { + buf.WriteString(`"op":`) + + { + + obj, err = mj.Op.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + if mj.Value != nil { + if true { + buf.WriteString(`"value":`) + fflib.FormatBits2(buf, uint64(*mj.Value), 10, false) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_CgroupInfo_Blkio_Valuebase = iota + ffj_t_CgroupInfo_Blkio_Valueno_such_key + + ffj_t_CgroupInfo_Blkio_Value_Op + + ffj_t_CgroupInfo_Blkio_Value_Value +) + +var ffj_key_CgroupInfo_Blkio_Value_Op = []byte("op") + +var ffj_key_CgroupInfo_Blkio_Value_Value = []byte("value") + +func (uj *CgroupInfo_Blkio_Value) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CgroupInfo_Blkio_Value) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CgroupInfo_Blkio_Valuebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CgroupInfo_Blkio_Valueno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'o': + + if bytes.Equal(ffj_key_CgroupInfo_Blkio_Value_Op, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_Value_Op + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'v': + + if bytes.Equal(ffj_key_CgroupInfo_Blkio_Value_Value, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_Value_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_CgroupInfo_Blkio_Value_Value, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_Value_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CgroupInfo_Blkio_Value_Op, kn) { + currentKey = ffj_t_CgroupInfo_Blkio_Value_Op + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_CgroupInfo_Blkio_Valueno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CgroupInfo_Blkio_Value_Op: + goto handle_Op + + case ffj_t_CgroupInfo_Blkio_Value_Value: + goto handle_Value + + case ffj_t_CgroupInfo_Blkio_Valueno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Op: + + /* handler: uj.Op type=mesos.CgroupInfo_Blkio_Operation kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Op = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.Op == nil { + uj.Op = new(CgroupInfo_Blkio_Operation) + } + + err = uj.Op.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Value: + + /* handler: uj.Value type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Value = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.Value = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *CgroupInfo_NetCls) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CgroupInfo_NetCls) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.ClassID != nil { + if true { + buf.WriteString(`"classid":`) + fflib.FormatBits2(buf, uint64(*mj.ClassID), 10, false) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_CgroupInfo_NetClsbase = iota + ffj_t_CgroupInfo_NetClsno_such_key + + ffj_t_CgroupInfo_NetCls_ClassID +) + +var ffj_key_CgroupInfo_NetCls_ClassID = []byte("classid") + +func (uj *CgroupInfo_NetCls) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CgroupInfo_NetCls) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CgroupInfo_NetClsbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CgroupInfo_NetClsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_CgroupInfo_NetCls_ClassID, kn) { + currentKey = ffj_t_CgroupInfo_NetCls_ClassID + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_CgroupInfo_NetCls_ClassID, kn) { + currentKey = ffj_t_CgroupInfo_NetCls_ClassID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_CgroupInfo_NetClsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CgroupInfo_NetCls_ClassID: + goto handle_ClassID + + case ffj_t_CgroupInfo_NetClsno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ClassID: + + /* handler: uj.ClassID type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.ClassID = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint32(tval) + uj.ClassID = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *CheckInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CheckInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + if mj.Command != nil { + if true { + buf.WriteString(`"command":`) + + { + + err = mj.Command.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.HTTP != nil { + if true { + buf.WriteString(`"http":`) + + { + + err = mj.HTTP.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.TCP != nil { + if true { + buf.WriteString(`"tcp":`) + + { + + err = mj.TCP.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.DelaySeconds != nil { + if true { + buf.WriteString(`"delay_seconds":`) + fflib.AppendFloat(buf, float64(*mj.DelaySeconds), 'g', -1, 64) + buf.WriteByte(',') + } + } + if mj.IntervalSeconds != nil { + if true { + buf.WriteString(`"interval_seconds":`) + fflib.AppendFloat(buf, float64(*mj.IntervalSeconds), 'g', -1, 64) + buf.WriteByte(',') + } + } + if mj.TimeoutSeconds != nil { + if true { + buf.WriteString(`"timeout_seconds":`) + fflib.AppendFloat(buf, float64(*mj.TimeoutSeconds), 'g', -1, 64) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_CheckInfobase = iota + ffj_t_CheckInfono_such_key + + ffj_t_CheckInfo_Type + + ffj_t_CheckInfo_Command + + ffj_t_CheckInfo_HTTP + + ffj_t_CheckInfo_TCP + + ffj_t_CheckInfo_DelaySeconds + + ffj_t_CheckInfo_IntervalSeconds + + ffj_t_CheckInfo_TimeoutSeconds +) + +var ffj_key_CheckInfo_Type = []byte("type") + +var ffj_key_CheckInfo_Command = []byte("command") + +var ffj_key_CheckInfo_HTTP = []byte("http") + +var ffj_key_CheckInfo_TCP = []byte("tcp") + +var ffj_key_CheckInfo_DelaySeconds = []byte("delay_seconds") + +var ffj_key_CheckInfo_IntervalSeconds = []byte("interval_seconds") + +var ffj_key_CheckInfo_TimeoutSeconds = []byte("timeout_seconds") + +func (uj *CheckInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CheckInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CheckInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CheckInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_CheckInfo_Command, kn) { + currentKey = ffj_t_CheckInfo_Command + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'd': + + if bytes.Equal(ffj_key_CheckInfo_DelaySeconds, kn) { + currentKey = ffj_t_CheckInfo_DelaySeconds + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'h': + + if bytes.Equal(ffj_key_CheckInfo_HTTP, kn) { + currentKey = ffj_t_CheckInfo_HTTP + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'i': + + if bytes.Equal(ffj_key_CheckInfo_IntervalSeconds, kn) { + currentKey = ffj_t_CheckInfo_IntervalSeconds + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_CheckInfo_Type, kn) { + currentKey = ffj_t_CheckInfo_Type + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_CheckInfo_TCP, kn) { + currentKey = ffj_t_CheckInfo_TCP + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_CheckInfo_TimeoutSeconds, kn) { + currentKey = ffj_t_CheckInfo_TimeoutSeconds + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_CheckInfo_TimeoutSeconds, kn) { + currentKey = ffj_t_CheckInfo_TimeoutSeconds + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_CheckInfo_IntervalSeconds, kn) { + currentKey = ffj_t_CheckInfo_IntervalSeconds + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_CheckInfo_DelaySeconds, kn) { + currentKey = ffj_t_CheckInfo_DelaySeconds + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CheckInfo_TCP, kn) { + currentKey = ffj_t_CheckInfo_TCP + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CheckInfo_HTTP, kn) { + currentKey = ffj_t_CheckInfo_HTTP + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CheckInfo_Command, kn) { + currentKey = ffj_t_CheckInfo_Command + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CheckInfo_Type, kn) { + currentKey = ffj_t_CheckInfo_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_CheckInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CheckInfo_Type: + goto handle_Type + + case ffj_t_CheckInfo_Command: + goto handle_Command + + case ffj_t_CheckInfo_HTTP: + goto handle_HTTP + + case ffj_t_CheckInfo_TCP: + goto handle_TCP + + case ffj_t_CheckInfo_DelaySeconds: + goto handle_DelaySeconds + + case ffj_t_CheckInfo_IntervalSeconds: + goto handle_IntervalSeconds + + case ffj_t_CheckInfo_TimeoutSeconds: + goto handle_TimeoutSeconds + + case ffj_t_CheckInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=mesos.CheckInfo_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Command: + + /* handler: uj.Command type=mesos.CheckInfo_Command kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Command = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Command == nil { + uj.Command = new(CheckInfo_Command) + } + + err = uj.Command.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_HTTP: + + /* handler: uj.HTTP type=mesos.CheckInfo_Http kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.HTTP = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.HTTP == nil { + uj.HTTP = new(CheckInfo_Http) + } + + err = uj.HTTP.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_TCP: + + /* handler: uj.TCP type=mesos.CheckInfo_Tcp kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.TCP = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.TCP == nil { + uj.TCP = new(CheckInfo_Tcp) + } + + err = uj.TCP.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_DelaySeconds: + + /* handler: uj.DelaySeconds type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.DelaySeconds = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.DelaySeconds = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_IntervalSeconds: + + /* handler: uj.IntervalSeconds type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.IntervalSeconds = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.IntervalSeconds = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_TimeoutSeconds: + + /* handler: uj.TimeoutSeconds type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.TimeoutSeconds = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.TimeoutSeconds = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *CheckInfo_Command) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CheckInfo_Command) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"command":`) + + { + + err = mj.Command.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_CheckInfo_Commandbase = iota + ffj_t_CheckInfo_Commandno_such_key + + ffj_t_CheckInfo_Command_Command +) + +var ffj_key_CheckInfo_Command_Command = []byte("command") + +func (uj *CheckInfo_Command) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CheckInfo_Command) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CheckInfo_Commandbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CheckInfo_Commandno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_CheckInfo_Command_Command, kn) { + currentKey = ffj_t_CheckInfo_Command_Command + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_CheckInfo_Command_Command, kn) { + currentKey = ffj_t_CheckInfo_Command_Command + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_CheckInfo_Commandno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CheckInfo_Command_Command: + goto handle_Command + + case ffj_t_CheckInfo_Commandno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Command: + + /* handler: uj.Command type=mesos.CommandInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.Command.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *CheckInfo_Http) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CheckInfo_Http) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "port":`) + fflib.FormatBits2(buf, uint64(mj.Port), 10, false) + buf.WriteByte(',') + if mj.Path != nil { + if true { + buf.WriteString(`"path":`) + fflib.WriteJsonString(buf, string(*mj.Path)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_CheckInfo_Httpbase = iota + ffj_t_CheckInfo_Httpno_such_key + + ffj_t_CheckInfo_Http_Port + + ffj_t_CheckInfo_Http_Path +) + +var ffj_key_CheckInfo_Http_Port = []byte("port") + +var ffj_key_CheckInfo_Http_Path = []byte("path") + +func (uj *CheckInfo_Http) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CheckInfo_Http) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CheckInfo_Httpbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CheckInfo_Httpno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'p': + + if bytes.Equal(ffj_key_CheckInfo_Http_Port, kn) { + currentKey = ffj_t_CheckInfo_Http_Port + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_CheckInfo_Http_Path, kn) { + currentKey = ffj_t_CheckInfo_Http_Path + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_CheckInfo_Http_Path, kn) { + currentKey = ffj_t_CheckInfo_Http_Path + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CheckInfo_Http_Port, kn) { + currentKey = ffj_t_CheckInfo_Http_Port + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_CheckInfo_Httpno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CheckInfo_Http_Port: + goto handle_Port + + case ffj_t_CheckInfo_Http_Path: + goto handle_Path + + case ffj_t_CheckInfo_Httpno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Port: + + /* handler: uj.Port type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + uj.Port = uint32(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Path: + + /* handler: uj.Path type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Path = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Path = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *CheckInfo_Tcp) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CheckInfo_Tcp) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"port":`) + fflib.FormatBits2(buf, uint64(mj.Port), 10, false) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_CheckInfo_Tcpbase = iota + ffj_t_CheckInfo_Tcpno_such_key + + ffj_t_CheckInfo_Tcp_Port +) + +var ffj_key_CheckInfo_Tcp_Port = []byte("port") + +func (uj *CheckInfo_Tcp) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CheckInfo_Tcp) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CheckInfo_Tcpbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CheckInfo_Tcpno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'p': + + if bytes.Equal(ffj_key_CheckInfo_Tcp_Port, kn) { + currentKey = ffj_t_CheckInfo_Tcp_Port + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_CheckInfo_Tcp_Port, kn) { + currentKey = ffj_t_CheckInfo_Tcp_Port + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_CheckInfo_Tcpno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CheckInfo_Tcp_Port: + goto handle_Port + + case ffj_t_CheckInfo_Tcpno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Port: + + /* handler: uj.Port type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + uj.Port = uint32(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *CheckStatusInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CheckStatusInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Type != nil { + if true { + buf.WriteString(`"type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + if mj.Command != nil { + if true { + buf.WriteString(`"command":`) + + { + + err = mj.Command.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.HTTP != nil { + if true { + buf.WriteString(`"http":`) + + { + + err = mj.HTTP.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.TCP != nil { + if true { + buf.WriteString(`"tcp":`) + + { + + err = mj.TCP.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_CheckStatusInfobase = iota + ffj_t_CheckStatusInfono_such_key + + ffj_t_CheckStatusInfo_Type + + ffj_t_CheckStatusInfo_Command + + ffj_t_CheckStatusInfo_HTTP + + ffj_t_CheckStatusInfo_TCP +) + +var ffj_key_CheckStatusInfo_Type = []byte("type") + +var ffj_key_CheckStatusInfo_Command = []byte("command") + +var ffj_key_CheckStatusInfo_HTTP = []byte("http") + +var ffj_key_CheckStatusInfo_TCP = []byte("tcp") + +func (uj *CheckStatusInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CheckStatusInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CheckStatusInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CheckStatusInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_CheckStatusInfo_Command, kn) { + currentKey = ffj_t_CheckStatusInfo_Command + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'h': + + if bytes.Equal(ffj_key_CheckStatusInfo_HTTP, kn) { + currentKey = ffj_t_CheckStatusInfo_HTTP + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_CheckStatusInfo_Type, kn) { + currentKey = ffj_t_CheckStatusInfo_Type + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_CheckStatusInfo_TCP, kn) { + currentKey = ffj_t_CheckStatusInfo_TCP + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_CheckStatusInfo_TCP, kn) { + currentKey = ffj_t_CheckStatusInfo_TCP + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CheckStatusInfo_HTTP, kn) { + currentKey = ffj_t_CheckStatusInfo_HTTP + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CheckStatusInfo_Command, kn) { + currentKey = ffj_t_CheckStatusInfo_Command + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CheckStatusInfo_Type, kn) { + currentKey = ffj_t_CheckStatusInfo_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_CheckStatusInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CheckStatusInfo_Type: + goto handle_Type + + case ffj_t_CheckStatusInfo_Command: + goto handle_Command + + case ffj_t_CheckStatusInfo_HTTP: + goto handle_HTTP + + case ffj_t_CheckStatusInfo_TCP: + goto handle_TCP + + case ffj_t_CheckStatusInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=mesos.CheckInfo_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Type = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.Type == nil { + uj.Type = new(CheckInfo_Type) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Command: + + /* handler: uj.Command type=mesos.CheckStatusInfo_Command kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Command = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Command == nil { + uj.Command = new(CheckStatusInfo_Command) + } + + err = uj.Command.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_HTTP: + + /* handler: uj.HTTP type=mesos.CheckStatusInfo_Http kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.HTTP = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.HTTP == nil { + uj.HTTP = new(CheckStatusInfo_Http) + } + + err = uj.HTTP.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_TCP: + + /* handler: uj.TCP type=mesos.CheckStatusInfo_Tcp kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.TCP = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.TCP == nil { + uj.TCP = new(CheckStatusInfo_Tcp) + } + + err = uj.TCP.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *CheckStatusInfo_Command) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CheckStatusInfo_Command) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.ExitCode != nil { + if true { + buf.WriteString(`"exit_code":`) + fflib.FormatBits2(buf, uint64(*mj.ExitCode), 10, *mj.ExitCode < 0) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_CheckStatusInfo_Commandbase = iota + ffj_t_CheckStatusInfo_Commandno_such_key + + ffj_t_CheckStatusInfo_Command_ExitCode +) + +var ffj_key_CheckStatusInfo_Command_ExitCode = []byte("exit_code") + +func (uj *CheckStatusInfo_Command) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CheckStatusInfo_Command) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CheckStatusInfo_Commandbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CheckStatusInfo_Commandno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'e': + + if bytes.Equal(ffj_key_CheckStatusInfo_Command_ExitCode, kn) { + currentKey = ffj_t_CheckStatusInfo_Command_ExitCode + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_CheckStatusInfo_Command_ExitCode, kn) { + currentKey = ffj_t_CheckStatusInfo_Command_ExitCode + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_CheckStatusInfo_Commandno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CheckStatusInfo_Command_ExitCode: + goto handle_ExitCode + + case ffj_t_CheckStatusInfo_Commandno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ExitCode: + + /* handler: uj.ExitCode type=int32 kind=int32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.ExitCode = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int32(tval) + uj.ExitCode = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *CheckStatusInfo_Http) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CheckStatusInfo_Http) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.StatusCode != nil { + if true { + buf.WriteString(`"status_code":`) + fflib.FormatBits2(buf, uint64(*mj.StatusCode), 10, false) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_CheckStatusInfo_Httpbase = iota + ffj_t_CheckStatusInfo_Httpno_such_key + + ffj_t_CheckStatusInfo_Http_StatusCode +) + +var ffj_key_CheckStatusInfo_Http_StatusCode = []byte("status_code") + +func (uj *CheckStatusInfo_Http) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CheckStatusInfo_Http) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CheckStatusInfo_Httpbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CheckStatusInfo_Httpno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 's': + + if bytes.Equal(ffj_key_CheckStatusInfo_Http_StatusCode, kn) { + currentKey = ffj_t_CheckStatusInfo_Http_StatusCode + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_CheckStatusInfo_Http_StatusCode, kn) { + currentKey = ffj_t_CheckStatusInfo_Http_StatusCode + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_CheckStatusInfo_Httpno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CheckStatusInfo_Http_StatusCode: + goto handle_StatusCode + + case ffj_t_CheckStatusInfo_Httpno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_StatusCode: + + /* handler: uj.StatusCode type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.StatusCode = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint32(tval) + uj.StatusCode = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *CheckStatusInfo_Tcp) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CheckStatusInfo_Tcp) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Succeeded != nil { + if true { + if *mj.Succeeded { + buf.WriteString(`"succeeded":true`) + } else { + buf.WriteString(`"succeeded":false`) + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_CheckStatusInfo_Tcpbase = iota + ffj_t_CheckStatusInfo_Tcpno_such_key + + ffj_t_CheckStatusInfo_Tcp_Succeeded +) + +var ffj_key_CheckStatusInfo_Tcp_Succeeded = []byte("succeeded") + +func (uj *CheckStatusInfo_Tcp) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CheckStatusInfo_Tcp) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CheckStatusInfo_Tcpbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CheckStatusInfo_Tcpno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 's': + + if bytes.Equal(ffj_key_CheckStatusInfo_Tcp_Succeeded, kn) { + currentKey = ffj_t_CheckStatusInfo_Tcp_Succeeded + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_CheckStatusInfo_Tcp_Succeeded, kn) { + currentKey = ffj_t_CheckStatusInfo_Tcp_Succeeded + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_CheckStatusInfo_Tcpno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CheckStatusInfo_Tcp_Succeeded: + goto handle_Succeeded + + case ffj_t_CheckStatusInfo_Tcpno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Succeeded: + + /* handler: uj.Succeeded type=bool kind=bool quoted=false*/ + + { + if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) + } + } + + { + if tok == fflib.FFTok_null { + + uj.Succeeded = nil + + } else { + tmpb := fs.Output.Bytes() + + var tval bool + + if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { + + tval = true + + } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { + + tval = false + + } else { + err = errors.New("unexpected bytes for true/false value") + return fs.WrapErr(err) + } + + uj.Succeeded = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *CommandInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CommandInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "uris":`) + if mj.URIs != nil { + buf.WriteString(`[`) + for i, v := range mj.URIs { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.Environment != nil { + if true { + buf.WriteString(`"environment":`) + + { + + err = mj.Environment.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Shell != nil { + if true { + if *mj.Shell { + buf.WriteString(`"shell":true`) + } else { + buf.WriteString(`"shell":false`) + } + buf.WriteByte(',') + } + } + if mj.Value != nil { + if true { + buf.WriteString(`"value":`) + fflib.WriteJsonString(buf, string(*mj.Value)) + buf.WriteByte(',') + } + } + if len(mj.Arguments) != 0 { + buf.WriteString(`"arguments":`) + if mj.Arguments != nil { + buf.WriteString(`[`) + for i, v := range mj.Arguments { + if i != 0 { + buf.WriteString(`,`) + } + fflib.WriteJsonString(buf, string(v)) + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + } + if mj.User != nil { + if true { + buf.WriteString(`"user":`) + fflib.WriteJsonString(buf, string(*mj.User)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_CommandInfobase = iota + ffj_t_CommandInfono_such_key + + ffj_t_CommandInfo_URIs + + ffj_t_CommandInfo_Environment + + ffj_t_CommandInfo_Shell + + ffj_t_CommandInfo_Value + + ffj_t_CommandInfo_Arguments + + ffj_t_CommandInfo_User +) + +var ffj_key_CommandInfo_URIs = []byte("uris") + +var ffj_key_CommandInfo_Environment = []byte("environment") + +var ffj_key_CommandInfo_Shell = []byte("shell") + +var ffj_key_CommandInfo_Value = []byte("value") + +var ffj_key_CommandInfo_Arguments = []byte("arguments") + +var ffj_key_CommandInfo_User = []byte("user") + +func (uj *CommandInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CommandInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CommandInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CommandInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'a': + + if bytes.Equal(ffj_key_CommandInfo_Arguments, kn) { + currentKey = ffj_t_CommandInfo_Arguments + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'e': + + if bytes.Equal(ffj_key_CommandInfo_Environment, kn) { + currentKey = ffj_t_CommandInfo_Environment + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_CommandInfo_Shell, kn) { + currentKey = ffj_t_CommandInfo_Shell + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'u': + + if bytes.Equal(ffj_key_CommandInfo_URIs, kn) { + currentKey = ffj_t_CommandInfo_URIs + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_CommandInfo_User, kn) { + currentKey = ffj_t_CommandInfo_User + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'v': + + if bytes.Equal(ffj_key_CommandInfo_Value, kn) { + currentKey = ffj_t_CommandInfo_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_CommandInfo_User, kn) { + currentKey = ffj_t_CommandInfo_User + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_CommandInfo_Arguments, kn) { + currentKey = ffj_t_CommandInfo_Arguments + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CommandInfo_Value, kn) { + currentKey = ffj_t_CommandInfo_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_CommandInfo_Shell, kn) { + currentKey = ffj_t_CommandInfo_Shell + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CommandInfo_Environment, kn) { + currentKey = ffj_t_CommandInfo_Environment + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_CommandInfo_URIs, kn) { + currentKey = ffj_t_CommandInfo_URIs + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_CommandInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CommandInfo_URIs: + goto handle_URIs + + case ffj_t_CommandInfo_Environment: + goto handle_Environment + + case ffj_t_CommandInfo_Shell: + goto handle_Shell + + case ffj_t_CommandInfo_Value: + goto handle_Value + + case ffj_t_CommandInfo_Arguments: + goto handle_Arguments + + case ffj_t_CommandInfo_User: + goto handle_User + + case ffj_t_CommandInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_URIs: + + /* handler: uj.URIs type=[]mesos.CommandInfo_URI kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.URIs = nil + } else { + + uj.URIs = []CommandInfo_URI{} + + wantVal := true + + for { + + var tmp_uj__URIs CommandInfo_URI + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__URIs type=mesos.CommandInfo_URI kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__URIs.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.URIs = append(uj.URIs, tmp_uj__URIs) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Environment: + + /* handler: uj.Environment type=mesos.Environment kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Environment = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Environment == nil { + uj.Environment = new(Environment) + } + + err = uj.Environment.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Shell: + + /* handler: uj.Shell type=bool kind=bool quoted=false*/ + + { + if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) + } + } + + { + if tok == fflib.FFTok_null { + + uj.Shell = nil + + } else { + tmpb := fs.Output.Bytes() + + var tval bool + + if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { + + tval = true + + } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { + + tval = false + + } else { + err = errors.New("unexpected bytes for true/false value") + return fs.WrapErr(err) + } + + uj.Shell = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Value: + + /* handler: uj.Value type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Value = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Value = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Arguments: + + /* handler: uj.Arguments type=[]string kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Arguments = nil + } else { + + uj.Arguments = []string{} + + wantVal := true + + for { + + var tmp_uj__Arguments string + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Arguments type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + tmp_uj__Arguments = string(string(outBuf)) + + } + } + + uj.Arguments = append(uj.Arguments, tmp_uj__Arguments) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_User: + + /* handler: uj.User type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.User = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.User = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *CommandInfo_URI) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *CommandInfo_URI) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "value":`) + fflib.WriteJsonString(buf, string(mj.Value)) + buf.WriteByte(',') + if mj.Executable != nil { + if true { + if *mj.Executable { + buf.WriteString(`"executable":true`) + } else { + buf.WriteString(`"executable":false`) + } + buf.WriteByte(',') + } + } + if mj.Extract != nil { + if true { + if *mj.Extract { + buf.WriteString(`"extract":true`) + } else { + buf.WriteString(`"extract":false`) + } + buf.WriteByte(',') + } + } + if mj.Cache != nil { + if true { + if *mj.Cache { + buf.WriteString(`"cache":true`) + } else { + buf.WriteString(`"cache":false`) + } + buf.WriteByte(',') + } + } + if mj.OutputFile != nil { + if true { + buf.WriteString(`"output_file":`) + fflib.WriteJsonString(buf, string(*mj.OutputFile)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_CommandInfo_URIbase = iota + ffj_t_CommandInfo_URIno_such_key + + ffj_t_CommandInfo_URI_Value + + ffj_t_CommandInfo_URI_Executable + + ffj_t_CommandInfo_URI_Extract + + ffj_t_CommandInfo_URI_Cache + + ffj_t_CommandInfo_URI_OutputFile +) + +var ffj_key_CommandInfo_URI_Value = []byte("value") + +var ffj_key_CommandInfo_URI_Executable = []byte("executable") + +var ffj_key_CommandInfo_URI_Extract = []byte("extract") + +var ffj_key_CommandInfo_URI_Cache = []byte("cache") + +var ffj_key_CommandInfo_URI_OutputFile = []byte("output_file") + +func (uj *CommandInfo_URI) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *CommandInfo_URI) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_CommandInfo_URIbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_CommandInfo_URIno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_CommandInfo_URI_Cache, kn) { + currentKey = ffj_t_CommandInfo_URI_Cache + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'e': + + if bytes.Equal(ffj_key_CommandInfo_URI_Executable, kn) { + currentKey = ffj_t_CommandInfo_URI_Executable + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_CommandInfo_URI_Extract, kn) { + currentKey = ffj_t_CommandInfo_URI_Extract + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'o': + + if bytes.Equal(ffj_key_CommandInfo_URI_OutputFile, kn) { + currentKey = ffj_t_CommandInfo_URI_OutputFile + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'v': + + if bytes.Equal(ffj_key_CommandInfo_URI_Value, kn) { + currentKey = ffj_t_CommandInfo_URI_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_CommandInfo_URI_OutputFile, kn) { + currentKey = ffj_t_CommandInfo_URI_OutputFile + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CommandInfo_URI_Cache, kn) { + currentKey = ffj_t_CommandInfo_URI_Cache + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CommandInfo_URI_Extract, kn) { + currentKey = ffj_t_CommandInfo_URI_Extract + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CommandInfo_URI_Executable, kn) { + currentKey = ffj_t_CommandInfo_URI_Executable + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_CommandInfo_URI_Value, kn) { + currentKey = ffj_t_CommandInfo_URI_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_CommandInfo_URIno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_CommandInfo_URI_Value: + goto handle_Value + + case ffj_t_CommandInfo_URI_Executable: + goto handle_Executable + + case ffj_t_CommandInfo_URI_Extract: + goto handle_Extract + + case ffj_t_CommandInfo_URI_Cache: + goto handle_Cache + + case ffj_t_CommandInfo_URI_OutputFile: + goto handle_OutputFile + + case ffj_t_CommandInfo_URIno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Value: + + /* handler: uj.Value type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Value = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Executable: + + /* handler: uj.Executable type=bool kind=bool quoted=false*/ + + { + if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) + } + } + + { + if tok == fflib.FFTok_null { + + uj.Executable = nil + + } else { + tmpb := fs.Output.Bytes() + + var tval bool + + if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { + + tval = true + + } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { + + tval = false + + } else { + err = errors.New("unexpected bytes for true/false value") + return fs.WrapErr(err) + } + + uj.Executable = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Extract: + + /* handler: uj.Extract type=bool kind=bool quoted=false*/ + + { + if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) + } + } + + { + if tok == fflib.FFTok_null { + + uj.Extract = nil + + } else { + tmpb := fs.Output.Bytes() + + var tval bool + + if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { + + tval = true + + } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { + + tval = false + + } else { + err = errors.New("unexpected bytes for true/false value") + return fs.WrapErr(err) + } + + uj.Extract = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Cache: + + /* handler: uj.Cache type=bool kind=bool quoted=false*/ + + { + if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) + } + } + + { + if tok == fflib.FFTok_null { + + uj.Cache = nil + + } else { + tmpb := fs.Output.Bytes() + + var tval bool + + if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { + + tval = true + + } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { + + tval = false + + } else { + err = errors.New("unexpected bytes for true/false value") + return fs.WrapErr(err) + } + + uj.Cache = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_OutputFile: + + /* handler: uj.OutputFile type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.OutputFile = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.OutputFile = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *ContainerID) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *ContainerID) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "value":`) + fflib.WriteJsonString(buf, string(mj.Value)) + buf.WriteByte(',') + if mj.Parent != nil { + if true { + buf.WriteString(`"parent":`) + + { + + err = mj.Parent.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_ContainerIDbase = iota + ffj_t_ContainerIDno_such_key + + ffj_t_ContainerID_Value + + ffj_t_ContainerID_Parent +) + +var ffj_key_ContainerID_Value = []byte("value") + +var ffj_key_ContainerID_Parent = []byte("parent") + +func (uj *ContainerID) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *ContainerID) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_ContainerIDbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_ContainerIDno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'p': + + if bytes.Equal(ffj_key_ContainerID_Parent, kn) { + currentKey = ffj_t_ContainerID_Parent + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'v': + + if bytes.Equal(ffj_key_ContainerID_Value, kn) { + currentKey = ffj_t_ContainerID_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_ContainerID_Parent, kn) { + currentKey = ffj_t_ContainerID_Parent + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_ContainerID_Value, kn) { + currentKey = ffj_t_ContainerID_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_ContainerIDno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_ContainerID_Value: + goto handle_Value + + case ffj_t_ContainerID_Parent: + goto handle_Parent + + case ffj_t_ContainerIDno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Value: + + /* handler: uj.Value type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Value = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Parent: + + /* handler: uj.Parent type=mesos.ContainerID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Parent = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Parent == nil { + uj.Parent = new(ContainerID) + } + + err = uj.Parent.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *ContainerInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *ContainerInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Type != nil { + if true { + buf.WriteString(`"type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"volumes":`) + if mj.Volumes != nil { + buf.WriteString(`[`) + for i, v := range mj.Volumes { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.Hostname != nil { + if true { + buf.WriteString(`"hostname":`) + fflib.WriteJsonString(buf, string(*mj.Hostname)) + buf.WriteByte(',') + } + } + if mj.Docker != nil { + if true { + buf.WriteString(`"docker":`) + + { + + err = mj.Docker.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Mesos != nil { + if true { + buf.WriteString(`"mesos":`) + + { + + err = mj.Mesos.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"network_infos":`) + if mj.NetworkInfos != nil { + buf.WriteString(`[`) + for i, v := range mj.NetworkInfos { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.LinuxInfo != nil { + if true { + buf.WriteString(`"linux_info":`) + + { + + err = mj.LinuxInfo.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.RlimitInfo != nil { + if true { + buf.WriteString(`"rlimit_info":`) + + { + + err = mj.RlimitInfo.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.TTYInfo != nil { + if true { + buf.WriteString(`"tty_info":`) + + { + + err = mj.TTYInfo.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_ContainerInfobase = iota + ffj_t_ContainerInfono_such_key + + ffj_t_ContainerInfo_Type + + ffj_t_ContainerInfo_Volumes + + ffj_t_ContainerInfo_Hostname + + ffj_t_ContainerInfo_Docker + + ffj_t_ContainerInfo_Mesos + + ffj_t_ContainerInfo_NetworkInfos + + ffj_t_ContainerInfo_LinuxInfo + + ffj_t_ContainerInfo_RlimitInfo + + ffj_t_ContainerInfo_TTYInfo +) + +var ffj_key_ContainerInfo_Type = []byte("type") + +var ffj_key_ContainerInfo_Volumes = []byte("volumes") + +var ffj_key_ContainerInfo_Hostname = []byte("hostname") + +var ffj_key_ContainerInfo_Docker = []byte("docker") + +var ffj_key_ContainerInfo_Mesos = []byte("mesos") + +var ffj_key_ContainerInfo_NetworkInfos = []byte("network_infos") + +var ffj_key_ContainerInfo_LinuxInfo = []byte("linux_info") + +var ffj_key_ContainerInfo_RlimitInfo = []byte("rlimit_info") + +var ffj_key_ContainerInfo_TTYInfo = []byte("tty_info") + +func (uj *ContainerInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *ContainerInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_ContainerInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_ContainerInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'd': + + if bytes.Equal(ffj_key_ContainerInfo_Docker, kn) { + currentKey = ffj_t_ContainerInfo_Docker + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'h': + + if bytes.Equal(ffj_key_ContainerInfo_Hostname, kn) { + currentKey = ffj_t_ContainerInfo_Hostname + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'l': + + if bytes.Equal(ffj_key_ContainerInfo_LinuxInfo, kn) { + currentKey = ffj_t_ContainerInfo_LinuxInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'm': + + if bytes.Equal(ffj_key_ContainerInfo_Mesos, kn) { + currentKey = ffj_t_ContainerInfo_Mesos + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'n': + + if bytes.Equal(ffj_key_ContainerInfo_NetworkInfos, kn) { + currentKey = ffj_t_ContainerInfo_NetworkInfos + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_ContainerInfo_RlimitInfo, kn) { + currentKey = ffj_t_ContainerInfo_RlimitInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_ContainerInfo_Type, kn) { + currentKey = ffj_t_ContainerInfo_Type + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ContainerInfo_TTYInfo, kn) { + currentKey = ffj_t_ContainerInfo_TTYInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'v': + + if bytes.Equal(ffj_key_ContainerInfo_Volumes, kn) { + currentKey = ffj_t_ContainerInfo_Volumes + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_ContainerInfo_TTYInfo, kn) { + currentKey = ffj_t_ContainerInfo_TTYInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_ContainerInfo_RlimitInfo, kn) { + currentKey = ffj_t_ContainerInfo_RlimitInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_ContainerInfo_LinuxInfo, kn) { + currentKey = ffj_t_ContainerInfo_LinuxInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ContainerInfo_NetworkInfos, kn) { + currentKey = ffj_t_ContainerInfo_NetworkInfos + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ContainerInfo_Mesos, kn) { + currentKey = ffj_t_ContainerInfo_Mesos + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ContainerInfo_Docker, kn) { + currentKey = ffj_t_ContainerInfo_Docker + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ContainerInfo_Hostname, kn) { + currentKey = ffj_t_ContainerInfo_Hostname + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ContainerInfo_Volumes, kn) { + currentKey = ffj_t_ContainerInfo_Volumes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_ContainerInfo_Type, kn) { + currentKey = ffj_t_ContainerInfo_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_ContainerInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_ContainerInfo_Type: + goto handle_Type + + case ffj_t_ContainerInfo_Volumes: + goto handle_Volumes + + case ffj_t_ContainerInfo_Hostname: + goto handle_Hostname + + case ffj_t_ContainerInfo_Docker: + goto handle_Docker + + case ffj_t_ContainerInfo_Mesos: + goto handle_Mesos + + case ffj_t_ContainerInfo_NetworkInfos: + goto handle_NetworkInfos + + case ffj_t_ContainerInfo_LinuxInfo: + goto handle_LinuxInfo + + case ffj_t_ContainerInfo_RlimitInfo: + goto handle_RlimitInfo + + case ffj_t_ContainerInfo_TTYInfo: + goto handle_TTYInfo + + case ffj_t_ContainerInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=mesos.ContainerInfo_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Type = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.Type == nil { + uj.Type = new(ContainerInfo_Type) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Volumes: + + /* handler: uj.Volumes type=[]mesos.Volume kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Volumes = nil + } else { + + uj.Volumes = []Volume{} + + wantVal := true + + for { + + var tmp_uj__Volumes Volume + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Volumes type=mesos.Volume kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Volumes.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Volumes = append(uj.Volumes, tmp_uj__Volumes) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Hostname: + + /* handler: uj.Hostname type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Hostname = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Hostname = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Docker: + + /* handler: uj.Docker type=mesos.ContainerInfo_DockerInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Docker = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Docker == nil { + uj.Docker = new(ContainerInfo_DockerInfo) + } + + err = uj.Docker.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Mesos: + + /* handler: uj.Mesos type=mesos.ContainerInfo_MesosInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Mesos = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Mesos == nil { + uj.Mesos = new(ContainerInfo_MesosInfo) + } + + err = uj.Mesos.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NetworkInfos: + + /* handler: uj.NetworkInfos type=[]mesos.NetworkInfo kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.NetworkInfos = nil + } else { + + uj.NetworkInfos = []NetworkInfo{} + + wantVal := true + + for { + + var tmp_uj__NetworkInfos NetworkInfo + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__NetworkInfos type=mesos.NetworkInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__NetworkInfos.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.NetworkInfos = append(uj.NetworkInfos, tmp_uj__NetworkInfos) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_LinuxInfo: + + /* handler: uj.LinuxInfo type=mesos.LinuxInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.LinuxInfo = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.LinuxInfo == nil { + uj.LinuxInfo = new(LinuxInfo) + } + + err = uj.LinuxInfo.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_RlimitInfo: + + /* handler: uj.RlimitInfo type=mesos.RLimitInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.RlimitInfo = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.RlimitInfo == nil { + uj.RlimitInfo = new(RLimitInfo) + } + + err = uj.RlimitInfo.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_TTYInfo: + + /* handler: uj.TTYInfo type=mesos.TTYInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.TTYInfo = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.TTYInfo == nil { + uj.TTYInfo = new(TTYInfo) + } + + err = uj.TTYInfo.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *ContainerInfo_DockerInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *ContainerInfo_DockerInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "image":`) + fflib.WriteJsonString(buf, string(mj.Image)) + buf.WriteByte(',') + if mj.Network != nil { + if true { + buf.WriteString(`"network":`) + + { + + obj, err = mj.Network.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"port_mappings":`) + if mj.PortMappings != nil { + buf.WriteString(`[`) + for i, v := range mj.PortMappings { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.Privileged != nil { + if true { + if *mj.Privileged { + buf.WriteString(`"privileged":true`) + } else { + buf.WriteString(`"privileged":false`) + } + buf.WriteByte(',') + } + } + buf.WriteString(`"parameters":`) + if mj.Parameters != nil { + buf.WriteString(`[`) + for i, v := range mj.Parameters { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.ForcePullImage != nil { + if true { + if *mj.ForcePullImage { + buf.WriteString(`"force_pull_image":true`) + } else { + buf.WriteString(`"force_pull_image":false`) + } + buf.WriteByte(',') + } + } + if mj.VolumeDriver != nil { + if true { + buf.WriteString(`"volume_driver":`) + fflib.WriteJsonString(buf, string(*mj.VolumeDriver)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_ContainerInfo_DockerInfobase = iota + ffj_t_ContainerInfo_DockerInfono_such_key + + ffj_t_ContainerInfo_DockerInfo_Image + + ffj_t_ContainerInfo_DockerInfo_Network + + ffj_t_ContainerInfo_DockerInfo_PortMappings + + ffj_t_ContainerInfo_DockerInfo_Privileged + + ffj_t_ContainerInfo_DockerInfo_Parameters + + ffj_t_ContainerInfo_DockerInfo_ForcePullImage + + ffj_t_ContainerInfo_DockerInfo_VolumeDriver +) + +var ffj_key_ContainerInfo_DockerInfo_Image = []byte("image") + +var ffj_key_ContainerInfo_DockerInfo_Network = []byte("network") + +var ffj_key_ContainerInfo_DockerInfo_PortMappings = []byte("port_mappings") + +var ffj_key_ContainerInfo_DockerInfo_Privileged = []byte("privileged") + +var ffj_key_ContainerInfo_DockerInfo_Parameters = []byte("parameters") + +var ffj_key_ContainerInfo_DockerInfo_ForcePullImage = []byte("force_pull_image") + +var ffj_key_ContainerInfo_DockerInfo_VolumeDriver = []byte("volume_driver") + +func (uj *ContainerInfo_DockerInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *ContainerInfo_DockerInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_ContainerInfo_DockerInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_ContainerInfo_DockerInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'f': + + if bytes.Equal(ffj_key_ContainerInfo_DockerInfo_ForcePullImage, kn) { + currentKey = ffj_t_ContainerInfo_DockerInfo_ForcePullImage + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'i': + + if bytes.Equal(ffj_key_ContainerInfo_DockerInfo_Image, kn) { + currentKey = ffj_t_ContainerInfo_DockerInfo_Image + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'n': + + if bytes.Equal(ffj_key_ContainerInfo_DockerInfo_Network, kn) { + currentKey = ffj_t_ContainerInfo_DockerInfo_Network + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_ContainerInfo_DockerInfo_PortMappings, kn) { + currentKey = ffj_t_ContainerInfo_DockerInfo_PortMappings + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ContainerInfo_DockerInfo_Privileged, kn) { + currentKey = ffj_t_ContainerInfo_DockerInfo_Privileged + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ContainerInfo_DockerInfo_Parameters, kn) { + currentKey = ffj_t_ContainerInfo_DockerInfo_Parameters + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'v': + + if bytes.Equal(ffj_key_ContainerInfo_DockerInfo_VolumeDriver, kn) { + currentKey = ffj_t_ContainerInfo_DockerInfo_VolumeDriver + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_ContainerInfo_DockerInfo_VolumeDriver, kn) { + currentKey = ffj_t_ContainerInfo_DockerInfo_VolumeDriver + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_ContainerInfo_DockerInfo_ForcePullImage, kn) { + currentKey = ffj_t_ContainerInfo_DockerInfo_ForcePullImage + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ContainerInfo_DockerInfo_Parameters, kn) { + currentKey = ffj_t_ContainerInfo_DockerInfo_Parameters + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_ContainerInfo_DockerInfo_Privileged, kn) { + currentKey = ffj_t_ContainerInfo_DockerInfo_Privileged + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ContainerInfo_DockerInfo_PortMappings, kn) { + currentKey = ffj_t_ContainerInfo_DockerInfo_PortMappings + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ContainerInfo_DockerInfo_Network, kn) { + currentKey = ffj_t_ContainerInfo_DockerInfo_Network + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_ContainerInfo_DockerInfo_Image, kn) { + currentKey = ffj_t_ContainerInfo_DockerInfo_Image + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_ContainerInfo_DockerInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_ContainerInfo_DockerInfo_Image: + goto handle_Image + + case ffj_t_ContainerInfo_DockerInfo_Network: + goto handle_Network + + case ffj_t_ContainerInfo_DockerInfo_PortMappings: + goto handle_PortMappings + + case ffj_t_ContainerInfo_DockerInfo_Privileged: + goto handle_Privileged + + case ffj_t_ContainerInfo_DockerInfo_Parameters: + goto handle_Parameters + + case ffj_t_ContainerInfo_DockerInfo_ForcePullImage: + goto handle_ForcePullImage + + case ffj_t_ContainerInfo_DockerInfo_VolumeDriver: + goto handle_VolumeDriver + + case ffj_t_ContainerInfo_DockerInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Image: + + /* handler: uj.Image type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Image = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Network: + + /* handler: uj.Network type=mesos.ContainerInfo_DockerInfo_Network kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Network = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.Network == nil { + uj.Network = new(ContainerInfo_DockerInfo_Network) + } + + err = uj.Network.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_PortMappings: + + /* handler: uj.PortMappings type=[]mesos.ContainerInfo_DockerInfo_PortMapping kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.PortMappings = nil + } else { + + uj.PortMappings = []ContainerInfo_DockerInfo_PortMapping{} + + wantVal := true + + for { + + var tmp_uj__PortMappings ContainerInfo_DockerInfo_PortMapping + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__PortMappings type=mesos.ContainerInfo_DockerInfo_PortMapping kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__PortMappings.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.PortMappings = append(uj.PortMappings, tmp_uj__PortMappings) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Privileged: + + /* handler: uj.Privileged type=bool kind=bool quoted=false*/ + + { + if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) + } + } + + { + if tok == fflib.FFTok_null { + + uj.Privileged = nil + + } else { + tmpb := fs.Output.Bytes() + + var tval bool + + if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { + + tval = true + + } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { + + tval = false + + } else { + err = errors.New("unexpected bytes for true/false value") + return fs.WrapErr(err) + } + + uj.Privileged = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Parameters: + + /* handler: uj.Parameters type=[]mesos.Parameter kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Parameters = nil + } else { + + uj.Parameters = []Parameter{} + + wantVal := true + + for { + + var tmp_uj__Parameters Parameter + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Parameters type=mesos.Parameter kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Parameters.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Parameters = append(uj.Parameters, tmp_uj__Parameters) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ForcePullImage: + + /* handler: uj.ForcePullImage type=bool kind=bool quoted=false*/ + + { + if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) + } + } + + { + if tok == fflib.FFTok_null { + + uj.ForcePullImage = nil + + } else { + tmpb := fs.Output.Bytes() + + var tval bool + + if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { + + tval = true + + } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { + + tval = false + + } else { + err = errors.New("unexpected bytes for true/false value") + return fs.WrapErr(err) + } + + uj.ForcePullImage = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_VolumeDriver: + + /* handler: uj.VolumeDriver type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.VolumeDriver = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.VolumeDriver = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *ContainerInfo_DockerInfo_PortMapping) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *ContainerInfo_DockerInfo_PortMapping) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "host_port":`) + fflib.FormatBits2(buf, uint64(mj.HostPort), 10, false) + buf.WriteString(`,"container_port":`) + fflib.FormatBits2(buf, uint64(mj.ContainerPort), 10, false) + buf.WriteByte(',') + if mj.Protocol != nil { + if true { + buf.WriteString(`"protocol":`) + fflib.WriteJsonString(buf, string(*mj.Protocol)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_ContainerInfo_DockerInfo_PortMappingbase = iota + ffj_t_ContainerInfo_DockerInfo_PortMappingno_such_key + + ffj_t_ContainerInfo_DockerInfo_PortMapping_HostPort + + ffj_t_ContainerInfo_DockerInfo_PortMapping_ContainerPort + + ffj_t_ContainerInfo_DockerInfo_PortMapping_Protocol +) + +var ffj_key_ContainerInfo_DockerInfo_PortMapping_HostPort = []byte("host_port") + +var ffj_key_ContainerInfo_DockerInfo_PortMapping_ContainerPort = []byte("container_port") + +var ffj_key_ContainerInfo_DockerInfo_PortMapping_Protocol = []byte("protocol") + +func (uj *ContainerInfo_DockerInfo_PortMapping) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *ContainerInfo_DockerInfo_PortMapping) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_ContainerInfo_DockerInfo_PortMappingbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_ContainerInfo_DockerInfo_PortMappingno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_ContainerInfo_DockerInfo_PortMapping_ContainerPort, kn) { + currentKey = ffj_t_ContainerInfo_DockerInfo_PortMapping_ContainerPort + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'h': + + if bytes.Equal(ffj_key_ContainerInfo_DockerInfo_PortMapping_HostPort, kn) { + currentKey = ffj_t_ContainerInfo_DockerInfo_PortMapping_HostPort + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_ContainerInfo_DockerInfo_PortMapping_Protocol, kn) { + currentKey = ffj_t_ContainerInfo_DockerInfo_PortMapping_Protocol + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_ContainerInfo_DockerInfo_PortMapping_Protocol, kn) { + currentKey = ffj_t_ContainerInfo_DockerInfo_PortMapping_Protocol + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_ContainerInfo_DockerInfo_PortMapping_ContainerPort, kn) { + currentKey = ffj_t_ContainerInfo_DockerInfo_PortMapping_ContainerPort + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ContainerInfo_DockerInfo_PortMapping_HostPort, kn) { + currentKey = ffj_t_ContainerInfo_DockerInfo_PortMapping_HostPort + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_ContainerInfo_DockerInfo_PortMappingno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_ContainerInfo_DockerInfo_PortMapping_HostPort: + goto handle_HostPort + + case ffj_t_ContainerInfo_DockerInfo_PortMapping_ContainerPort: + goto handle_ContainerPort + + case ffj_t_ContainerInfo_DockerInfo_PortMapping_Protocol: + goto handle_Protocol + + case ffj_t_ContainerInfo_DockerInfo_PortMappingno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_HostPort: + + /* handler: uj.HostPort type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + uj.HostPort = uint32(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ContainerPort: + + /* handler: uj.ContainerPort type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + uj.ContainerPort = uint32(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Protocol: + + /* handler: uj.Protocol type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Protocol = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Protocol = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *ContainerInfo_MesosInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *ContainerInfo_MesosInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Image != nil { + if true { + buf.WriteString(`"image":`) + + { + + err = mj.Image.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_ContainerInfo_MesosInfobase = iota + ffj_t_ContainerInfo_MesosInfono_such_key + + ffj_t_ContainerInfo_MesosInfo_Image +) + +var ffj_key_ContainerInfo_MesosInfo_Image = []byte("image") + +func (uj *ContainerInfo_MesosInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *ContainerInfo_MesosInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_ContainerInfo_MesosInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_ContainerInfo_MesosInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'i': + + if bytes.Equal(ffj_key_ContainerInfo_MesosInfo_Image, kn) { + currentKey = ffj_t_ContainerInfo_MesosInfo_Image + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_ContainerInfo_MesosInfo_Image, kn) { + currentKey = ffj_t_ContainerInfo_MesosInfo_Image + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_ContainerInfo_MesosInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_ContainerInfo_MesosInfo_Image: + goto handle_Image + + case ffj_t_ContainerInfo_MesosInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Image: + + /* handler: uj.Image type=mesos.Image kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Image = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Image == nil { + uj.Image = new(Image) + } + + err = uj.Image.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *ContainerStatus) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *ContainerStatus) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.ContainerID != nil { + if true { + buf.WriteString(`"container_id":`) + + { + + err = mj.ContainerID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"network_infos":`) + if mj.NetworkInfos != nil { + buf.WriteString(`[`) + for i, v := range mj.NetworkInfos { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.CgroupInfo != nil { + if true { + buf.WriteString(`"cgroup_info":`) + + { + + err = mj.CgroupInfo.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.ExecutorPID != nil { + if true { + buf.WriteString(`"executor_pid":`) + fflib.FormatBits2(buf, uint64(*mj.ExecutorPID), 10, false) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_ContainerStatusbase = iota + ffj_t_ContainerStatusno_such_key + + ffj_t_ContainerStatus_ContainerID + + ffj_t_ContainerStatus_NetworkInfos + + ffj_t_ContainerStatus_CgroupInfo + + ffj_t_ContainerStatus_ExecutorPID +) + +var ffj_key_ContainerStatus_ContainerID = []byte("container_id") + +var ffj_key_ContainerStatus_NetworkInfos = []byte("network_infos") + +var ffj_key_ContainerStatus_CgroupInfo = []byte("cgroup_info") + +var ffj_key_ContainerStatus_ExecutorPID = []byte("executor_pid") + +func (uj *ContainerStatus) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *ContainerStatus) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_ContainerStatusbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_ContainerStatusno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_ContainerStatus_ContainerID, kn) { + currentKey = ffj_t_ContainerStatus_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ContainerStatus_CgroupInfo, kn) { + currentKey = ffj_t_ContainerStatus_CgroupInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'e': + + if bytes.Equal(ffj_key_ContainerStatus_ExecutorPID, kn) { + currentKey = ffj_t_ContainerStatus_ExecutorPID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'n': + + if bytes.Equal(ffj_key_ContainerStatus_NetworkInfos, kn) { + currentKey = ffj_t_ContainerStatus_NetworkInfos + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_ContainerStatus_ExecutorPID, kn) { + currentKey = ffj_t_ContainerStatus_ExecutorPID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_ContainerStatus_CgroupInfo, kn) { + currentKey = ffj_t_ContainerStatus_CgroupInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ContainerStatus_NetworkInfos, kn) { + currentKey = ffj_t_ContainerStatus_NetworkInfos + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_ContainerStatus_ContainerID, kn) { + currentKey = ffj_t_ContainerStatus_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_ContainerStatusno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_ContainerStatus_ContainerID: + goto handle_ContainerID + + case ffj_t_ContainerStatus_NetworkInfos: + goto handle_NetworkInfos + + case ffj_t_ContainerStatus_CgroupInfo: + goto handle_CgroupInfo + + case ffj_t_ContainerStatus_ExecutorPID: + goto handle_ExecutorPID + + case ffj_t_ContainerStatusno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ContainerID: + + /* handler: uj.ContainerID type=mesos.ContainerID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.ContainerID = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.ContainerID == nil { + uj.ContainerID = new(ContainerID) + } + + err = uj.ContainerID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NetworkInfos: + + /* handler: uj.NetworkInfos type=[]mesos.NetworkInfo kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.NetworkInfos = nil + } else { + + uj.NetworkInfos = []NetworkInfo{} + + wantVal := true + + for { + + var tmp_uj__NetworkInfos NetworkInfo + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__NetworkInfos type=mesos.NetworkInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__NetworkInfos.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.NetworkInfos = append(uj.NetworkInfos, tmp_uj__NetworkInfos) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_CgroupInfo: + + /* handler: uj.CgroupInfo type=mesos.CgroupInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.CgroupInfo = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.CgroupInfo == nil { + uj.CgroupInfo = new(CgroupInfo) + } + + err = uj.CgroupInfo.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ExecutorPID: + + /* handler: uj.ExecutorPID type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.ExecutorPID = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint32(tval) + uj.ExecutorPID = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Credential) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Credential) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "principal":`) + fflib.WriteJsonString(buf, string(mj.Principal)) + buf.WriteByte(',') + if mj.Secret != nil { + if true { + buf.WriteString(`"secret":`) + fflib.WriteJsonString(buf, string(*mj.Secret)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Credentialbase = iota + ffj_t_Credentialno_such_key + + ffj_t_Credential_Principal + + ffj_t_Credential_Secret +) + +var ffj_key_Credential_Principal = []byte("principal") + +var ffj_key_Credential_Secret = []byte("secret") + +func (uj *Credential) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Credential) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Credentialbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Credentialno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'p': + + if bytes.Equal(ffj_key_Credential_Principal, kn) { + currentKey = ffj_t_Credential_Principal + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_Credential_Secret, kn) { + currentKey = ffj_t_Credential_Secret + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Credential_Secret, kn) { + currentKey = ffj_t_Credential_Secret + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Credential_Principal, kn) { + currentKey = ffj_t_Credential_Principal + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Credentialno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Credential_Principal: + goto handle_Principal + + case ffj_t_Credential_Secret: + goto handle_Secret + + case ffj_t_Credentialno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Principal: + + /* handler: uj.Principal type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Principal = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Secret: + + /* handler: uj.Secret type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Secret = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Secret = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Credentials) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Credentials) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"credentials":`) + if mj.Credentials != nil { + buf.WriteString(`[`) + for i, v := range mj.Credentials { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Credentialsbase = iota + ffj_t_Credentialsno_such_key + + ffj_t_Credentials_Credentials +) + +var ffj_key_Credentials_Credentials = []byte("credentials") + +func (uj *Credentials) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Credentials) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Credentialsbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Credentialsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_Credentials_Credentials, kn) { + currentKey = ffj_t_Credentials_Credentials + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Credentials_Credentials, kn) { + currentKey = ffj_t_Credentials_Credentials + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Credentialsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Credentials_Credentials: + goto handle_Credentials + + case ffj_t_Credentialsno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Credentials: + + /* handler: uj.Credentials type=[]mesos.Credential kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Credentials = nil + } else { + + uj.Credentials = []Credential{} + + wantVal := true + + for { + + var tmp_uj__Credentials Credential + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Credentials type=mesos.Credential kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Credentials.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Credentials = append(uj.Credentials, tmp_uj__Credentials) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Device) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Device) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Path != nil { + if true { + buf.WriteString(`"path":`) + fflib.WriteJsonString(buf, string(*mj.Path)) + buf.WriteByte(',') + } + } + if mj.Number != nil { + if true { + buf.WriteString(`"number":`) + + { + + err = mj.Number.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Devicebase = iota + ffj_t_Deviceno_such_key + + ffj_t_Device_Path + + ffj_t_Device_Number +) + +var ffj_key_Device_Path = []byte("path") + +var ffj_key_Device_Number = []byte("number") + +func (uj *Device) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Device) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Devicebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Deviceno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'n': + + if bytes.Equal(ffj_key_Device_Number, kn) { + currentKey = ffj_t_Device_Number + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_Device_Path, kn) { + currentKey = ffj_t_Device_Path + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Device_Number, kn) { + currentKey = ffj_t_Device_Number + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Device_Path, kn) { + currentKey = ffj_t_Device_Path + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Deviceno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Device_Path: + goto handle_Path + + case ffj_t_Device_Number: + goto handle_Number + + case ffj_t_Deviceno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Path: + + /* handler: uj.Path type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Path = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Path = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Number: + + /* handler: uj.Number type=mesos.Device_Number kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Number = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Number == nil { + uj.Number = new(Device_Number) + } + + err = uj.Number.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *DeviceAccess) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *DeviceAccess) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"device":`) + + { + + err = mj.Device.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteString(`,"access":`) + + { + + err = mj.Access.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_DeviceAccessbase = iota + ffj_t_DeviceAccessno_such_key + + ffj_t_DeviceAccess_Device + + ffj_t_DeviceAccess_Access +) + +var ffj_key_DeviceAccess_Device = []byte("device") + +var ffj_key_DeviceAccess_Access = []byte("access") + +func (uj *DeviceAccess) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *DeviceAccess) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_DeviceAccessbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_DeviceAccessno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'a': + + if bytes.Equal(ffj_key_DeviceAccess_Access, kn) { + currentKey = ffj_t_DeviceAccess_Access + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'd': + + if bytes.Equal(ffj_key_DeviceAccess_Device, kn) { + currentKey = ffj_t_DeviceAccess_Device + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_DeviceAccess_Access, kn) { + currentKey = ffj_t_DeviceAccess_Access + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_DeviceAccess_Device, kn) { + currentKey = ffj_t_DeviceAccess_Device + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_DeviceAccessno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_DeviceAccess_Device: + goto handle_Device + + case ffj_t_DeviceAccess_Access: + goto handle_Access + + case ffj_t_DeviceAccessno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Device: + + /* handler: uj.Device type=mesos.Device kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.Device.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Access: + + /* handler: uj.Access type=mesos.DeviceAccess_Access kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.Access.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *DeviceAccess_Access) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *DeviceAccess_Access) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Read != nil { + if true { + if *mj.Read { + buf.WriteString(`"read":true`) + } else { + buf.WriteString(`"read":false`) + } + buf.WriteByte(',') + } + } + if mj.Write != nil { + if true { + if *mj.Write { + buf.WriteString(`"write":true`) + } else { + buf.WriteString(`"write":false`) + } + buf.WriteByte(',') + } + } + if mj.Mknod != nil { + if true { + if *mj.Mknod { + buf.WriteString(`"mknod":true`) + } else { + buf.WriteString(`"mknod":false`) + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_DeviceAccess_Accessbase = iota + ffj_t_DeviceAccess_Accessno_such_key + + ffj_t_DeviceAccess_Access_Read + + ffj_t_DeviceAccess_Access_Write + + ffj_t_DeviceAccess_Access_Mknod +) + +var ffj_key_DeviceAccess_Access_Read = []byte("read") + +var ffj_key_DeviceAccess_Access_Write = []byte("write") + +var ffj_key_DeviceAccess_Access_Mknod = []byte("mknod") + +func (uj *DeviceAccess_Access) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *DeviceAccess_Access) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_DeviceAccess_Accessbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_DeviceAccess_Accessno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'm': + + if bytes.Equal(ffj_key_DeviceAccess_Access_Mknod, kn) { + currentKey = ffj_t_DeviceAccess_Access_Mknod + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_DeviceAccess_Access_Read, kn) { + currentKey = ffj_t_DeviceAccess_Access_Read + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'w': + + if bytes.Equal(ffj_key_DeviceAccess_Access_Write, kn) { + currentKey = ffj_t_DeviceAccess_Access_Write + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_DeviceAccess_Access_Mknod, kn) { + currentKey = ffj_t_DeviceAccess_Access_Mknod + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_DeviceAccess_Access_Write, kn) { + currentKey = ffj_t_DeviceAccess_Access_Write + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_DeviceAccess_Access_Read, kn) { + currentKey = ffj_t_DeviceAccess_Access_Read + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_DeviceAccess_Accessno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_DeviceAccess_Access_Read: + goto handle_Read + + case ffj_t_DeviceAccess_Access_Write: + goto handle_Write + + case ffj_t_DeviceAccess_Access_Mknod: + goto handle_Mknod + + case ffj_t_DeviceAccess_Accessno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Read: + + /* handler: uj.Read type=bool kind=bool quoted=false*/ + + { + if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) + } + } + + { + if tok == fflib.FFTok_null { + + uj.Read = nil + + } else { + tmpb := fs.Output.Bytes() + + var tval bool + + if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { + + tval = true + + } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { + + tval = false + + } else { + err = errors.New("unexpected bytes for true/false value") + return fs.WrapErr(err) + } + + uj.Read = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Write: + + /* handler: uj.Write type=bool kind=bool quoted=false*/ + + { + if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) + } + } + + { + if tok == fflib.FFTok_null { + + uj.Write = nil + + } else { + tmpb := fs.Output.Bytes() + + var tval bool + + if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { + + tval = true + + } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { + + tval = false + + } else { + err = errors.New("unexpected bytes for true/false value") + return fs.WrapErr(err) + } + + uj.Write = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Mknod: + + /* handler: uj.Mknod type=bool kind=bool quoted=false*/ + + { + if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) + } + } + + { + if tok == fflib.FFTok_null { + + uj.Mknod = nil + + } else { + tmpb := fs.Output.Bytes() + + var tval bool + + if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { + + tval = true + + } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { + + tval = false + + } else { + err = errors.New("unexpected bytes for true/false value") + return fs.WrapErr(err) + } + + uj.Mknod = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *DeviceWhitelist) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *DeviceWhitelist) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"allowed_devices":`) + if mj.AllowedDevices != nil { + buf.WriteString(`[`) + for i, v := range mj.AllowedDevices { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_DeviceWhitelistbase = iota + ffj_t_DeviceWhitelistno_such_key + + ffj_t_DeviceWhitelist_AllowedDevices +) + +var ffj_key_DeviceWhitelist_AllowedDevices = []byte("allowed_devices") + +func (uj *DeviceWhitelist) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *DeviceWhitelist) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_DeviceWhitelistbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_DeviceWhitelistno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'a': + + if bytes.Equal(ffj_key_DeviceWhitelist_AllowedDevices, kn) { + currentKey = ffj_t_DeviceWhitelist_AllowedDevices + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_DeviceWhitelist_AllowedDevices, kn) { + currentKey = ffj_t_DeviceWhitelist_AllowedDevices + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_DeviceWhitelistno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_DeviceWhitelist_AllowedDevices: + goto handle_AllowedDevices + + case ffj_t_DeviceWhitelistno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_AllowedDevices: + + /* handler: uj.AllowedDevices type=[]mesos.DeviceAccess kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.AllowedDevices = nil + } else { + + uj.AllowedDevices = []DeviceAccess{} + + wantVal := true + + for { + + var tmp_uj__AllowedDevices DeviceAccess + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__AllowedDevices type=mesos.DeviceAccess kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__AllowedDevices.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.AllowedDevices = append(uj.AllowedDevices, tmp_uj__AllowedDevices) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Device_Number) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Device_Number) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.MajorNumber != nil { + if true { + buf.WriteString(`"major_number":`) + fflib.FormatBits2(buf, uint64(*mj.MajorNumber), 10, false) + buf.WriteByte(',') + } + } + if mj.MinorNumber != nil { + if true { + buf.WriteString(`"minor_number":`) + fflib.FormatBits2(buf, uint64(*mj.MinorNumber), 10, false) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Device_Numberbase = iota + ffj_t_Device_Numberno_such_key + + ffj_t_Device_Number_MajorNumber + + ffj_t_Device_Number_MinorNumber +) + +var ffj_key_Device_Number_MajorNumber = []byte("major_number") + +var ffj_key_Device_Number_MinorNumber = []byte("minor_number") + +func (uj *Device_Number) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Device_Number) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Device_Numberbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Device_Numberno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'm': + + if bytes.Equal(ffj_key_Device_Number_MajorNumber, kn) { + currentKey = ffj_t_Device_Number_MajorNumber + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Device_Number_MinorNumber, kn) { + currentKey = ffj_t_Device_Number_MinorNumber + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_Device_Number_MinorNumber, kn) { + currentKey = ffj_t_Device_Number_MinorNumber + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Device_Number_MajorNumber, kn) { + currentKey = ffj_t_Device_Number_MajorNumber + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Device_Numberno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Device_Number_MajorNumber: + goto handle_MajorNumber + + case ffj_t_Device_Number_MinorNumber: + goto handle_MinorNumber + + case ffj_t_Device_Numberno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_MajorNumber: + + /* handler: uj.MajorNumber type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.MajorNumber = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.MajorNumber = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_MinorNumber: + + /* handler: uj.MinorNumber type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.MinorNumber = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.MinorNumber = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *DiscoveryInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *DiscoveryInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "visibility":`) + + { + + obj, err = mj.Visibility.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + if mj.Name != nil { + if true { + buf.WriteString(`"name":`) + fflib.WriteJsonString(buf, string(*mj.Name)) + buf.WriteByte(',') + } + } + if mj.Environment != nil { + if true { + buf.WriteString(`"environment":`) + fflib.WriteJsonString(buf, string(*mj.Environment)) + buf.WriteByte(',') + } + } + if mj.Location != nil { + if true { + buf.WriteString(`"location":`) + fflib.WriteJsonString(buf, string(*mj.Location)) + buf.WriteByte(',') + } + } + if mj.Version != nil { + if true { + buf.WriteString(`"version":`) + fflib.WriteJsonString(buf, string(*mj.Version)) + buf.WriteByte(',') + } + } + if mj.Ports != nil { + if true { + buf.WriteString(`"ports":`) + + { + + err = mj.Ports.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Labels != nil { + if true { + buf.WriteString(`"labels":`) + + { + + err = mj.Labels.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_DiscoveryInfobase = iota + ffj_t_DiscoveryInfono_such_key + + ffj_t_DiscoveryInfo_Visibility + + ffj_t_DiscoveryInfo_Name + + ffj_t_DiscoveryInfo_Environment + + ffj_t_DiscoveryInfo_Location + + ffj_t_DiscoveryInfo_Version + + ffj_t_DiscoveryInfo_Ports + + ffj_t_DiscoveryInfo_Labels +) + +var ffj_key_DiscoveryInfo_Visibility = []byte("visibility") + +var ffj_key_DiscoveryInfo_Name = []byte("name") + +var ffj_key_DiscoveryInfo_Environment = []byte("environment") + +var ffj_key_DiscoveryInfo_Location = []byte("location") + +var ffj_key_DiscoveryInfo_Version = []byte("version") + +var ffj_key_DiscoveryInfo_Ports = []byte("ports") + +var ffj_key_DiscoveryInfo_Labels = []byte("labels") + +func (uj *DiscoveryInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *DiscoveryInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_DiscoveryInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_DiscoveryInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'e': + + if bytes.Equal(ffj_key_DiscoveryInfo_Environment, kn) { + currentKey = ffj_t_DiscoveryInfo_Environment + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'l': + + if bytes.Equal(ffj_key_DiscoveryInfo_Location, kn) { + currentKey = ffj_t_DiscoveryInfo_Location + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_DiscoveryInfo_Labels, kn) { + currentKey = ffj_t_DiscoveryInfo_Labels + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'n': + + if bytes.Equal(ffj_key_DiscoveryInfo_Name, kn) { + currentKey = ffj_t_DiscoveryInfo_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_DiscoveryInfo_Ports, kn) { + currentKey = ffj_t_DiscoveryInfo_Ports + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'v': + + if bytes.Equal(ffj_key_DiscoveryInfo_Visibility, kn) { + currentKey = ffj_t_DiscoveryInfo_Visibility + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_DiscoveryInfo_Version, kn) { + currentKey = ffj_t_DiscoveryInfo_Version + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_DiscoveryInfo_Labels, kn) { + currentKey = ffj_t_DiscoveryInfo_Labels + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_DiscoveryInfo_Ports, kn) { + currentKey = ffj_t_DiscoveryInfo_Ports + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_DiscoveryInfo_Version, kn) { + currentKey = ffj_t_DiscoveryInfo_Version + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_DiscoveryInfo_Location, kn) { + currentKey = ffj_t_DiscoveryInfo_Location + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_DiscoveryInfo_Environment, kn) { + currentKey = ffj_t_DiscoveryInfo_Environment + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_DiscoveryInfo_Name, kn) { + currentKey = ffj_t_DiscoveryInfo_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_DiscoveryInfo_Visibility, kn) { + currentKey = ffj_t_DiscoveryInfo_Visibility + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_DiscoveryInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_DiscoveryInfo_Visibility: + goto handle_Visibility + + case ffj_t_DiscoveryInfo_Name: + goto handle_Name + + case ffj_t_DiscoveryInfo_Environment: + goto handle_Environment + + case ffj_t_DiscoveryInfo_Location: + goto handle_Location + + case ffj_t_DiscoveryInfo_Version: + goto handle_Version + + case ffj_t_DiscoveryInfo_Ports: + goto handle_Ports + + case ffj_t_DiscoveryInfo_Labels: + goto handle_Labels + + case ffj_t_DiscoveryInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Visibility: + + /* handler: uj.Visibility type=mesos.DiscoveryInfo_Visibility kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.Visibility.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Name: + + /* handler: uj.Name type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Name = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Name = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Environment: + + /* handler: uj.Environment type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Environment = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Environment = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Location: + + /* handler: uj.Location type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Location = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Location = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Version: + + /* handler: uj.Version type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Version = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Version = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Ports: + + /* handler: uj.Ports type=mesos.Ports kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Ports = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Ports == nil { + uj.Ports = new(Ports) + } + + err = uj.Ports.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Labels: + + /* handler: uj.Labels type=mesos.Labels kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Labels = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Labels == nil { + uj.Labels = new(Labels) + } + + err = uj.Labels.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *DiskStatistics) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *DiskStatistics) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Source != nil { + if true { + buf.WriteString(`"source":`) + + { + + err = mj.Source.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Persistence != nil { + if true { + buf.WriteString(`"persistence":`) + + { + + err = mj.Persistence.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.LimitBytes != nil { + if true { + buf.WriteString(`"limit_bytes":`) + fflib.FormatBits2(buf, uint64(*mj.LimitBytes), 10, false) + buf.WriteByte(',') + } + } + if mj.UsedBytes != nil { + if true { + buf.WriteString(`"used_bytes":`) + fflib.FormatBits2(buf, uint64(*mj.UsedBytes), 10, false) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_DiskStatisticsbase = iota + ffj_t_DiskStatisticsno_such_key + + ffj_t_DiskStatistics_Source + + ffj_t_DiskStatistics_Persistence + + ffj_t_DiskStatistics_LimitBytes + + ffj_t_DiskStatistics_UsedBytes +) + +var ffj_key_DiskStatistics_Source = []byte("source") + +var ffj_key_DiskStatistics_Persistence = []byte("persistence") + +var ffj_key_DiskStatistics_LimitBytes = []byte("limit_bytes") + +var ffj_key_DiskStatistics_UsedBytes = []byte("used_bytes") + +func (uj *DiskStatistics) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *DiskStatistics) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_DiskStatisticsbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_DiskStatisticsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'l': + + if bytes.Equal(ffj_key_DiskStatistics_LimitBytes, kn) { + currentKey = ffj_t_DiskStatistics_LimitBytes + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_DiskStatistics_Persistence, kn) { + currentKey = ffj_t_DiskStatistics_Persistence + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_DiskStatistics_Source, kn) { + currentKey = ffj_t_DiskStatistics_Source + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'u': + + if bytes.Equal(ffj_key_DiskStatistics_UsedBytes, kn) { + currentKey = ffj_t_DiskStatistics_UsedBytes + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_DiskStatistics_UsedBytes, kn) { + currentKey = ffj_t_DiskStatistics_UsedBytes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_DiskStatistics_LimitBytes, kn) { + currentKey = ffj_t_DiskStatistics_LimitBytes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_DiskStatistics_Persistence, kn) { + currentKey = ffj_t_DiskStatistics_Persistence + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_DiskStatistics_Source, kn) { + currentKey = ffj_t_DiskStatistics_Source + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_DiskStatisticsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_DiskStatistics_Source: + goto handle_Source + + case ffj_t_DiskStatistics_Persistence: + goto handle_Persistence + + case ffj_t_DiskStatistics_LimitBytes: + goto handle_LimitBytes + + case ffj_t_DiskStatistics_UsedBytes: + goto handle_UsedBytes + + case ffj_t_DiskStatisticsno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Source: + + /* handler: uj.Source type=mesos.Resource_DiskInfo_Source kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Source = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Source == nil { + uj.Source = new(Resource_DiskInfo_Source) + } + + err = uj.Source.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Persistence: + + /* handler: uj.Persistence type=mesos.Resource_DiskInfo_Persistence kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Persistence = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Persistence == nil { + uj.Persistence = new(Resource_DiskInfo_Persistence) + } + + err = uj.Persistence.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_LimitBytes: + + /* handler: uj.LimitBytes type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.LimitBytes = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.LimitBytes = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_UsedBytes: + + /* handler: uj.UsedBytes type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.UsedBytes = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.UsedBytes = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *DomainInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *DomainInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.FaultDomain != nil { + if true { + buf.WriteString(`"fault_domain":`) + + { + + err = mj.FaultDomain.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_DomainInfobase = iota + ffj_t_DomainInfono_such_key + + ffj_t_DomainInfo_FaultDomain +) + +var ffj_key_DomainInfo_FaultDomain = []byte("fault_domain") + +func (uj *DomainInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *DomainInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_DomainInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_DomainInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'f': + + if bytes.Equal(ffj_key_DomainInfo_FaultDomain, kn) { + currentKey = ffj_t_DomainInfo_FaultDomain + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_DomainInfo_FaultDomain, kn) { + currentKey = ffj_t_DomainInfo_FaultDomain + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_DomainInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_DomainInfo_FaultDomain: + goto handle_FaultDomain + + case ffj_t_DomainInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_FaultDomain: + + /* handler: uj.FaultDomain type=mesos.DomainInfo_FaultDomain kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.FaultDomain = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.FaultDomain == nil { + uj.FaultDomain = new(DomainInfo_FaultDomain) + } + + err = uj.FaultDomain.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *DomainInfo_FaultDomain) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *DomainInfo_FaultDomain) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"region":`) + + { + + err = mj.Region.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteString(`,"zone":`) + + { + + err = mj.Zone.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_DomainInfo_FaultDomainbase = iota + ffj_t_DomainInfo_FaultDomainno_such_key + + ffj_t_DomainInfo_FaultDomain_Region + + ffj_t_DomainInfo_FaultDomain_Zone +) + +var ffj_key_DomainInfo_FaultDomain_Region = []byte("region") + +var ffj_key_DomainInfo_FaultDomain_Zone = []byte("zone") + +func (uj *DomainInfo_FaultDomain) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *DomainInfo_FaultDomain) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_DomainInfo_FaultDomainbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_DomainInfo_FaultDomainno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'r': + + if bytes.Equal(ffj_key_DomainInfo_FaultDomain_Region, kn) { + currentKey = ffj_t_DomainInfo_FaultDomain_Region + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'z': + + if bytes.Equal(ffj_key_DomainInfo_FaultDomain_Zone, kn) { + currentKey = ffj_t_DomainInfo_FaultDomain_Zone + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_DomainInfo_FaultDomain_Zone, kn) { + currentKey = ffj_t_DomainInfo_FaultDomain_Zone + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_DomainInfo_FaultDomain_Region, kn) { + currentKey = ffj_t_DomainInfo_FaultDomain_Region + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_DomainInfo_FaultDomainno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_DomainInfo_FaultDomain_Region: + goto handle_Region + + case ffj_t_DomainInfo_FaultDomain_Zone: + goto handle_Zone + + case ffj_t_DomainInfo_FaultDomainno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Region: + + /* handler: uj.Region type=mesos.DomainInfo_FaultDomain_RegionInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.Region.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Zone: + + /* handler: uj.Zone type=mesos.DomainInfo_FaultDomain_ZoneInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.Zone.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *DomainInfo_FaultDomain_RegionInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *DomainInfo_FaultDomain_RegionInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"name":`) + fflib.WriteJsonString(buf, string(mj.Name)) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_DomainInfo_FaultDomain_RegionInfobase = iota + ffj_t_DomainInfo_FaultDomain_RegionInfono_such_key + + ffj_t_DomainInfo_FaultDomain_RegionInfo_Name +) + +var ffj_key_DomainInfo_FaultDomain_RegionInfo_Name = []byte("name") + +func (uj *DomainInfo_FaultDomain_RegionInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *DomainInfo_FaultDomain_RegionInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_DomainInfo_FaultDomain_RegionInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_DomainInfo_FaultDomain_RegionInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'n': + + if bytes.Equal(ffj_key_DomainInfo_FaultDomain_RegionInfo_Name, kn) { + currentKey = ffj_t_DomainInfo_FaultDomain_RegionInfo_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_DomainInfo_FaultDomain_RegionInfo_Name, kn) { + currentKey = ffj_t_DomainInfo_FaultDomain_RegionInfo_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_DomainInfo_FaultDomain_RegionInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_DomainInfo_FaultDomain_RegionInfo_Name: + goto handle_Name + + case ffj_t_DomainInfo_FaultDomain_RegionInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Name: + + /* handler: uj.Name type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Name = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *DomainInfo_FaultDomain_ZoneInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *DomainInfo_FaultDomain_ZoneInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"name":`) + fflib.WriteJsonString(buf, string(mj.Name)) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_DomainInfo_FaultDomain_ZoneInfobase = iota + ffj_t_DomainInfo_FaultDomain_ZoneInfono_such_key + + ffj_t_DomainInfo_FaultDomain_ZoneInfo_Name +) + +var ffj_key_DomainInfo_FaultDomain_ZoneInfo_Name = []byte("name") + +func (uj *DomainInfo_FaultDomain_ZoneInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *DomainInfo_FaultDomain_ZoneInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_DomainInfo_FaultDomain_ZoneInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_DomainInfo_FaultDomain_ZoneInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'n': + + if bytes.Equal(ffj_key_DomainInfo_FaultDomain_ZoneInfo_Name, kn) { + currentKey = ffj_t_DomainInfo_FaultDomain_ZoneInfo_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_DomainInfo_FaultDomain_ZoneInfo_Name, kn) { + currentKey = ffj_t_DomainInfo_FaultDomain_ZoneInfo_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_DomainInfo_FaultDomain_ZoneInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_DomainInfo_FaultDomain_ZoneInfo_Name: + goto handle_Name + + case ffj_t_DomainInfo_FaultDomain_ZoneInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Name: + + /* handler: uj.Name type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Name = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *DurationInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *DurationInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"nanoseconds":`) + fflib.FormatBits2(buf, uint64(mj.Nanoseconds), 10, mj.Nanoseconds < 0) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_DurationInfobase = iota + ffj_t_DurationInfono_such_key + + ffj_t_DurationInfo_Nanoseconds +) + +var ffj_key_DurationInfo_Nanoseconds = []byte("nanoseconds") + +func (uj *DurationInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *DurationInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_DurationInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_DurationInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'n': + + if bytes.Equal(ffj_key_DurationInfo_Nanoseconds, kn) { + currentKey = ffj_t_DurationInfo_Nanoseconds + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_DurationInfo_Nanoseconds, kn) { + currentKey = ffj_t_DurationInfo_Nanoseconds + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_DurationInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_DurationInfo_Nanoseconds: + goto handle_Nanoseconds + + case ffj_t_DurationInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Nanoseconds: + + /* handler: uj.Nanoseconds type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + uj.Nanoseconds = int64(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Environment) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Environment) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"variables":`) + if mj.Variables != nil { + buf.WriteString(`[`) + for i, v := range mj.Variables { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Environmentbase = iota + ffj_t_Environmentno_such_key + + ffj_t_Environment_Variables +) + +var ffj_key_Environment_Variables = []byte("variables") + +func (uj *Environment) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Environment) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Environmentbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Environmentno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'v': + + if bytes.Equal(ffj_key_Environment_Variables, kn) { + currentKey = ffj_t_Environment_Variables + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Environment_Variables, kn) { + currentKey = ffj_t_Environment_Variables + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Environmentno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Environment_Variables: + goto handle_Variables + + case ffj_t_Environmentno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Variables: + + /* handler: uj.Variables type=[]mesos.Environment_Variable kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Variables = nil + } else { + + uj.Variables = []Environment_Variable{} + + wantVal := true + + for { + + var tmp_uj__Variables Environment_Variable + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Variables type=mesos.Environment_Variable kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Variables.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Variables = append(uj.Variables, tmp_uj__Variables) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Environment_Variable) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Environment_Variable) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "name":`) + fflib.WriteJsonString(buf, string(mj.Name)) + buf.WriteByte(',') + if mj.Type != nil { + if true { + buf.WriteString(`"type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + if mj.Value != nil { + if true { + buf.WriteString(`"value":`) + fflib.WriteJsonString(buf, string(*mj.Value)) + buf.WriteByte(',') + } + } + if mj.Secret != nil { + if true { + buf.WriteString(`"secret":`) + + { + + err = mj.Secret.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Environment_Variablebase = iota + ffj_t_Environment_Variableno_such_key + + ffj_t_Environment_Variable_Name + + ffj_t_Environment_Variable_Type + + ffj_t_Environment_Variable_Value + + ffj_t_Environment_Variable_Secret +) + +var ffj_key_Environment_Variable_Name = []byte("name") + +var ffj_key_Environment_Variable_Type = []byte("type") + +var ffj_key_Environment_Variable_Value = []byte("value") + +var ffj_key_Environment_Variable_Secret = []byte("secret") + +func (uj *Environment_Variable) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Environment_Variable) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Environment_Variablebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Environment_Variableno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'n': + + if bytes.Equal(ffj_key_Environment_Variable_Name, kn) { + currentKey = ffj_t_Environment_Variable_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_Environment_Variable_Secret, kn) { + currentKey = ffj_t_Environment_Variable_Secret + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_Environment_Variable_Type, kn) { + currentKey = ffj_t_Environment_Variable_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'v': + + if bytes.Equal(ffj_key_Environment_Variable_Value, kn) { + currentKey = ffj_t_Environment_Variable_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Environment_Variable_Secret, kn) { + currentKey = ffj_t_Environment_Variable_Secret + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Environment_Variable_Value, kn) { + currentKey = ffj_t_Environment_Variable_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Environment_Variable_Type, kn) { + currentKey = ffj_t_Environment_Variable_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Environment_Variable_Name, kn) { + currentKey = ffj_t_Environment_Variable_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Environment_Variableno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Environment_Variable_Name: + goto handle_Name + + case ffj_t_Environment_Variable_Type: + goto handle_Type + + case ffj_t_Environment_Variable_Value: + goto handle_Value + + case ffj_t_Environment_Variable_Secret: + goto handle_Secret + + case ffj_t_Environment_Variableno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Name: + + /* handler: uj.Name type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Name = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Type: + + /* handler: uj.Type type=mesos.Environment_Variable_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Type = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.Type == nil { + uj.Type = new(Environment_Variable_Type) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Value: + + /* handler: uj.Value type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Value = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Value = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Secret: + + /* handler: uj.Secret type=mesos.Secret kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Secret = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Secret == nil { + uj.Secret = new(Secret) + } + + err = uj.Secret.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *ExecutorID) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *ExecutorID) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"value":`) + fflib.WriteJsonString(buf, string(mj.Value)) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_ExecutorIDbase = iota + ffj_t_ExecutorIDno_such_key + + ffj_t_ExecutorID_Value +) + +var ffj_key_ExecutorID_Value = []byte("value") + +func (uj *ExecutorID) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *ExecutorID) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_ExecutorIDbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_ExecutorIDno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'v': + + if bytes.Equal(ffj_key_ExecutorID_Value, kn) { + currentKey = ffj_t_ExecutorID_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_ExecutorID_Value, kn) { + currentKey = ffj_t_ExecutorID_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_ExecutorIDno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_ExecutorID_Value: + goto handle_Value + + case ffj_t_ExecutorIDno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Value: + + /* handler: uj.Value type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Value = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *ExecutorInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *ExecutorInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteString(`,"executor_id":`) + + { + + err = mj.ExecutorID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + if mj.FrameworkID != nil { + if true { + buf.WriteString(`"framework_id":`) + + { + + err = mj.FrameworkID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Command != nil { + if true { + buf.WriteString(`"command":`) + + { + + err = mj.Command.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Container != nil { + if true { + buf.WriteString(`"container":`) + + { + + err = mj.Container.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"resources":`) + if mj.Resources != nil { + buf.WriteString(`[`) + for i, v := range mj.Resources { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.Name != nil { + if true { + buf.WriteString(`"name":`) + fflib.WriteJsonString(buf, string(*mj.Name)) + buf.WriteByte(',') + } + } + if mj.Source != nil { + if true { + buf.WriteString(`"source":`) + fflib.WriteJsonString(buf, string(*mj.Source)) + buf.WriteByte(',') + } + } + if len(mj.Data) != 0 { + buf.WriteString(`"data":`) + if mj.Data != nil { + buf.WriteString(`"`) + { + enc := base64.NewEncoder(base64.StdEncoding, buf) + enc.Write(reflect.Indirect(reflect.ValueOf(mj.Data)).Bytes()) + enc.Close() + } + buf.WriteString(`"`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + } + if mj.Discovery != nil { + if true { + buf.WriteString(`"discovery":`) + + { + + err = mj.Discovery.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.ShutdownGracePeriod != nil { + if true { + buf.WriteString(`"shutdown_grace_period":`) + + { + + err = mj.ShutdownGracePeriod.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Labels != nil { + if true { + buf.WriteString(`"labels":`) + + { + + err = mj.Labels.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_ExecutorInfobase = iota + ffj_t_ExecutorInfono_such_key + + ffj_t_ExecutorInfo_Type + + ffj_t_ExecutorInfo_ExecutorID + + ffj_t_ExecutorInfo_FrameworkID + + ffj_t_ExecutorInfo_Command + + ffj_t_ExecutorInfo_Container + + ffj_t_ExecutorInfo_Resources + + ffj_t_ExecutorInfo_Name + + ffj_t_ExecutorInfo_Source + + ffj_t_ExecutorInfo_Data + + ffj_t_ExecutorInfo_Discovery + + ffj_t_ExecutorInfo_ShutdownGracePeriod + + ffj_t_ExecutorInfo_Labels +) + +var ffj_key_ExecutorInfo_Type = []byte("type") + +var ffj_key_ExecutorInfo_ExecutorID = []byte("executor_id") + +var ffj_key_ExecutorInfo_FrameworkID = []byte("framework_id") + +var ffj_key_ExecutorInfo_Command = []byte("command") + +var ffj_key_ExecutorInfo_Container = []byte("container") + +var ffj_key_ExecutorInfo_Resources = []byte("resources") + +var ffj_key_ExecutorInfo_Name = []byte("name") + +var ffj_key_ExecutorInfo_Source = []byte("source") + +var ffj_key_ExecutorInfo_Data = []byte("data") + +var ffj_key_ExecutorInfo_Discovery = []byte("discovery") + +var ffj_key_ExecutorInfo_ShutdownGracePeriod = []byte("shutdown_grace_period") + +var ffj_key_ExecutorInfo_Labels = []byte("labels") + +func (uj *ExecutorInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *ExecutorInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_ExecutorInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_ExecutorInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_ExecutorInfo_Command, kn) { + currentKey = ffj_t_ExecutorInfo_Command + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ExecutorInfo_Container, kn) { + currentKey = ffj_t_ExecutorInfo_Container + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'd': + + if bytes.Equal(ffj_key_ExecutorInfo_Data, kn) { + currentKey = ffj_t_ExecutorInfo_Data + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ExecutorInfo_Discovery, kn) { + currentKey = ffj_t_ExecutorInfo_Discovery + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'e': + + if bytes.Equal(ffj_key_ExecutorInfo_ExecutorID, kn) { + currentKey = ffj_t_ExecutorInfo_ExecutorID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'f': + + if bytes.Equal(ffj_key_ExecutorInfo_FrameworkID, kn) { + currentKey = ffj_t_ExecutorInfo_FrameworkID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'l': + + if bytes.Equal(ffj_key_ExecutorInfo_Labels, kn) { + currentKey = ffj_t_ExecutorInfo_Labels + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'n': + + if bytes.Equal(ffj_key_ExecutorInfo_Name, kn) { + currentKey = ffj_t_ExecutorInfo_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_ExecutorInfo_Resources, kn) { + currentKey = ffj_t_ExecutorInfo_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_ExecutorInfo_Source, kn) { + currentKey = ffj_t_ExecutorInfo_Source + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ExecutorInfo_ShutdownGracePeriod, kn) { + currentKey = ffj_t_ExecutorInfo_ShutdownGracePeriod + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_ExecutorInfo_Type, kn) { + currentKey = ffj_t_ExecutorInfo_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_ExecutorInfo_Labels, kn) { + currentKey = ffj_t_ExecutorInfo_Labels + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ExecutorInfo_ShutdownGracePeriod, kn) { + currentKey = ffj_t_ExecutorInfo_ShutdownGracePeriod + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ExecutorInfo_Discovery, kn) { + currentKey = ffj_t_ExecutorInfo_Discovery + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_ExecutorInfo_Data, kn) { + currentKey = ffj_t_ExecutorInfo_Data + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ExecutorInfo_Source, kn) { + currentKey = ffj_t_ExecutorInfo_Source + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_ExecutorInfo_Name, kn) { + currentKey = ffj_t_ExecutorInfo_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ExecutorInfo_Resources, kn) { + currentKey = ffj_t_ExecutorInfo_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_ExecutorInfo_Container, kn) { + currentKey = ffj_t_ExecutorInfo_Container + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_ExecutorInfo_Command, kn) { + currentKey = ffj_t_ExecutorInfo_Command + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ExecutorInfo_FrameworkID, kn) { + currentKey = ffj_t_ExecutorInfo_FrameworkID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_ExecutorInfo_ExecutorID, kn) { + currentKey = ffj_t_ExecutorInfo_ExecutorID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_ExecutorInfo_Type, kn) { + currentKey = ffj_t_ExecutorInfo_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_ExecutorInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_ExecutorInfo_Type: + goto handle_Type + + case ffj_t_ExecutorInfo_ExecutorID: + goto handle_ExecutorID + + case ffj_t_ExecutorInfo_FrameworkID: + goto handle_FrameworkID + + case ffj_t_ExecutorInfo_Command: + goto handle_Command + + case ffj_t_ExecutorInfo_Container: + goto handle_Container + + case ffj_t_ExecutorInfo_Resources: + goto handle_Resources + + case ffj_t_ExecutorInfo_Name: + goto handle_Name + + case ffj_t_ExecutorInfo_Source: + goto handle_Source + + case ffj_t_ExecutorInfo_Data: + goto handle_Data + + case ffj_t_ExecutorInfo_Discovery: + goto handle_Discovery + + case ffj_t_ExecutorInfo_ShutdownGracePeriod: + goto handle_ShutdownGracePeriod + + case ffj_t_ExecutorInfo_Labels: + goto handle_Labels + + case ffj_t_ExecutorInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=mesos.ExecutorInfo_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ExecutorID: + + /* handler: uj.ExecutorID type=mesos.ExecutorID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.ExecutorID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_FrameworkID: + + /* handler: uj.FrameworkID type=mesos.FrameworkID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.FrameworkID = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.FrameworkID == nil { + uj.FrameworkID = new(FrameworkID) + } + + err = uj.FrameworkID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Command: + + /* handler: uj.Command type=mesos.CommandInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Command = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Command == nil { + uj.Command = new(CommandInfo) + } + + err = uj.Command.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Container: + + /* handler: uj.Container type=mesos.ContainerInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Container = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Container == nil { + uj.Container = new(ContainerInfo) + } + + err = uj.Container.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Resources: + + /* handler: uj.Resources type=[]mesos.Resource kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Resources = nil + } else { + + uj.Resources = []Resource{} + + wantVal := true + + for { + + var tmp_uj__Resources Resource + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Resources type=mesos.Resource kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Resources.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Resources = append(uj.Resources, tmp_uj__Resources) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Name: + + /* handler: uj.Name type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Name = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Name = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Source: + + /* handler: uj.Source type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Source = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Source = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Data: + + /* handler: uj.Data type=[]uint8 kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Data = nil + } else { + b := make([]byte, base64.StdEncoding.DecodedLen(fs.Output.Len())) + n, err := base64.StdEncoding.Decode(b, fs.Output.Bytes()) + if err != nil { + return fs.WrapErr(err) + } + + v := reflect.ValueOf(&uj.Data).Elem() + v.SetBytes(b[0:n]) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Discovery: + + /* handler: uj.Discovery type=mesos.DiscoveryInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Discovery = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Discovery == nil { + uj.Discovery = new(DiscoveryInfo) + } + + err = uj.Discovery.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ShutdownGracePeriod: + + /* handler: uj.ShutdownGracePeriod type=mesos.DurationInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.ShutdownGracePeriod = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.ShutdownGracePeriod == nil { + uj.ShutdownGracePeriod = new(DurationInfo) + } + + err = uj.ShutdownGracePeriod.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Labels: + + /* handler: uj.Labels type=mesos.Labels kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Labels = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Labels == nil { + uj.Labels = new(Labels) + } + + err = uj.Labels.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *FileInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *FileInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "path":`) + fflib.WriteJsonString(buf, string(mj.Path)) + buf.WriteByte(',') + if mj.Nlink != nil { + if true { + buf.WriteString(`"nlink":`) + fflib.FormatBits2(buf, uint64(*mj.Nlink), 10, *mj.Nlink < 0) + buf.WriteByte(',') + } + } + if mj.Size != nil { + if true { + buf.WriteString(`"size":`) + fflib.FormatBits2(buf, uint64(*mj.Size), 10, false) + buf.WriteByte(',') + } + } + if mj.Mtime != nil { + if true { + buf.WriteString(`"mtime":`) + + { + + err = mj.Mtime.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Mode != nil { + if true { + buf.WriteString(`"mode":`) + fflib.FormatBits2(buf, uint64(*mj.Mode), 10, false) + buf.WriteByte(',') + } + } + if mj.UID != nil { + if true { + buf.WriteString(`"uid":`) + fflib.WriteJsonString(buf, string(*mj.UID)) + buf.WriteByte(',') + } + } + if mj.GID != nil { + if true { + buf.WriteString(`"gid":`) + fflib.WriteJsonString(buf, string(*mj.GID)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_FileInfobase = iota + ffj_t_FileInfono_such_key + + ffj_t_FileInfo_Path + + ffj_t_FileInfo_Nlink + + ffj_t_FileInfo_Size + + ffj_t_FileInfo_Mtime + + ffj_t_FileInfo_Mode + + ffj_t_FileInfo_UID + + ffj_t_FileInfo_GID +) + +var ffj_key_FileInfo_Path = []byte("path") + +var ffj_key_FileInfo_Nlink = []byte("nlink") + +var ffj_key_FileInfo_Size = []byte("size") + +var ffj_key_FileInfo_Mtime = []byte("mtime") + +var ffj_key_FileInfo_Mode = []byte("mode") + +var ffj_key_FileInfo_UID = []byte("uid") + +var ffj_key_FileInfo_GID = []byte("gid") + +func (uj *FileInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *FileInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_FileInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_FileInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'g': + + if bytes.Equal(ffj_key_FileInfo_GID, kn) { + currentKey = ffj_t_FileInfo_GID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'm': + + if bytes.Equal(ffj_key_FileInfo_Mtime, kn) { + currentKey = ffj_t_FileInfo_Mtime + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_FileInfo_Mode, kn) { + currentKey = ffj_t_FileInfo_Mode + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'n': + + if bytes.Equal(ffj_key_FileInfo_Nlink, kn) { + currentKey = ffj_t_FileInfo_Nlink + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_FileInfo_Path, kn) { + currentKey = ffj_t_FileInfo_Path + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_FileInfo_Size, kn) { + currentKey = ffj_t_FileInfo_Size + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'u': + + if bytes.Equal(ffj_key_FileInfo_UID, kn) { + currentKey = ffj_t_FileInfo_UID + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_FileInfo_GID, kn) { + currentKey = ffj_t_FileInfo_GID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_FileInfo_UID, kn) { + currentKey = ffj_t_FileInfo_UID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_FileInfo_Mode, kn) { + currentKey = ffj_t_FileInfo_Mode + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_FileInfo_Mtime, kn) { + currentKey = ffj_t_FileInfo_Mtime + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_FileInfo_Size, kn) { + currentKey = ffj_t_FileInfo_Size + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_FileInfo_Nlink, kn) { + currentKey = ffj_t_FileInfo_Nlink + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_FileInfo_Path, kn) { + currentKey = ffj_t_FileInfo_Path + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_FileInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_FileInfo_Path: + goto handle_Path + + case ffj_t_FileInfo_Nlink: + goto handle_Nlink + + case ffj_t_FileInfo_Size: + goto handle_Size + + case ffj_t_FileInfo_Mtime: + goto handle_Mtime + + case ffj_t_FileInfo_Mode: + goto handle_Mode + + case ffj_t_FileInfo_UID: + goto handle_UID + + case ffj_t_FileInfo_GID: + goto handle_GID + + case ffj_t_FileInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Path: + + /* handler: uj.Path type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Path = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Nlink: + + /* handler: uj.Nlink type=int32 kind=int32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Nlink = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int32(tval) + uj.Nlink = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Size: + + /* handler: uj.Size type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Size = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.Size = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Mtime: + + /* handler: uj.Mtime type=mesos.TimeInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Mtime = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Mtime == nil { + uj.Mtime = new(TimeInfo) + } + + err = uj.Mtime.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Mode: + + /* handler: uj.Mode type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Mode = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint32(tval) + uj.Mode = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_UID: + + /* handler: uj.UID type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.UID = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.UID = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_GID: + + /* handler: uj.GID type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.GID = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.GID = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Filters) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Filters) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.RefuseSeconds != nil { + if true { + buf.WriteString(`"refuse_seconds":`) + fflib.AppendFloat(buf, float64(*mj.RefuseSeconds), 'g', -1, 64) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Filtersbase = iota + ffj_t_Filtersno_such_key + + ffj_t_Filters_RefuseSeconds +) + +var ffj_key_Filters_RefuseSeconds = []byte("refuse_seconds") + +func (uj *Filters) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Filters) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Filtersbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Filtersno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'r': + + if bytes.Equal(ffj_key_Filters_RefuseSeconds, kn) { + currentKey = ffj_t_Filters_RefuseSeconds + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Filters_RefuseSeconds, kn) { + currentKey = ffj_t_Filters_RefuseSeconds + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Filtersno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Filters_RefuseSeconds: + goto handle_RefuseSeconds + + case ffj_t_Filtersno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_RefuseSeconds: + + /* handler: uj.RefuseSeconds type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.RefuseSeconds = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.RefuseSeconds = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Flag) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Flag) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "name":`) + fflib.WriteJsonString(buf, string(mj.Name)) + buf.WriteByte(',') + if mj.Value != nil { + if true { + buf.WriteString(`"value":`) + fflib.WriteJsonString(buf, string(*mj.Value)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Flagbase = iota + ffj_t_Flagno_such_key + + ffj_t_Flag_Name + + ffj_t_Flag_Value +) + +var ffj_key_Flag_Name = []byte("name") + +var ffj_key_Flag_Value = []byte("value") + +func (uj *Flag) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Flag) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Flagbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Flagno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'n': + + if bytes.Equal(ffj_key_Flag_Name, kn) { + currentKey = ffj_t_Flag_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'v': + + if bytes.Equal(ffj_key_Flag_Value, kn) { + currentKey = ffj_t_Flag_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Flag_Value, kn) { + currentKey = ffj_t_Flag_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Flag_Name, kn) { + currentKey = ffj_t_Flag_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Flagno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Flag_Name: + goto handle_Name + + case ffj_t_Flag_Value: + goto handle_Value + + case ffj_t_Flagno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Name: + + /* handler: uj.Name type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Name = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Value: + + /* handler: uj.Value type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Value = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Value = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *FrameworkID) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *FrameworkID) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"value":`) + fflib.WriteJsonString(buf, string(mj.Value)) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_FrameworkIDbase = iota + ffj_t_FrameworkIDno_such_key + + ffj_t_FrameworkID_Value +) + +var ffj_key_FrameworkID_Value = []byte("value") + +func (uj *FrameworkID) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *FrameworkID) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_FrameworkIDbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_FrameworkIDno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'v': + + if bytes.Equal(ffj_key_FrameworkID_Value, kn) { + currentKey = ffj_t_FrameworkID_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_FrameworkID_Value, kn) { + currentKey = ffj_t_FrameworkID_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_FrameworkIDno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_FrameworkID_Value: + goto handle_Value + + case ffj_t_FrameworkIDno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Value: + + /* handler: uj.Value type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Value = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *FrameworkInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *FrameworkInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "user":`) + fflib.WriteJsonString(buf, string(mj.User)) + buf.WriteString(`,"name":`) + fflib.WriteJsonString(buf, string(mj.Name)) + buf.WriteByte(',') + if mj.ID != nil { + if true { + buf.WriteString(`"id":`) + + { + + err = mj.ID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.FailoverTimeout != nil { + if true { + buf.WriteString(`"failover_timeout":`) + fflib.AppendFloat(buf, float64(*mj.FailoverTimeout), 'g', -1, 64) + buf.WriteByte(',') + } + } + if mj.Checkpoint != nil { + if true { + if *mj.Checkpoint { + buf.WriteString(`"checkpoint":true`) + } else { + buf.WriteString(`"checkpoint":false`) + } + buf.WriteByte(',') + } + } + if mj.Role != nil { + if true { + buf.WriteString(`"role":`) + fflib.WriteJsonString(buf, string(*mj.Role)) + buf.WriteByte(',') + } + } + if len(mj.Roles) != 0 { + buf.WriteString(`"roles":`) + if mj.Roles != nil { + buf.WriteString(`[`) + for i, v := range mj.Roles { + if i != 0 { + buf.WriteString(`,`) + } + fflib.WriteJsonString(buf, string(v)) + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + } + if mj.Hostname != nil { + if true { + buf.WriteString(`"hostname":`) + fflib.WriteJsonString(buf, string(*mj.Hostname)) + buf.WriteByte(',') + } + } + if mj.Principal != nil { + if true { + buf.WriteString(`"principal":`) + fflib.WriteJsonString(buf, string(*mj.Principal)) + buf.WriteByte(',') + } + } + if mj.WebUiURL != nil { + if true { + buf.WriteString(`"webui_url":`) + fflib.WriteJsonString(buf, string(*mj.WebUiURL)) + buf.WriteByte(',') + } + } + buf.WriteString(`"capabilities":`) + if mj.Capabilities != nil { + buf.WriteString(`[`) + for i, v := range mj.Capabilities { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.Labels != nil { + if true { + buf.WriteString(`"labels":`) + + { + + err = mj.Labels.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_FrameworkInfobase = iota + ffj_t_FrameworkInfono_such_key + + ffj_t_FrameworkInfo_User + + ffj_t_FrameworkInfo_Name + + ffj_t_FrameworkInfo_ID + + ffj_t_FrameworkInfo_FailoverTimeout + + ffj_t_FrameworkInfo_Checkpoint + + ffj_t_FrameworkInfo_Role + + ffj_t_FrameworkInfo_Roles + + ffj_t_FrameworkInfo_Hostname + + ffj_t_FrameworkInfo_Principal + + ffj_t_FrameworkInfo_WebUiURL + + ffj_t_FrameworkInfo_Capabilities + + ffj_t_FrameworkInfo_Labels +) + +var ffj_key_FrameworkInfo_User = []byte("user") + +var ffj_key_FrameworkInfo_Name = []byte("name") + +var ffj_key_FrameworkInfo_ID = []byte("id") + +var ffj_key_FrameworkInfo_FailoverTimeout = []byte("failover_timeout") + +var ffj_key_FrameworkInfo_Checkpoint = []byte("checkpoint") + +var ffj_key_FrameworkInfo_Role = []byte("role") + +var ffj_key_FrameworkInfo_Roles = []byte("roles") + +var ffj_key_FrameworkInfo_Hostname = []byte("hostname") + +var ffj_key_FrameworkInfo_Principal = []byte("principal") + +var ffj_key_FrameworkInfo_WebUiURL = []byte("webui_url") + +var ffj_key_FrameworkInfo_Capabilities = []byte("capabilities") + +var ffj_key_FrameworkInfo_Labels = []byte("labels") + +func (uj *FrameworkInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *FrameworkInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_FrameworkInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_FrameworkInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_FrameworkInfo_Checkpoint, kn) { + currentKey = ffj_t_FrameworkInfo_Checkpoint + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_FrameworkInfo_Capabilities, kn) { + currentKey = ffj_t_FrameworkInfo_Capabilities + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'f': + + if bytes.Equal(ffj_key_FrameworkInfo_FailoverTimeout, kn) { + currentKey = ffj_t_FrameworkInfo_FailoverTimeout + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'h': + + if bytes.Equal(ffj_key_FrameworkInfo_Hostname, kn) { + currentKey = ffj_t_FrameworkInfo_Hostname + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'i': + + if bytes.Equal(ffj_key_FrameworkInfo_ID, kn) { + currentKey = ffj_t_FrameworkInfo_ID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'l': + + if bytes.Equal(ffj_key_FrameworkInfo_Labels, kn) { + currentKey = ffj_t_FrameworkInfo_Labels + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'n': + + if bytes.Equal(ffj_key_FrameworkInfo_Name, kn) { + currentKey = ffj_t_FrameworkInfo_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_FrameworkInfo_Principal, kn) { + currentKey = ffj_t_FrameworkInfo_Principal + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_FrameworkInfo_Role, kn) { + currentKey = ffj_t_FrameworkInfo_Role + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_FrameworkInfo_Roles, kn) { + currentKey = ffj_t_FrameworkInfo_Roles + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'u': + + if bytes.Equal(ffj_key_FrameworkInfo_User, kn) { + currentKey = ffj_t_FrameworkInfo_User + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'w': + + if bytes.Equal(ffj_key_FrameworkInfo_WebUiURL, kn) { + currentKey = ffj_t_FrameworkInfo_WebUiURL + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_FrameworkInfo_Labels, kn) { + currentKey = ffj_t_FrameworkInfo_Labels + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_FrameworkInfo_Capabilities, kn) { + currentKey = ffj_t_FrameworkInfo_Capabilities + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_FrameworkInfo_WebUiURL, kn) { + currentKey = ffj_t_FrameworkInfo_WebUiURL + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_FrameworkInfo_Principal, kn) { + currentKey = ffj_t_FrameworkInfo_Principal + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_FrameworkInfo_Hostname, kn) { + currentKey = ffj_t_FrameworkInfo_Hostname + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_FrameworkInfo_Roles, kn) { + currentKey = ffj_t_FrameworkInfo_Roles + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_FrameworkInfo_Role, kn) { + currentKey = ffj_t_FrameworkInfo_Role + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_FrameworkInfo_Checkpoint, kn) { + currentKey = ffj_t_FrameworkInfo_Checkpoint + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_FrameworkInfo_FailoverTimeout, kn) { + currentKey = ffj_t_FrameworkInfo_FailoverTimeout + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_FrameworkInfo_ID, kn) { + currentKey = ffj_t_FrameworkInfo_ID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_FrameworkInfo_Name, kn) { + currentKey = ffj_t_FrameworkInfo_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_FrameworkInfo_User, kn) { + currentKey = ffj_t_FrameworkInfo_User + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_FrameworkInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_FrameworkInfo_User: + goto handle_User + + case ffj_t_FrameworkInfo_Name: + goto handle_Name + + case ffj_t_FrameworkInfo_ID: + goto handle_ID + + case ffj_t_FrameworkInfo_FailoverTimeout: + goto handle_FailoverTimeout + + case ffj_t_FrameworkInfo_Checkpoint: + goto handle_Checkpoint + + case ffj_t_FrameworkInfo_Role: + goto handle_Role + + case ffj_t_FrameworkInfo_Roles: + goto handle_Roles + + case ffj_t_FrameworkInfo_Hostname: + goto handle_Hostname + + case ffj_t_FrameworkInfo_Principal: + goto handle_Principal + + case ffj_t_FrameworkInfo_WebUiURL: + goto handle_WebUiURL + + case ffj_t_FrameworkInfo_Capabilities: + goto handle_Capabilities + + case ffj_t_FrameworkInfo_Labels: + goto handle_Labels + + case ffj_t_FrameworkInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_User: + + /* handler: uj.User type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.User = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Name: + + /* handler: uj.Name type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Name = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ID: + + /* handler: uj.ID type=mesos.FrameworkID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.ID = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.ID == nil { + uj.ID = new(FrameworkID) + } + + err = uj.ID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_FailoverTimeout: + + /* handler: uj.FailoverTimeout type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.FailoverTimeout = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.FailoverTimeout = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Checkpoint: + + /* handler: uj.Checkpoint type=bool kind=bool quoted=false*/ + + { + if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) + } + } + + { + if tok == fflib.FFTok_null { + + uj.Checkpoint = nil + + } else { + tmpb := fs.Output.Bytes() + + var tval bool + + if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { + + tval = true + + } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { + + tval = false + + } else { + err = errors.New("unexpected bytes for true/false value") + return fs.WrapErr(err) + } + + uj.Checkpoint = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Role: + + /* handler: uj.Role type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Role = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Role = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Roles: + + /* handler: uj.Roles type=[]string kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Roles = nil + } else { + + uj.Roles = []string{} + + wantVal := true + + for { + + var tmp_uj__Roles string + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Roles type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + tmp_uj__Roles = string(string(outBuf)) + + } + } + + uj.Roles = append(uj.Roles, tmp_uj__Roles) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Hostname: + + /* handler: uj.Hostname type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Hostname = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Hostname = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Principal: + + /* handler: uj.Principal type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Principal = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Principal = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_WebUiURL: + + /* handler: uj.WebUiURL type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.WebUiURL = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.WebUiURL = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Capabilities: + + /* handler: uj.Capabilities type=[]mesos.FrameworkInfo_Capability kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Capabilities = nil + } else { + + uj.Capabilities = []FrameworkInfo_Capability{} + + wantVal := true + + for { + + var tmp_uj__Capabilities FrameworkInfo_Capability + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Capabilities type=mesos.FrameworkInfo_Capability kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Capabilities.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Capabilities = append(uj.Capabilities, tmp_uj__Capabilities) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Labels: + + /* handler: uj.Labels type=mesos.Labels kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Labels = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Labels == nil { + uj.Labels = new(Labels) + } + + err = uj.Labels.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *FrameworkInfo_Capability) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *FrameworkInfo_Capability) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_FrameworkInfo_Capabilitybase = iota + ffj_t_FrameworkInfo_Capabilityno_such_key + + ffj_t_FrameworkInfo_Capability_Type +) + +var ffj_key_FrameworkInfo_Capability_Type = []byte("type") + +func (uj *FrameworkInfo_Capability) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *FrameworkInfo_Capability) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_FrameworkInfo_Capabilitybase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_FrameworkInfo_Capabilityno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 't': + + if bytes.Equal(ffj_key_FrameworkInfo_Capability_Type, kn) { + currentKey = ffj_t_FrameworkInfo_Capability_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_FrameworkInfo_Capability_Type, kn) { + currentKey = ffj_t_FrameworkInfo_Capability_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_FrameworkInfo_Capabilityno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_FrameworkInfo_Capability_Type: + goto handle_Type + + case ffj_t_FrameworkInfo_Capabilityno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=mesos.FrameworkInfo_Capability_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *HealthCheck) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *HealthCheck) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.DelaySeconds != nil { + if true { + buf.WriteString(`"delay_seconds":`) + fflib.AppendFloat(buf, float64(*mj.DelaySeconds), 'g', -1, 64) + buf.WriteByte(',') + } + } + if mj.IntervalSeconds != nil { + if true { + buf.WriteString(`"interval_seconds":`) + fflib.AppendFloat(buf, float64(*mj.IntervalSeconds), 'g', -1, 64) + buf.WriteByte(',') + } + } + if mj.TimeoutSeconds != nil { + if true { + buf.WriteString(`"timeout_seconds":`) + fflib.AppendFloat(buf, float64(*mj.TimeoutSeconds), 'g', -1, 64) + buf.WriteByte(',') + } + } + if mj.ConsecutiveFailures != nil { + if true { + buf.WriteString(`"consecutive_failures":`) + fflib.FormatBits2(buf, uint64(*mj.ConsecutiveFailures), 10, false) + buf.WriteByte(',') + } + } + if mj.GracePeriodSeconds != nil { + if true { + buf.WriteString(`"grace_period_seconds":`) + fflib.AppendFloat(buf, float64(*mj.GracePeriodSeconds), 'g', -1, 64) + buf.WriteByte(',') + } + } + buf.WriteString(`"type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + if mj.Command != nil { + if true { + buf.WriteString(`"command":`) + + { + + err = mj.Command.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.HTTP != nil { + if true { + buf.WriteString(`"http":`) + + { + + err = mj.HTTP.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.TCP != nil { + if true { + buf.WriteString(`"tcp":`) + + { + + err = mj.TCP.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_HealthCheckbase = iota + ffj_t_HealthCheckno_such_key + + ffj_t_HealthCheck_DelaySeconds + + ffj_t_HealthCheck_IntervalSeconds + + ffj_t_HealthCheck_TimeoutSeconds + + ffj_t_HealthCheck_ConsecutiveFailures + + ffj_t_HealthCheck_GracePeriodSeconds + + ffj_t_HealthCheck_Type + + ffj_t_HealthCheck_Command + + ffj_t_HealthCheck_HTTP + + ffj_t_HealthCheck_TCP +) + +var ffj_key_HealthCheck_DelaySeconds = []byte("delay_seconds") + +var ffj_key_HealthCheck_IntervalSeconds = []byte("interval_seconds") + +var ffj_key_HealthCheck_TimeoutSeconds = []byte("timeout_seconds") + +var ffj_key_HealthCheck_ConsecutiveFailures = []byte("consecutive_failures") + +var ffj_key_HealthCheck_GracePeriodSeconds = []byte("grace_period_seconds") + +var ffj_key_HealthCheck_Type = []byte("type") + +var ffj_key_HealthCheck_Command = []byte("command") + +var ffj_key_HealthCheck_HTTP = []byte("http") + +var ffj_key_HealthCheck_TCP = []byte("tcp") + +func (uj *HealthCheck) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *HealthCheck) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_HealthCheckbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_HealthCheckno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_HealthCheck_ConsecutiveFailures, kn) { + currentKey = ffj_t_HealthCheck_ConsecutiveFailures + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_HealthCheck_Command, kn) { + currentKey = ffj_t_HealthCheck_Command + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'd': + + if bytes.Equal(ffj_key_HealthCheck_DelaySeconds, kn) { + currentKey = ffj_t_HealthCheck_DelaySeconds + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'g': + + if bytes.Equal(ffj_key_HealthCheck_GracePeriodSeconds, kn) { + currentKey = ffj_t_HealthCheck_GracePeriodSeconds + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'h': + + if bytes.Equal(ffj_key_HealthCheck_HTTP, kn) { + currentKey = ffj_t_HealthCheck_HTTP + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'i': + + if bytes.Equal(ffj_key_HealthCheck_IntervalSeconds, kn) { + currentKey = ffj_t_HealthCheck_IntervalSeconds + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_HealthCheck_TimeoutSeconds, kn) { + currentKey = ffj_t_HealthCheck_TimeoutSeconds + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_HealthCheck_Type, kn) { + currentKey = ffj_t_HealthCheck_Type + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_HealthCheck_TCP, kn) { + currentKey = ffj_t_HealthCheck_TCP + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_HealthCheck_TCP, kn) { + currentKey = ffj_t_HealthCheck_TCP + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_HealthCheck_HTTP, kn) { + currentKey = ffj_t_HealthCheck_HTTP + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_HealthCheck_Command, kn) { + currentKey = ffj_t_HealthCheck_Command + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_HealthCheck_Type, kn) { + currentKey = ffj_t_HealthCheck_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_HealthCheck_GracePeriodSeconds, kn) { + currentKey = ffj_t_HealthCheck_GracePeriodSeconds + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_HealthCheck_ConsecutiveFailures, kn) { + currentKey = ffj_t_HealthCheck_ConsecutiveFailures + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_HealthCheck_TimeoutSeconds, kn) { + currentKey = ffj_t_HealthCheck_TimeoutSeconds + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_HealthCheck_IntervalSeconds, kn) { + currentKey = ffj_t_HealthCheck_IntervalSeconds + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_HealthCheck_DelaySeconds, kn) { + currentKey = ffj_t_HealthCheck_DelaySeconds + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_HealthCheckno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_HealthCheck_DelaySeconds: + goto handle_DelaySeconds + + case ffj_t_HealthCheck_IntervalSeconds: + goto handle_IntervalSeconds + + case ffj_t_HealthCheck_TimeoutSeconds: + goto handle_TimeoutSeconds + + case ffj_t_HealthCheck_ConsecutiveFailures: + goto handle_ConsecutiveFailures + + case ffj_t_HealthCheck_GracePeriodSeconds: + goto handle_GracePeriodSeconds + + case ffj_t_HealthCheck_Type: + goto handle_Type + + case ffj_t_HealthCheck_Command: + goto handle_Command + + case ffj_t_HealthCheck_HTTP: + goto handle_HTTP + + case ffj_t_HealthCheck_TCP: + goto handle_TCP + + case ffj_t_HealthCheckno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_DelaySeconds: + + /* handler: uj.DelaySeconds type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.DelaySeconds = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.DelaySeconds = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_IntervalSeconds: + + /* handler: uj.IntervalSeconds type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.IntervalSeconds = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.IntervalSeconds = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_TimeoutSeconds: + + /* handler: uj.TimeoutSeconds type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.TimeoutSeconds = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.TimeoutSeconds = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ConsecutiveFailures: + + /* handler: uj.ConsecutiveFailures type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.ConsecutiveFailures = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint32(tval) + uj.ConsecutiveFailures = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_GracePeriodSeconds: + + /* handler: uj.GracePeriodSeconds type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.GracePeriodSeconds = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.GracePeriodSeconds = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Type: + + /* handler: uj.Type type=mesos.HealthCheck_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Command: + + /* handler: uj.Command type=mesos.CommandInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Command = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Command == nil { + uj.Command = new(CommandInfo) + } + + err = uj.Command.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_HTTP: + + /* handler: uj.HTTP type=mesos.HealthCheck_HTTPCheckInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.HTTP = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.HTTP == nil { + uj.HTTP = new(HealthCheck_HTTPCheckInfo) + } + + err = uj.HTTP.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_TCP: + + /* handler: uj.TCP type=mesos.HealthCheck_TCPCheckInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.TCP = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.TCP == nil { + uj.TCP = new(HealthCheck_TCPCheckInfo) + } + + err = uj.TCP.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *HealthCheck_HTTPCheckInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *HealthCheck_HTTPCheckInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Protocol != nil { + if true { + buf.WriteString(`"protocol":`) + + { + + obj, err = mj.Protocol.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + if mj.Scheme != nil { + if true { + buf.WriteString(`"scheme":`) + fflib.WriteJsonString(buf, string(*mj.Scheme)) + buf.WriteByte(',') + } + } + buf.WriteString(`"port":`) + fflib.FormatBits2(buf, uint64(mj.Port), 10, false) + buf.WriteByte(',') + if mj.Path != nil { + if true { + buf.WriteString(`"path":`) + fflib.WriteJsonString(buf, string(*mj.Path)) + buf.WriteByte(',') + } + } + if len(mj.Statuses) != 0 { + buf.WriteString(`"statuses":`) + if mj.Statuses != nil { + buf.WriteString(`[`) + for i, v := range mj.Statuses { + if i != 0 { + buf.WriteString(`,`) + } + fflib.FormatBits2(buf, uint64(v), 10, false) + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_HealthCheck_HTTPCheckInfobase = iota + ffj_t_HealthCheck_HTTPCheckInfono_such_key + + ffj_t_HealthCheck_HTTPCheckInfo_Protocol + + ffj_t_HealthCheck_HTTPCheckInfo_Scheme + + ffj_t_HealthCheck_HTTPCheckInfo_Port + + ffj_t_HealthCheck_HTTPCheckInfo_Path + + ffj_t_HealthCheck_HTTPCheckInfo_Statuses +) + +var ffj_key_HealthCheck_HTTPCheckInfo_Protocol = []byte("protocol") + +var ffj_key_HealthCheck_HTTPCheckInfo_Scheme = []byte("scheme") + +var ffj_key_HealthCheck_HTTPCheckInfo_Port = []byte("port") + +var ffj_key_HealthCheck_HTTPCheckInfo_Path = []byte("path") + +var ffj_key_HealthCheck_HTTPCheckInfo_Statuses = []byte("statuses") + +func (uj *HealthCheck_HTTPCheckInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *HealthCheck_HTTPCheckInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_HealthCheck_HTTPCheckInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_HealthCheck_HTTPCheckInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'p': + + if bytes.Equal(ffj_key_HealthCheck_HTTPCheckInfo_Protocol, kn) { + currentKey = ffj_t_HealthCheck_HTTPCheckInfo_Protocol + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_HealthCheck_HTTPCheckInfo_Port, kn) { + currentKey = ffj_t_HealthCheck_HTTPCheckInfo_Port + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_HealthCheck_HTTPCheckInfo_Path, kn) { + currentKey = ffj_t_HealthCheck_HTTPCheckInfo_Path + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_HealthCheck_HTTPCheckInfo_Scheme, kn) { + currentKey = ffj_t_HealthCheck_HTTPCheckInfo_Scheme + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_HealthCheck_HTTPCheckInfo_Statuses, kn) { + currentKey = ffj_t_HealthCheck_HTTPCheckInfo_Statuses + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_HealthCheck_HTTPCheckInfo_Statuses, kn) { + currentKey = ffj_t_HealthCheck_HTTPCheckInfo_Statuses + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_HealthCheck_HTTPCheckInfo_Path, kn) { + currentKey = ffj_t_HealthCheck_HTTPCheckInfo_Path + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_HealthCheck_HTTPCheckInfo_Port, kn) { + currentKey = ffj_t_HealthCheck_HTTPCheckInfo_Port + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_HealthCheck_HTTPCheckInfo_Scheme, kn) { + currentKey = ffj_t_HealthCheck_HTTPCheckInfo_Scheme + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_HealthCheck_HTTPCheckInfo_Protocol, kn) { + currentKey = ffj_t_HealthCheck_HTTPCheckInfo_Protocol + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_HealthCheck_HTTPCheckInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_HealthCheck_HTTPCheckInfo_Protocol: + goto handle_Protocol + + case ffj_t_HealthCheck_HTTPCheckInfo_Scheme: + goto handle_Scheme + + case ffj_t_HealthCheck_HTTPCheckInfo_Port: + goto handle_Port + + case ffj_t_HealthCheck_HTTPCheckInfo_Path: + goto handle_Path + + case ffj_t_HealthCheck_HTTPCheckInfo_Statuses: + goto handle_Statuses + + case ffj_t_HealthCheck_HTTPCheckInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Protocol: + + /* handler: uj.Protocol type=mesos.NetworkInfo_Protocol kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Protocol = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.Protocol == nil { + uj.Protocol = new(NetworkInfo_Protocol) + } + + err = uj.Protocol.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Scheme: + + /* handler: uj.Scheme type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Scheme = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Scheme = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Port: + + /* handler: uj.Port type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + uj.Port = uint32(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Path: + + /* handler: uj.Path type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Path = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Path = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Statuses: + + /* handler: uj.Statuses type=[]uint32 kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Statuses = nil + } else { + + uj.Statuses = []uint32{} + + wantVal := true + + for { + + var tmp_uj__Statuses uint32 + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Statuses type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + tmp_uj__Statuses = uint32(tval) + + } + } + + uj.Statuses = append(uj.Statuses, tmp_uj__Statuses) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *HealthCheck_TCPCheckInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *HealthCheck_TCPCheckInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteByte('{') + if mj.Protocol != nil { + if true { + buf.WriteString(`"protocol":`) + + { + + obj, err = mj.Protocol.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"port":`) + fflib.FormatBits2(buf, uint64(mj.Port), 10, false) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_HealthCheck_TCPCheckInfobase = iota + ffj_t_HealthCheck_TCPCheckInfono_such_key + + ffj_t_HealthCheck_TCPCheckInfo_Protocol + + ffj_t_HealthCheck_TCPCheckInfo_Port +) + +var ffj_key_HealthCheck_TCPCheckInfo_Protocol = []byte("protocol") + +var ffj_key_HealthCheck_TCPCheckInfo_Port = []byte("port") + +func (uj *HealthCheck_TCPCheckInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *HealthCheck_TCPCheckInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_HealthCheck_TCPCheckInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_HealthCheck_TCPCheckInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'p': + + if bytes.Equal(ffj_key_HealthCheck_TCPCheckInfo_Protocol, kn) { + currentKey = ffj_t_HealthCheck_TCPCheckInfo_Protocol + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_HealthCheck_TCPCheckInfo_Port, kn) { + currentKey = ffj_t_HealthCheck_TCPCheckInfo_Port + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_HealthCheck_TCPCheckInfo_Port, kn) { + currentKey = ffj_t_HealthCheck_TCPCheckInfo_Port + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_HealthCheck_TCPCheckInfo_Protocol, kn) { + currentKey = ffj_t_HealthCheck_TCPCheckInfo_Protocol + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_HealthCheck_TCPCheckInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_HealthCheck_TCPCheckInfo_Protocol: + goto handle_Protocol + + case ffj_t_HealthCheck_TCPCheckInfo_Port: + goto handle_Port + + case ffj_t_HealthCheck_TCPCheckInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Protocol: + + /* handler: uj.Protocol type=mesos.NetworkInfo_Protocol kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Protocol = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.Protocol == nil { + uj.Protocol = new(NetworkInfo_Protocol) + } + + err = uj.Protocol.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Port: + + /* handler: uj.Port type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + uj.Port = uint32(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *IcmpStatistics) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *IcmpStatistics) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.InMsgs != nil { + if true { + buf.WriteString(`"InMsgs":`) + fflib.FormatBits2(buf, uint64(*mj.InMsgs), 10, *mj.InMsgs < 0) + buf.WriteByte(',') + } + } + if mj.InErrors != nil { + if true { + buf.WriteString(`"InErrors":`) + fflib.FormatBits2(buf, uint64(*mj.InErrors), 10, *mj.InErrors < 0) + buf.WriteByte(',') + } + } + if mj.InCsumErrors != nil { + if true { + buf.WriteString(`"InCsumErrors":`) + fflib.FormatBits2(buf, uint64(*mj.InCsumErrors), 10, *mj.InCsumErrors < 0) + buf.WriteByte(',') + } + } + if mj.InDestUnreachs != nil { + if true { + buf.WriteString(`"InDestUnreachs":`) + fflib.FormatBits2(buf, uint64(*mj.InDestUnreachs), 10, *mj.InDestUnreachs < 0) + buf.WriteByte(',') + } + } + if mj.InTimeExcds != nil { + if true { + buf.WriteString(`"InTimeExcds":`) + fflib.FormatBits2(buf, uint64(*mj.InTimeExcds), 10, *mj.InTimeExcds < 0) + buf.WriteByte(',') + } + } + if mj.InParmProbs != nil { + if true { + buf.WriteString(`"InParmProbs":`) + fflib.FormatBits2(buf, uint64(*mj.InParmProbs), 10, *mj.InParmProbs < 0) + buf.WriteByte(',') + } + } + if mj.InSrcQuenchs != nil { + if true { + buf.WriteString(`"InSrcQuenchs":`) + fflib.FormatBits2(buf, uint64(*mj.InSrcQuenchs), 10, *mj.InSrcQuenchs < 0) + buf.WriteByte(',') + } + } + if mj.InRedirects != nil { + if true { + buf.WriteString(`"InRedirects":`) + fflib.FormatBits2(buf, uint64(*mj.InRedirects), 10, *mj.InRedirects < 0) + buf.WriteByte(',') + } + } + if mj.InEchos != nil { + if true { + buf.WriteString(`"InEchos":`) + fflib.FormatBits2(buf, uint64(*mj.InEchos), 10, *mj.InEchos < 0) + buf.WriteByte(',') + } + } + if mj.InEchoReps != nil { + if true { + buf.WriteString(`"InEchoReps":`) + fflib.FormatBits2(buf, uint64(*mj.InEchoReps), 10, *mj.InEchoReps < 0) + buf.WriteByte(',') + } + } + if mj.InTimestamps != nil { + if true { + buf.WriteString(`"InTimestamps":`) + fflib.FormatBits2(buf, uint64(*mj.InTimestamps), 10, *mj.InTimestamps < 0) + buf.WriteByte(',') + } + } + if mj.InTimestampReps != nil { + if true { + buf.WriteString(`"InTimestampReps":`) + fflib.FormatBits2(buf, uint64(*mj.InTimestampReps), 10, *mj.InTimestampReps < 0) + buf.WriteByte(',') + } + } + if mj.InAddrMasks != nil { + if true { + buf.WriteString(`"InAddrMasks":`) + fflib.FormatBits2(buf, uint64(*mj.InAddrMasks), 10, *mj.InAddrMasks < 0) + buf.WriteByte(',') + } + } + if mj.InAddrMaskReps != nil { + if true { + buf.WriteString(`"InAddrMaskReps":`) + fflib.FormatBits2(buf, uint64(*mj.InAddrMaskReps), 10, *mj.InAddrMaskReps < 0) + buf.WriteByte(',') + } + } + if mj.OutMsgs != nil { + if true { + buf.WriteString(`"OutMsgs":`) + fflib.FormatBits2(buf, uint64(*mj.OutMsgs), 10, *mj.OutMsgs < 0) + buf.WriteByte(',') + } + } + if mj.OutErrors != nil { + if true { + buf.WriteString(`"OutErrors":`) + fflib.FormatBits2(buf, uint64(*mj.OutErrors), 10, *mj.OutErrors < 0) + buf.WriteByte(',') + } + } + if mj.OutDestUnreachs != nil { + if true { + buf.WriteString(`"OutDestUnreachs":`) + fflib.FormatBits2(buf, uint64(*mj.OutDestUnreachs), 10, *mj.OutDestUnreachs < 0) + buf.WriteByte(',') + } + } + if mj.OutTimeExcds != nil { + if true { + buf.WriteString(`"OutTimeExcds":`) + fflib.FormatBits2(buf, uint64(*mj.OutTimeExcds), 10, *mj.OutTimeExcds < 0) + buf.WriteByte(',') + } + } + if mj.OutParmProbs != nil { + if true { + buf.WriteString(`"OutParmProbs":`) + fflib.FormatBits2(buf, uint64(*mj.OutParmProbs), 10, *mj.OutParmProbs < 0) + buf.WriteByte(',') + } + } + if mj.OutSrcQuenchs != nil { + if true { + buf.WriteString(`"OutSrcQuenchs":`) + fflib.FormatBits2(buf, uint64(*mj.OutSrcQuenchs), 10, *mj.OutSrcQuenchs < 0) + buf.WriteByte(',') + } + } + if mj.OutRedirects != nil { + if true { + buf.WriteString(`"OutRedirects":`) + fflib.FormatBits2(buf, uint64(*mj.OutRedirects), 10, *mj.OutRedirects < 0) + buf.WriteByte(',') + } + } + if mj.OutEchos != nil { + if true { + buf.WriteString(`"OutEchos":`) + fflib.FormatBits2(buf, uint64(*mj.OutEchos), 10, *mj.OutEchos < 0) + buf.WriteByte(',') + } + } + if mj.OutEchoReps != nil { + if true { + buf.WriteString(`"OutEchoReps":`) + fflib.FormatBits2(buf, uint64(*mj.OutEchoReps), 10, *mj.OutEchoReps < 0) + buf.WriteByte(',') + } + } + if mj.OutTimestamps != nil { + if true { + buf.WriteString(`"OutTimestamps":`) + fflib.FormatBits2(buf, uint64(*mj.OutTimestamps), 10, *mj.OutTimestamps < 0) + buf.WriteByte(',') + } + } + if mj.OutTimestampReps != nil { + if true { + buf.WriteString(`"OutTimestampReps":`) + fflib.FormatBits2(buf, uint64(*mj.OutTimestampReps), 10, *mj.OutTimestampReps < 0) + buf.WriteByte(',') + } + } + if mj.OutAddrMasks != nil { + if true { + buf.WriteString(`"OutAddrMasks":`) + fflib.FormatBits2(buf, uint64(*mj.OutAddrMasks), 10, *mj.OutAddrMasks < 0) + buf.WriteByte(',') + } + } + if mj.OutAddrMaskReps != nil { + if true { + buf.WriteString(`"OutAddrMaskReps":`) + fflib.FormatBits2(buf, uint64(*mj.OutAddrMaskReps), 10, *mj.OutAddrMaskReps < 0) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_IcmpStatisticsbase = iota + ffj_t_IcmpStatisticsno_such_key + + ffj_t_IcmpStatistics_InMsgs + + ffj_t_IcmpStatistics_InErrors + + ffj_t_IcmpStatistics_InCsumErrors + + ffj_t_IcmpStatistics_InDestUnreachs + + ffj_t_IcmpStatistics_InTimeExcds + + ffj_t_IcmpStatistics_InParmProbs + + ffj_t_IcmpStatistics_InSrcQuenchs + + ffj_t_IcmpStatistics_InRedirects + + ffj_t_IcmpStatistics_InEchos + + ffj_t_IcmpStatistics_InEchoReps + + ffj_t_IcmpStatistics_InTimestamps + + ffj_t_IcmpStatistics_InTimestampReps + + ffj_t_IcmpStatistics_InAddrMasks + + ffj_t_IcmpStatistics_InAddrMaskReps + + ffj_t_IcmpStatistics_OutMsgs + + ffj_t_IcmpStatistics_OutErrors + + ffj_t_IcmpStatistics_OutDestUnreachs + + ffj_t_IcmpStatistics_OutTimeExcds + + ffj_t_IcmpStatistics_OutParmProbs + + ffj_t_IcmpStatistics_OutSrcQuenchs + + ffj_t_IcmpStatistics_OutRedirects + + ffj_t_IcmpStatistics_OutEchos + + ffj_t_IcmpStatistics_OutEchoReps + + ffj_t_IcmpStatistics_OutTimestamps + + ffj_t_IcmpStatistics_OutTimestampReps + + ffj_t_IcmpStatistics_OutAddrMasks + + ffj_t_IcmpStatistics_OutAddrMaskReps +) + +var ffj_key_IcmpStatistics_InMsgs = []byte("InMsgs") + +var ffj_key_IcmpStatistics_InErrors = []byte("InErrors") + +var ffj_key_IcmpStatistics_InCsumErrors = []byte("InCsumErrors") + +var ffj_key_IcmpStatistics_InDestUnreachs = []byte("InDestUnreachs") + +var ffj_key_IcmpStatistics_InTimeExcds = []byte("InTimeExcds") + +var ffj_key_IcmpStatistics_InParmProbs = []byte("InParmProbs") + +var ffj_key_IcmpStatistics_InSrcQuenchs = []byte("InSrcQuenchs") + +var ffj_key_IcmpStatistics_InRedirects = []byte("InRedirects") + +var ffj_key_IcmpStatistics_InEchos = []byte("InEchos") + +var ffj_key_IcmpStatistics_InEchoReps = []byte("InEchoReps") + +var ffj_key_IcmpStatistics_InTimestamps = []byte("InTimestamps") + +var ffj_key_IcmpStatistics_InTimestampReps = []byte("InTimestampReps") + +var ffj_key_IcmpStatistics_InAddrMasks = []byte("InAddrMasks") + +var ffj_key_IcmpStatistics_InAddrMaskReps = []byte("InAddrMaskReps") + +var ffj_key_IcmpStatistics_OutMsgs = []byte("OutMsgs") + +var ffj_key_IcmpStatistics_OutErrors = []byte("OutErrors") + +var ffj_key_IcmpStatistics_OutDestUnreachs = []byte("OutDestUnreachs") + +var ffj_key_IcmpStatistics_OutTimeExcds = []byte("OutTimeExcds") + +var ffj_key_IcmpStatistics_OutParmProbs = []byte("OutParmProbs") + +var ffj_key_IcmpStatistics_OutSrcQuenchs = []byte("OutSrcQuenchs") + +var ffj_key_IcmpStatistics_OutRedirects = []byte("OutRedirects") + +var ffj_key_IcmpStatistics_OutEchos = []byte("OutEchos") + +var ffj_key_IcmpStatistics_OutEchoReps = []byte("OutEchoReps") + +var ffj_key_IcmpStatistics_OutTimestamps = []byte("OutTimestamps") + +var ffj_key_IcmpStatistics_OutTimestampReps = []byte("OutTimestampReps") + +var ffj_key_IcmpStatistics_OutAddrMasks = []byte("OutAddrMasks") + +var ffj_key_IcmpStatistics_OutAddrMaskReps = []byte("OutAddrMaskReps") + +func (uj *IcmpStatistics) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *IcmpStatistics) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_IcmpStatisticsbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_IcmpStatisticsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'I': + + if bytes.Equal(ffj_key_IcmpStatistics_InMsgs, kn) { + currentKey = ffj_t_IcmpStatistics_InMsgs + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_InErrors, kn) { + currentKey = ffj_t_IcmpStatistics_InErrors + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_InCsumErrors, kn) { + currentKey = ffj_t_IcmpStatistics_InCsumErrors + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_InDestUnreachs, kn) { + currentKey = ffj_t_IcmpStatistics_InDestUnreachs + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_InTimeExcds, kn) { + currentKey = ffj_t_IcmpStatistics_InTimeExcds + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_InParmProbs, kn) { + currentKey = ffj_t_IcmpStatistics_InParmProbs + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_InSrcQuenchs, kn) { + currentKey = ffj_t_IcmpStatistics_InSrcQuenchs + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_InRedirects, kn) { + currentKey = ffj_t_IcmpStatistics_InRedirects + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_InEchos, kn) { + currentKey = ffj_t_IcmpStatistics_InEchos + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_InEchoReps, kn) { + currentKey = ffj_t_IcmpStatistics_InEchoReps + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_InTimestamps, kn) { + currentKey = ffj_t_IcmpStatistics_InTimestamps + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_InTimestampReps, kn) { + currentKey = ffj_t_IcmpStatistics_InTimestampReps + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_InAddrMasks, kn) { + currentKey = ffj_t_IcmpStatistics_InAddrMasks + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_InAddrMaskReps, kn) { + currentKey = ffj_t_IcmpStatistics_InAddrMaskReps + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'O': + + if bytes.Equal(ffj_key_IcmpStatistics_OutMsgs, kn) { + currentKey = ffj_t_IcmpStatistics_OutMsgs + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_OutErrors, kn) { + currentKey = ffj_t_IcmpStatistics_OutErrors + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_OutDestUnreachs, kn) { + currentKey = ffj_t_IcmpStatistics_OutDestUnreachs + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_OutTimeExcds, kn) { + currentKey = ffj_t_IcmpStatistics_OutTimeExcds + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_OutParmProbs, kn) { + currentKey = ffj_t_IcmpStatistics_OutParmProbs + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_OutSrcQuenchs, kn) { + currentKey = ffj_t_IcmpStatistics_OutSrcQuenchs + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_OutRedirects, kn) { + currentKey = ffj_t_IcmpStatistics_OutRedirects + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_OutEchos, kn) { + currentKey = ffj_t_IcmpStatistics_OutEchos + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_OutEchoReps, kn) { + currentKey = ffj_t_IcmpStatistics_OutEchoReps + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_OutTimestamps, kn) { + currentKey = ffj_t_IcmpStatistics_OutTimestamps + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_OutTimestampReps, kn) { + currentKey = ffj_t_IcmpStatistics_OutTimestampReps + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_OutAddrMasks, kn) { + currentKey = ffj_t_IcmpStatistics_OutAddrMasks + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IcmpStatistics_OutAddrMaskReps, kn) { + currentKey = ffj_t_IcmpStatistics_OutAddrMaskReps + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_OutAddrMaskReps, kn) { + currentKey = ffj_t_IcmpStatistics_OutAddrMaskReps + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_OutAddrMasks, kn) { + currentKey = ffj_t_IcmpStatistics_OutAddrMasks + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_OutTimestampReps, kn) { + currentKey = ffj_t_IcmpStatistics_OutTimestampReps + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_OutTimestamps, kn) { + currentKey = ffj_t_IcmpStatistics_OutTimestamps + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_OutEchoReps, kn) { + currentKey = ffj_t_IcmpStatistics_OutEchoReps + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_OutEchos, kn) { + currentKey = ffj_t_IcmpStatistics_OutEchos + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_OutRedirects, kn) { + currentKey = ffj_t_IcmpStatistics_OutRedirects + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_OutSrcQuenchs, kn) { + currentKey = ffj_t_IcmpStatistics_OutSrcQuenchs + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_OutParmProbs, kn) { + currentKey = ffj_t_IcmpStatistics_OutParmProbs + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_OutTimeExcds, kn) { + currentKey = ffj_t_IcmpStatistics_OutTimeExcds + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_OutDestUnreachs, kn) { + currentKey = ffj_t_IcmpStatistics_OutDestUnreachs + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_OutErrors, kn) { + currentKey = ffj_t_IcmpStatistics_OutErrors + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_OutMsgs, kn) { + currentKey = ffj_t_IcmpStatistics_OutMsgs + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_InAddrMaskReps, kn) { + currentKey = ffj_t_IcmpStatistics_InAddrMaskReps + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_InAddrMasks, kn) { + currentKey = ffj_t_IcmpStatistics_InAddrMasks + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_InTimestampReps, kn) { + currentKey = ffj_t_IcmpStatistics_InTimestampReps + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_InTimestamps, kn) { + currentKey = ffj_t_IcmpStatistics_InTimestamps + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_InEchoReps, kn) { + currentKey = ffj_t_IcmpStatistics_InEchoReps + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_InEchos, kn) { + currentKey = ffj_t_IcmpStatistics_InEchos + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_InRedirects, kn) { + currentKey = ffj_t_IcmpStatistics_InRedirects + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_InSrcQuenchs, kn) { + currentKey = ffj_t_IcmpStatistics_InSrcQuenchs + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_InParmProbs, kn) { + currentKey = ffj_t_IcmpStatistics_InParmProbs + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_InTimeExcds, kn) { + currentKey = ffj_t_IcmpStatistics_InTimeExcds + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_InDestUnreachs, kn) { + currentKey = ffj_t_IcmpStatistics_InDestUnreachs + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_InCsumErrors, kn) { + currentKey = ffj_t_IcmpStatistics_InCsumErrors + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_InErrors, kn) { + currentKey = ffj_t_IcmpStatistics_InErrors + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IcmpStatistics_InMsgs, kn) { + currentKey = ffj_t_IcmpStatistics_InMsgs + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_IcmpStatisticsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_IcmpStatistics_InMsgs: + goto handle_InMsgs + + case ffj_t_IcmpStatistics_InErrors: + goto handle_InErrors + + case ffj_t_IcmpStatistics_InCsumErrors: + goto handle_InCsumErrors + + case ffj_t_IcmpStatistics_InDestUnreachs: + goto handle_InDestUnreachs + + case ffj_t_IcmpStatistics_InTimeExcds: + goto handle_InTimeExcds + + case ffj_t_IcmpStatistics_InParmProbs: + goto handle_InParmProbs + + case ffj_t_IcmpStatistics_InSrcQuenchs: + goto handle_InSrcQuenchs + + case ffj_t_IcmpStatistics_InRedirects: + goto handle_InRedirects + + case ffj_t_IcmpStatistics_InEchos: + goto handle_InEchos + + case ffj_t_IcmpStatistics_InEchoReps: + goto handle_InEchoReps + + case ffj_t_IcmpStatistics_InTimestamps: + goto handle_InTimestamps + + case ffj_t_IcmpStatistics_InTimestampReps: + goto handle_InTimestampReps + + case ffj_t_IcmpStatistics_InAddrMasks: + goto handle_InAddrMasks + + case ffj_t_IcmpStatistics_InAddrMaskReps: + goto handle_InAddrMaskReps + + case ffj_t_IcmpStatistics_OutMsgs: + goto handle_OutMsgs + + case ffj_t_IcmpStatistics_OutErrors: + goto handle_OutErrors + + case ffj_t_IcmpStatistics_OutDestUnreachs: + goto handle_OutDestUnreachs + + case ffj_t_IcmpStatistics_OutTimeExcds: + goto handle_OutTimeExcds + + case ffj_t_IcmpStatistics_OutParmProbs: + goto handle_OutParmProbs + + case ffj_t_IcmpStatistics_OutSrcQuenchs: + goto handle_OutSrcQuenchs + + case ffj_t_IcmpStatistics_OutRedirects: + goto handle_OutRedirects + + case ffj_t_IcmpStatistics_OutEchos: + goto handle_OutEchos + + case ffj_t_IcmpStatistics_OutEchoReps: + goto handle_OutEchoReps + + case ffj_t_IcmpStatistics_OutTimestamps: + goto handle_OutTimestamps + + case ffj_t_IcmpStatistics_OutTimestampReps: + goto handle_OutTimestampReps + + case ffj_t_IcmpStatistics_OutAddrMasks: + goto handle_OutAddrMasks + + case ffj_t_IcmpStatistics_OutAddrMaskReps: + goto handle_OutAddrMaskReps + + case ffj_t_IcmpStatisticsno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_InMsgs: + + /* handler: uj.InMsgs type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InMsgs = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InMsgs = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_InErrors: + + /* handler: uj.InErrors type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InErrors = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InErrors = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_InCsumErrors: + + /* handler: uj.InCsumErrors type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InCsumErrors = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InCsumErrors = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_InDestUnreachs: + + /* handler: uj.InDestUnreachs type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InDestUnreachs = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InDestUnreachs = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_InTimeExcds: + + /* handler: uj.InTimeExcds type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InTimeExcds = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InTimeExcds = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_InParmProbs: + + /* handler: uj.InParmProbs type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InParmProbs = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InParmProbs = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_InSrcQuenchs: + + /* handler: uj.InSrcQuenchs type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InSrcQuenchs = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InSrcQuenchs = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_InRedirects: + + /* handler: uj.InRedirects type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InRedirects = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InRedirects = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_InEchos: + + /* handler: uj.InEchos type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InEchos = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InEchos = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_InEchoReps: + + /* handler: uj.InEchoReps type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InEchoReps = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InEchoReps = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_InTimestamps: + + /* handler: uj.InTimestamps type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InTimestamps = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InTimestamps = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_InTimestampReps: + + /* handler: uj.InTimestampReps type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InTimestampReps = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InTimestampReps = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_InAddrMasks: + + /* handler: uj.InAddrMasks type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InAddrMasks = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InAddrMasks = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_InAddrMaskReps: + + /* handler: uj.InAddrMaskReps type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InAddrMaskReps = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InAddrMaskReps = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_OutMsgs: + + /* handler: uj.OutMsgs type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.OutMsgs = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.OutMsgs = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_OutErrors: + + /* handler: uj.OutErrors type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.OutErrors = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.OutErrors = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_OutDestUnreachs: + + /* handler: uj.OutDestUnreachs type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.OutDestUnreachs = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.OutDestUnreachs = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_OutTimeExcds: + + /* handler: uj.OutTimeExcds type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.OutTimeExcds = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.OutTimeExcds = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_OutParmProbs: + + /* handler: uj.OutParmProbs type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.OutParmProbs = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.OutParmProbs = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_OutSrcQuenchs: + + /* handler: uj.OutSrcQuenchs type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.OutSrcQuenchs = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.OutSrcQuenchs = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_OutRedirects: + + /* handler: uj.OutRedirects type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.OutRedirects = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.OutRedirects = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_OutEchos: + + /* handler: uj.OutEchos type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.OutEchos = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.OutEchos = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_OutEchoReps: + + /* handler: uj.OutEchoReps type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.OutEchoReps = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.OutEchoReps = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_OutTimestamps: + + /* handler: uj.OutTimestamps type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.OutTimestamps = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.OutTimestamps = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_OutTimestampReps: + + /* handler: uj.OutTimestampReps type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.OutTimestampReps = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.OutTimestampReps = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_OutAddrMasks: + + /* handler: uj.OutAddrMasks type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.OutAddrMasks = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.OutAddrMasks = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_OutAddrMaskReps: + + /* handler: uj.OutAddrMaskReps type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.OutAddrMaskReps = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.OutAddrMaskReps = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Image) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Image) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Type != nil { + if true { + buf.WriteString(`"type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + if mj.Appc != nil { + if true { + buf.WriteString(`"appc":`) + + { + + err = mj.Appc.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Docker != nil { + if true { + buf.WriteString(`"docker":`) + + { + + err = mj.Docker.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Cached != nil { + if true { + if *mj.Cached { + buf.WriteString(`"cached":true`) + } else { + buf.WriteString(`"cached":false`) + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Imagebase = iota + ffj_t_Imageno_such_key + + ffj_t_Image_Type + + ffj_t_Image_Appc + + ffj_t_Image_Docker + + ffj_t_Image_Cached +) + +var ffj_key_Image_Type = []byte("type") + +var ffj_key_Image_Appc = []byte("appc") + +var ffj_key_Image_Docker = []byte("docker") + +var ffj_key_Image_Cached = []byte("cached") + +func (uj *Image) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Image) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Imagebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Imageno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'a': + + if bytes.Equal(ffj_key_Image_Appc, kn) { + currentKey = ffj_t_Image_Appc + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'c': + + if bytes.Equal(ffj_key_Image_Cached, kn) { + currentKey = ffj_t_Image_Cached + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'd': + + if bytes.Equal(ffj_key_Image_Docker, kn) { + currentKey = ffj_t_Image_Docker + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_Image_Type, kn) { + currentKey = ffj_t_Image_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Image_Cached, kn) { + currentKey = ffj_t_Image_Cached + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Image_Docker, kn) { + currentKey = ffj_t_Image_Docker + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Image_Appc, kn) { + currentKey = ffj_t_Image_Appc + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Image_Type, kn) { + currentKey = ffj_t_Image_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Imageno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Image_Type: + goto handle_Type + + case ffj_t_Image_Appc: + goto handle_Appc + + case ffj_t_Image_Docker: + goto handle_Docker + + case ffj_t_Image_Cached: + goto handle_Cached + + case ffj_t_Imageno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=mesos.Image_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Type = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.Type == nil { + uj.Type = new(Image_Type) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Appc: + + /* handler: uj.Appc type=mesos.Image_Appc kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Appc = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Appc == nil { + uj.Appc = new(Image_Appc) + } + + err = uj.Appc.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Docker: + + /* handler: uj.Docker type=mesos.Image_Docker kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Docker = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Docker == nil { + uj.Docker = new(Image_Docker) + } + + err = uj.Docker.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Cached: + + /* handler: uj.Cached type=bool kind=bool quoted=false*/ + + { + if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) + } + } + + { + if tok == fflib.FFTok_null { + + uj.Cached = nil + + } else { + tmpb := fs.Output.Bytes() + + var tval bool + + if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { + + tval = true + + } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { + + tval = false + + } else { + err = errors.New("unexpected bytes for true/false value") + return fs.WrapErr(err) + } + + uj.Cached = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Image_Appc) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Image_Appc) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "name":`) + fflib.WriteJsonString(buf, string(mj.Name)) + buf.WriteByte(',') + if mj.ID != nil { + if true { + buf.WriteString(`"id":`) + fflib.WriteJsonString(buf, string(*mj.ID)) + buf.WriteByte(',') + } + } + if mj.Labels != nil { + if true { + buf.WriteString(`"labels":`) + + { + + err = mj.Labels.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Image_Appcbase = iota + ffj_t_Image_Appcno_such_key + + ffj_t_Image_Appc_Name + + ffj_t_Image_Appc_ID + + ffj_t_Image_Appc_Labels +) + +var ffj_key_Image_Appc_Name = []byte("name") + +var ffj_key_Image_Appc_ID = []byte("id") + +var ffj_key_Image_Appc_Labels = []byte("labels") + +func (uj *Image_Appc) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Image_Appc) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Image_Appcbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Image_Appcno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'i': + + if bytes.Equal(ffj_key_Image_Appc_ID, kn) { + currentKey = ffj_t_Image_Appc_ID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'l': + + if bytes.Equal(ffj_key_Image_Appc_Labels, kn) { + currentKey = ffj_t_Image_Appc_Labels + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'n': + + if bytes.Equal(ffj_key_Image_Appc_Name, kn) { + currentKey = ffj_t_Image_Appc_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Image_Appc_Labels, kn) { + currentKey = ffj_t_Image_Appc_Labels + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Image_Appc_ID, kn) { + currentKey = ffj_t_Image_Appc_ID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Image_Appc_Name, kn) { + currentKey = ffj_t_Image_Appc_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Image_Appcno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Image_Appc_Name: + goto handle_Name + + case ffj_t_Image_Appc_ID: + goto handle_ID + + case ffj_t_Image_Appc_Labels: + goto handle_Labels + + case ffj_t_Image_Appcno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Name: + + /* handler: uj.Name type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Name = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ID: + + /* handler: uj.ID type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.ID = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.ID = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Labels: + + /* handler: uj.Labels type=mesos.Labels kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Labels = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Labels == nil { + uj.Labels = new(Labels) + } + + err = uj.Labels.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Image_Docker) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Image_Docker) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "name":`) + fflib.WriteJsonString(buf, string(mj.Name)) + buf.WriteByte(',') + if mj.Credential != nil { + if true { + buf.WriteString(`"credential":`) + + { + + err = mj.Credential.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Config != nil { + if true { + buf.WriteString(`"config":`) + + { + + err = mj.Config.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Image_Dockerbase = iota + ffj_t_Image_Dockerno_such_key + + ffj_t_Image_Docker_Name + + ffj_t_Image_Docker_Credential + + ffj_t_Image_Docker_Config +) + +var ffj_key_Image_Docker_Name = []byte("name") + +var ffj_key_Image_Docker_Credential = []byte("credential") + +var ffj_key_Image_Docker_Config = []byte("config") + +func (uj *Image_Docker) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Image_Docker) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Image_Dockerbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Image_Dockerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_Image_Docker_Credential, kn) { + currentKey = ffj_t_Image_Docker_Credential + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Image_Docker_Config, kn) { + currentKey = ffj_t_Image_Docker_Config + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'n': + + if bytes.Equal(ffj_key_Image_Docker_Name, kn) { + currentKey = ffj_t_Image_Docker_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Image_Docker_Config, kn) { + currentKey = ffj_t_Image_Docker_Config + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Image_Docker_Credential, kn) { + currentKey = ffj_t_Image_Docker_Credential + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Image_Docker_Name, kn) { + currentKey = ffj_t_Image_Docker_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Image_Dockerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Image_Docker_Name: + goto handle_Name + + case ffj_t_Image_Docker_Credential: + goto handle_Credential + + case ffj_t_Image_Docker_Config: + goto handle_Config + + case ffj_t_Image_Dockerno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Name: + + /* handler: uj.Name type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Name = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Credential: + + /* handler: uj.Credential type=mesos.Credential kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Credential = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Credential == nil { + uj.Credential = new(Credential) + } + + err = uj.Credential.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Config: + + /* handler: uj.Config type=mesos.Secret kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Config = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Config == nil { + uj.Config = new(Secret) + } + + err = uj.Config.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *InverseOffer) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *InverseOffer) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"id":`) + + { + + err = mj.OfferID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + if mj.URL != nil { + if true { + buf.WriteString(`"url":`) + + { + + err = mj.URL.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"framework_id":`) + + { + + err = mj.FrameworkID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + if mj.AgentID != nil { + if true { + buf.WriteString(`"agent_id":`) + + { + + err = mj.AgentID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"unavailability":`) + + { + + err = mj.Unavailability.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteString(`,"resources":`) + if mj.Resources != nil { + buf.WriteString(`[`) + for i, v := range mj.Resources { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_InverseOfferbase = iota + ffj_t_InverseOfferno_such_key + + ffj_t_InverseOffer_OfferID + + ffj_t_InverseOffer_URL + + ffj_t_InverseOffer_FrameworkID + + ffj_t_InverseOffer_AgentID + + ffj_t_InverseOffer_Unavailability + + ffj_t_InverseOffer_Resources +) + +var ffj_key_InverseOffer_OfferID = []byte("id") + +var ffj_key_InverseOffer_URL = []byte("url") + +var ffj_key_InverseOffer_FrameworkID = []byte("framework_id") + +var ffj_key_InverseOffer_AgentID = []byte("agent_id") + +var ffj_key_InverseOffer_Unavailability = []byte("unavailability") + +var ffj_key_InverseOffer_Resources = []byte("resources") + +func (uj *InverseOffer) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *InverseOffer) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_InverseOfferbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_InverseOfferno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'a': + + if bytes.Equal(ffj_key_InverseOffer_AgentID, kn) { + currentKey = ffj_t_InverseOffer_AgentID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'f': + + if bytes.Equal(ffj_key_InverseOffer_FrameworkID, kn) { + currentKey = ffj_t_InverseOffer_FrameworkID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'i': + + if bytes.Equal(ffj_key_InverseOffer_OfferID, kn) { + currentKey = ffj_t_InverseOffer_OfferID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_InverseOffer_Resources, kn) { + currentKey = ffj_t_InverseOffer_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'u': + + if bytes.Equal(ffj_key_InverseOffer_URL, kn) { + currentKey = ffj_t_InverseOffer_URL + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_InverseOffer_Unavailability, kn) { + currentKey = ffj_t_InverseOffer_Unavailability + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_InverseOffer_Resources, kn) { + currentKey = ffj_t_InverseOffer_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_InverseOffer_Unavailability, kn) { + currentKey = ffj_t_InverseOffer_Unavailability + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_InverseOffer_AgentID, kn) { + currentKey = ffj_t_InverseOffer_AgentID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_InverseOffer_FrameworkID, kn) { + currentKey = ffj_t_InverseOffer_FrameworkID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_InverseOffer_URL, kn) { + currentKey = ffj_t_InverseOffer_URL + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_InverseOffer_OfferID, kn) { + currentKey = ffj_t_InverseOffer_OfferID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_InverseOfferno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_InverseOffer_OfferID: + goto handle_OfferID + + case ffj_t_InverseOffer_URL: + goto handle_URL + + case ffj_t_InverseOffer_FrameworkID: + goto handle_FrameworkID + + case ffj_t_InverseOffer_AgentID: + goto handle_AgentID + + case ffj_t_InverseOffer_Unavailability: + goto handle_Unavailability + + case ffj_t_InverseOffer_Resources: + goto handle_Resources + + case ffj_t_InverseOfferno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_OfferID: + + /* handler: uj.OfferID type=mesos.OfferID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.OfferID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_URL: + + /* handler: uj.URL type=mesos.URL kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.URL = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.URL == nil { + uj.URL = new(URL) + } + + err = uj.URL.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_FrameworkID: + + /* handler: uj.FrameworkID type=mesos.FrameworkID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.FrameworkID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_AgentID: + + /* handler: uj.AgentID type=mesos.AgentID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.AgentID = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.AgentID == nil { + uj.AgentID = new(AgentID) + } + + err = uj.AgentID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Unavailability: + + /* handler: uj.Unavailability type=mesos.Unavailability kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.Unavailability.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Resources: + + /* handler: uj.Resources type=[]mesos.Resource kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Resources = nil + } else { + + uj.Resources = []Resource{} + + wantVal := true + + for { + + var tmp_uj__Resources Resource + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Resources type=mesos.Resource kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Resources.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Resources = append(uj.Resources, tmp_uj__Resources) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *IpStatistics) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *IpStatistics) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Forwarding != nil { + if true { + buf.WriteString(`"Forwarding":`) + fflib.FormatBits2(buf, uint64(*mj.Forwarding), 10, *mj.Forwarding < 0) + buf.WriteByte(',') + } + } + if mj.DefaultTTL != nil { + if true { + buf.WriteString(`"DefaultTTL":`) + fflib.FormatBits2(buf, uint64(*mj.DefaultTTL), 10, *mj.DefaultTTL < 0) + buf.WriteByte(',') + } + } + if mj.InReceives != nil { + if true { + buf.WriteString(`"InReceives":`) + fflib.FormatBits2(buf, uint64(*mj.InReceives), 10, *mj.InReceives < 0) + buf.WriteByte(',') + } + } + if mj.InHdrErrors != nil { + if true { + buf.WriteString(`"InHdrErrors":`) + fflib.FormatBits2(buf, uint64(*mj.InHdrErrors), 10, *mj.InHdrErrors < 0) + buf.WriteByte(',') + } + } + if mj.InAddrErrors != nil { + if true { + buf.WriteString(`"InAddrErrors":`) + fflib.FormatBits2(buf, uint64(*mj.InAddrErrors), 10, *mj.InAddrErrors < 0) + buf.WriteByte(',') + } + } + if mj.ForwDatagrams != nil { + if true { + buf.WriteString(`"ForwDatagrams":`) + fflib.FormatBits2(buf, uint64(*mj.ForwDatagrams), 10, *mj.ForwDatagrams < 0) + buf.WriteByte(',') + } + } + if mj.InUnknownProtos != nil { + if true { + buf.WriteString(`"InUnknownProtos":`) + fflib.FormatBits2(buf, uint64(*mj.InUnknownProtos), 10, *mj.InUnknownProtos < 0) + buf.WriteByte(',') + } + } + if mj.InDiscards != nil { + if true { + buf.WriteString(`"InDiscards":`) + fflib.FormatBits2(buf, uint64(*mj.InDiscards), 10, *mj.InDiscards < 0) + buf.WriteByte(',') + } + } + if mj.InDelivers != nil { + if true { + buf.WriteString(`"InDelivers":`) + fflib.FormatBits2(buf, uint64(*mj.InDelivers), 10, *mj.InDelivers < 0) + buf.WriteByte(',') + } + } + if mj.OutRequests != nil { + if true { + buf.WriteString(`"OutRequests":`) + fflib.FormatBits2(buf, uint64(*mj.OutRequests), 10, *mj.OutRequests < 0) + buf.WriteByte(',') + } + } + if mj.OutDiscards != nil { + if true { + buf.WriteString(`"OutDiscards":`) + fflib.FormatBits2(buf, uint64(*mj.OutDiscards), 10, *mj.OutDiscards < 0) + buf.WriteByte(',') + } + } + if mj.OutNoRoutes != nil { + if true { + buf.WriteString(`"OutNoRoutes":`) + fflib.FormatBits2(buf, uint64(*mj.OutNoRoutes), 10, *mj.OutNoRoutes < 0) + buf.WriteByte(',') + } + } + if mj.ReasmTimeout != nil { + if true { + buf.WriteString(`"ReasmTimeout":`) + fflib.FormatBits2(buf, uint64(*mj.ReasmTimeout), 10, *mj.ReasmTimeout < 0) + buf.WriteByte(',') + } + } + if mj.ReasmReqds != nil { + if true { + buf.WriteString(`"ReasmReqds":`) + fflib.FormatBits2(buf, uint64(*mj.ReasmReqds), 10, *mj.ReasmReqds < 0) + buf.WriteByte(',') + } + } + if mj.ReasmOKs != nil { + if true { + buf.WriteString(`"ReasmOKs":`) + fflib.FormatBits2(buf, uint64(*mj.ReasmOKs), 10, *mj.ReasmOKs < 0) + buf.WriteByte(',') + } + } + if mj.ReasmFails != nil { + if true { + buf.WriteString(`"ReasmFails":`) + fflib.FormatBits2(buf, uint64(*mj.ReasmFails), 10, *mj.ReasmFails < 0) + buf.WriteByte(',') + } + } + if mj.FragOKs != nil { + if true { + buf.WriteString(`"FragOKs":`) + fflib.FormatBits2(buf, uint64(*mj.FragOKs), 10, *mj.FragOKs < 0) + buf.WriteByte(',') + } + } + if mj.FragFails != nil { + if true { + buf.WriteString(`"FragFails":`) + fflib.FormatBits2(buf, uint64(*mj.FragFails), 10, *mj.FragFails < 0) + buf.WriteByte(',') + } + } + if mj.FragCreates != nil { + if true { + buf.WriteString(`"FragCreates":`) + fflib.FormatBits2(buf, uint64(*mj.FragCreates), 10, *mj.FragCreates < 0) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_IpStatisticsbase = iota + ffj_t_IpStatisticsno_such_key + + ffj_t_IpStatistics_Forwarding + + ffj_t_IpStatistics_DefaultTTL + + ffj_t_IpStatistics_InReceives + + ffj_t_IpStatistics_InHdrErrors + + ffj_t_IpStatistics_InAddrErrors + + ffj_t_IpStatistics_ForwDatagrams + + ffj_t_IpStatistics_InUnknownProtos + + ffj_t_IpStatistics_InDiscards + + ffj_t_IpStatistics_InDelivers + + ffj_t_IpStatistics_OutRequests + + ffj_t_IpStatistics_OutDiscards + + ffj_t_IpStatistics_OutNoRoutes + + ffj_t_IpStatistics_ReasmTimeout + + ffj_t_IpStatistics_ReasmReqds + + ffj_t_IpStatistics_ReasmOKs + + ffj_t_IpStatistics_ReasmFails + + ffj_t_IpStatistics_FragOKs + + ffj_t_IpStatistics_FragFails + + ffj_t_IpStatistics_FragCreates +) + +var ffj_key_IpStatistics_Forwarding = []byte("Forwarding") + +var ffj_key_IpStatistics_DefaultTTL = []byte("DefaultTTL") + +var ffj_key_IpStatistics_InReceives = []byte("InReceives") + +var ffj_key_IpStatistics_InHdrErrors = []byte("InHdrErrors") + +var ffj_key_IpStatistics_InAddrErrors = []byte("InAddrErrors") + +var ffj_key_IpStatistics_ForwDatagrams = []byte("ForwDatagrams") + +var ffj_key_IpStatistics_InUnknownProtos = []byte("InUnknownProtos") + +var ffj_key_IpStatistics_InDiscards = []byte("InDiscards") + +var ffj_key_IpStatistics_InDelivers = []byte("InDelivers") + +var ffj_key_IpStatistics_OutRequests = []byte("OutRequests") + +var ffj_key_IpStatistics_OutDiscards = []byte("OutDiscards") + +var ffj_key_IpStatistics_OutNoRoutes = []byte("OutNoRoutes") + +var ffj_key_IpStatistics_ReasmTimeout = []byte("ReasmTimeout") + +var ffj_key_IpStatistics_ReasmReqds = []byte("ReasmReqds") + +var ffj_key_IpStatistics_ReasmOKs = []byte("ReasmOKs") + +var ffj_key_IpStatistics_ReasmFails = []byte("ReasmFails") + +var ffj_key_IpStatistics_FragOKs = []byte("FragOKs") + +var ffj_key_IpStatistics_FragFails = []byte("FragFails") + +var ffj_key_IpStatistics_FragCreates = []byte("FragCreates") + +func (uj *IpStatistics) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *IpStatistics) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_IpStatisticsbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_IpStatisticsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'D': + + if bytes.Equal(ffj_key_IpStatistics_DefaultTTL, kn) { + currentKey = ffj_t_IpStatistics_DefaultTTL + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'F': + + if bytes.Equal(ffj_key_IpStatistics_Forwarding, kn) { + currentKey = ffj_t_IpStatistics_Forwarding + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IpStatistics_ForwDatagrams, kn) { + currentKey = ffj_t_IpStatistics_ForwDatagrams + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IpStatistics_FragOKs, kn) { + currentKey = ffj_t_IpStatistics_FragOKs + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IpStatistics_FragFails, kn) { + currentKey = ffj_t_IpStatistics_FragFails + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IpStatistics_FragCreates, kn) { + currentKey = ffj_t_IpStatistics_FragCreates + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'I': + + if bytes.Equal(ffj_key_IpStatistics_InReceives, kn) { + currentKey = ffj_t_IpStatistics_InReceives + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IpStatistics_InHdrErrors, kn) { + currentKey = ffj_t_IpStatistics_InHdrErrors + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IpStatistics_InAddrErrors, kn) { + currentKey = ffj_t_IpStatistics_InAddrErrors + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IpStatistics_InUnknownProtos, kn) { + currentKey = ffj_t_IpStatistics_InUnknownProtos + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IpStatistics_InDiscards, kn) { + currentKey = ffj_t_IpStatistics_InDiscards + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IpStatistics_InDelivers, kn) { + currentKey = ffj_t_IpStatistics_InDelivers + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'O': + + if bytes.Equal(ffj_key_IpStatistics_OutRequests, kn) { + currentKey = ffj_t_IpStatistics_OutRequests + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IpStatistics_OutDiscards, kn) { + currentKey = ffj_t_IpStatistics_OutDiscards + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IpStatistics_OutNoRoutes, kn) { + currentKey = ffj_t_IpStatistics_OutNoRoutes + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'R': + + if bytes.Equal(ffj_key_IpStatistics_ReasmTimeout, kn) { + currentKey = ffj_t_IpStatistics_ReasmTimeout + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IpStatistics_ReasmReqds, kn) { + currentKey = ffj_t_IpStatistics_ReasmReqds + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IpStatistics_ReasmOKs, kn) { + currentKey = ffj_t_IpStatistics_ReasmOKs + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_IpStatistics_ReasmFails, kn) { + currentKey = ffj_t_IpStatistics_ReasmFails + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_IpStatistics_FragCreates, kn) { + currentKey = ffj_t_IpStatistics_FragCreates + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IpStatistics_FragFails, kn) { + currentKey = ffj_t_IpStatistics_FragFails + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IpStatistics_FragOKs, kn) { + currentKey = ffj_t_IpStatistics_FragOKs + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IpStatistics_ReasmFails, kn) { + currentKey = ffj_t_IpStatistics_ReasmFails + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IpStatistics_ReasmOKs, kn) { + currentKey = ffj_t_IpStatistics_ReasmOKs + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IpStatistics_ReasmReqds, kn) { + currentKey = ffj_t_IpStatistics_ReasmReqds + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IpStatistics_ReasmTimeout, kn) { + currentKey = ffj_t_IpStatistics_ReasmTimeout + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IpStatistics_OutNoRoutes, kn) { + currentKey = ffj_t_IpStatistics_OutNoRoutes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IpStatistics_OutDiscards, kn) { + currentKey = ffj_t_IpStatistics_OutDiscards + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IpStatistics_OutRequests, kn) { + currentKey = ffj_t_IpStatistics_OutRequests + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IpStatistics_InDelivers, kn) { + currentKey = ffj_t_IpStatistics_InDelivers + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IpStatistics_InDiscards, kn) { + currentKey = ffj_t_IpStatistics_InDiscards + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IpStatistics_InUnknownProtos, kn) { + currentKey = ffj_t_IpStatistics_InUnknownProtos + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IpStatistics_ForwDatagrams, kn) { + currentKey = ffj_t_IpStatistics_ForwDatagrams + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IpStatistics_InAddrErrors, kn) { + currentKey = ffj_t_IpStatistics_InAddrErrors + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IpStatistics_InHdrErrors, kn) { + currentKey = ffj_t_IpStatistics_InHdrErrors + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_IpStatistics_InReceives, kn) { + currentKey = ffj_t_IpStatistics_InReceives + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_IpStatistics_DefaultTTL, kn) { + currentKey = ffj_t_IpStatistics_DefaultTTL + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_IpStatistics_Forwarding, kn) { + currentKey = ffj_t_IpStatistics_Forwarding + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_IpStatisticsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_IpStatistics_Forwarding: + goto handle_Forwarding + + case ffj_t_IpStatistics_DefaultTTL: + goto handle_DefaultTTL + + case ffj_t_IpStatistics_InReceives: + goto handle_InReceives + + case ffj_t_IpStatistics_InHdrErrors: + goto handle_InHdrErrors + + case ffj_t_IpStatistics_InAddrErrors: + goto handle_InAddrErrors + + case ffj_t_IpStatistics_ForwDatagrams: + goto handle_ForwDatagrams + + case ffj_t_IpStatistics_InUnknownProtos: + goto handle_InUnknownProtos + + case ffj_t_IpStatistics_InDiscards: + goto handle_InDiscards + + case ffj_t_IpStatistics_InDelivers: + goto handle_InDelivers + + case ffj_t_IpStatistics_OutRequests: + goto handle_OutRequests + + case ffj_t_IpStatistics_OutDiscards: + goto handle_OutDiscards + + case ffj_t_IpStatistics_OutNoRoutes: + goto handle_OutNoRoutes + + case ffj_t_IpStatistics_ReasmTimeout: + goto handle_ReasmTimeout + + case ffj_t_IpStatistics_ReasmReqds: + goto handle_ReasmReqds + + case ffj_t_IpStatistics_ReasmOKs: + goto handle_ReasmOKs + + case ffj_t_IpStatistics_ReasmFails: + goto handle_ReasmFails + + case ffj_t_IpStatistics_FragOKs: + goto handle_FragOKs + + case ffj_t_IpStatistics_FragFails: + goto handle_FragFails + + case ffj_t_IpStatistics_FragCreates: + goto handle_FragCreates + + case ffj_t_IpStatisticsno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Forwarding: + + /* handler: uj.Forwarding type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Forwarding = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.Forwarding = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_DefaultTTL: + + /* handler: uj.DefaultTTL type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.DefaultTTL = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.DefaultTTL = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_InReceives: + + /* handler: uj.InReceives type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InReceives = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InReceives = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_InHdrErrors: + + /* handler: uj.InHdrErrors type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InHdrErrors = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InHdrErrors = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_InAddrErrors: + + /* handler: uj.InAddrErrors type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InAddrErrors = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InAddrErrors = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ForwDatagrams: + + /* handler: uj.ForwDatagrams type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.ForwDatagrams = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.ForwDatagrams = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_InUnknownProtos: + + /* handler: uj.InUnknownProtos type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InUnknownProtos = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InUnknownProtos = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_InDiscards: + + /* handler: uj.InDiscards type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InDiscards = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InDiscards = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_InDelivers: + + /* handler: uj.InDelivers type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InDelivers = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InDelivers = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_OutRequests: + + /* handler: uj.OutRequests type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.OutRequests = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.OutRequests = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_OutDiscards: + + /* handler: uj.OutDiscards type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.OutDiscards = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.OutDiscards = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_OutNoRoutes: + + /* handler: uj.OutNoRoutes type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.OutNoRoutes = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.OutNoRoutes = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ReasmTimeout: + + /* handler: uj.ReasmTimeout type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.ReasmTimeout = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.ReasmTimeout = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ReasmReqds: + + /* handler: uj.ReasmReqds type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.ReasmReqds = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.ReasmReqds = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ReasmOKs: + + /* handler: uj.ReasmOKs type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.ReasmOKs = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.ReasmOKs = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ReasmFails: + + /* handler: uj.ReasmFails type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.ReasmFails = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.ReasmFails = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_FragOKs: + + /* handler: uj.FragOKs type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.FragOKs = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.FragOKs = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_FragFails: + + /* handler: uj.FragFails type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.FragFails = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.FragFails = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_FragCreates: + + /* handler: uj.FragCreates type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.FragCreates = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.FragCreates = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *KillPolicy) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *KillPolicy) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.GracePeriod != nil { + if true { + buf.WriteString(`"grace_period":`) + + { + + err = mj.GracePeriod.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_KillPolicybase = iota + ffj_t_KillPolicyno_such_key + + ffj_t_KillPolicy_GracePeriod +) + +var ffj_key_KillPolicy_GracePeriod = []byte("grace_period") + +func (uj *KillPolicy) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *KillPolicy) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_KillPolicybase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_KillPolicyno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'g': + + if bytes.Equal(ffj_key_KillPolicy_GracePeriod, kn) { + currentKey = ffj_t_KillPolicy_GracePeriod + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_KillPolicy_GracePeriod, kn) { + currentKey = ffj_t_KillPolicy_GracePeriod + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_KillPolicyno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_KillPolicy_GracePeriod: + goto handle_GracePeriod + + case ffj_t_KillPolicyno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_GracePeriod: + + /* handler: uj.GracePeriod type=mesos.DurationInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.GracePeriod = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.GracePeriod == nil { + uj.GracePeriod = new(DurationInfo) + } + + err = uj.GracePeriod.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Label) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Label) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "key":`) + fflib.WriteJsonString(buf, string(mj.Key)) + buf.WriteByte(',') + if mj.Value != nil { + if true { + buf.WriteString(`"value":`) + fflib.WriteJsonString(buf, string(*mj.Value)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Labelbase = iota + ffj_t_Labelno_such_key + + ffj_t_Label_Key + + ffj_t_Label_Value +) + +var ffj_key_Label_Key = []byte("key") + +var ffj_key_Label_Value = []byte("value") + +func (uj *Label) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Label) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Labelbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Labelno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'k': + + if bytes.Equal(ffj_key_Label_Key, kn) { + currentKey = ffj_t_Label_Key + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'v': + + if bytes.Equal(ffj_key_Label_Value, kn) { + currentKey = ffj_t_Label_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Label_Value, kn) { + currentKey = ffj_t_Label_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Label_Key, kn) { + currentKey = ffj_t_Label_Key + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Labelno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Label_Key: + goto handle_Key + + case ffj_t_Label_Value: + goto handle_Value + + case ffj_t_Labelno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Key: + + /* handler: uj.Key type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Key = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Value: + + /* handler: uj.Value type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Value = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Value = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Labels) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Labels) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"labels":`) + if mj.Labels != nil { + buf.WriteString(`[`) + for i, v := range mj.Labels { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Labelsbase = iota + ffj_t_Labelsno_such_key + + ffj_t_Labels_Labels +) + +var ffj_key_Labels_Labels = []byte("labels") + +func (uj *Labels) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Labels) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Labelsbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Labelsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'l': + + if bytes.Equal(ffj_key_Labels_Labels, kn) { + currentKey = ffj_t_Labels_Labels + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Labels_Labels, kn) { + currentKey = ffj_t_Labels_Labels + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Labelsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Labels_Labels: + goto handle_Labels + + case ffj_t_Labelsno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Labels: + + /* handler: uj.Labels type=[]mesos.Label kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Labels = nil + } else { + + uj.Labels = []Label{} + + wantVal := true + + for { + + var tmp_uj__Labels Label + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Labels type=mesos.Label kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Labels.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Labels = append(uj.Labels, tmp_uj__Labels) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *LinuxInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *LinuxInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.CapabilityInfo != nil { + if true { + buf.WriteString(`"capability_info":`) + + { + + err = mj.CapabilityInfo.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.BoundingCapabilities != nil { + if true { + buf.WriteString(`"bounding_capabilities":`) + + { + + err = mj.BoundingCapabilities.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.EffectiveCapabilities != nil { + if true { + buf.WriteString(`"effective_capabilities":`) + + { + + err = mj.EffectiveCapabilities.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.SharePIDNamespace != nil { + if true { + if *mj.SharePIDNamespace { + buf.WriteString(`"share_pid_namespace":true`) + } else { + buf.WriteString(`"share_pid_namespace":false`) + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_LinuxInfobase = iota + ffj_t_LinuxInfono_such_key + + ffj_t_LinuxInfo_CapabilityInfo + + ffj_t_LinuxInfo_BoundingCapabilities + + ffj_t_LinuxInfo_EffectiveCapabilities + + ffj_t_LinuxInfo_SharePIDNamespace +) + +var ffj_key_LinuxInfo_CapabilityInfo = []byte("capability_info") + +var ffj_key_LinuxInfo_BoundingCapabilities = []byte("bounding_capabilities") + +var ffj_key_LinuxInfo_EffectiveCapabilities = []byte("effective_capabilities") + +var ffj_key_LinuxInfo_SharePIDNamespace = []byte("share_pid_namespace") + +func (uj *LinuxInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *LinuxInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_LinuxInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_LinuxInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'b': + + if bytes.Equal(ffj_key_LinuxInfo_BoundingCapabilities, kn) { + currentKey = ffj_t_LinuxInfo_BoundingCapabilities + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'c': + + if bytes.Equal(ffj_key_LinuxInfo_CapabilityInfo, kn) { + currentKey = ffj_t_LinuxInfo_CapabilityInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'e': + + if bytes.Equal(ffj_key_LinuxInfo_EffectiveCapabilities, kn) { + currentKey = ffj_t_LinuxInfo_EffectiveCapabilities + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_LinuxInfo_SharePIDNamespace, kn) { + currentKey = ffj_t_LinuxInfo_SharePIDNamespace + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_LinuxInfo_SharePIDNamespace, kn) { + currentKey = ffj_t_LinuxInfo_SharePIDNamespace + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_LinuxInfo_EffectiveCapabilities, kn) { + currentKey = ffj_t_LinuxInfo_EffectiveCapabilities + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_LinuxInfo_BoundingCapabilities, kn) { + currentKey = ffj_t_LinuxInfo_BoundingCapabilities + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_LinuxInfo_CapabilityInfo, kn) { + currentKey = ffj_t_LinuxInfo_CapabilityInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_LinuxInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_LinuxInfo_CapabilityInfo: + goto handle_CapabilityInfo + + case ffj_t_LinuxInfo_BoundingCapabilities: + goto handle_BoundingCapabilities + + case ffj_t_LinuxInfo_EffectiveCapabilities: + goto handle_EffectiveCapabilities + + case ffj_t_LinuxInfo_SharePIDNamespace: + goto handle_SharePIDNamespace + + case ffj_t_LinuxInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_CapabilityInfo: + + /* handler: uj.CapabilityInfo type=mesos.CapabilityInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.CapabilityInfo = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.CapabilityInfo == nil { + uj.CapabilityInfo = new(CapabilityInfo) + } + + err = uj.CapabilityInfo.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_BoundingCapabilities: + + /* handler: uj.BoundingCapabilities type=mesos.CapabilityInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.BoundingCapabilities = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.BoundingCapabilities == nil { + uj.BoundingCapabilities = new(CapabilityInfo) + } + + err = uj.BoundingCapabilities.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_EffectiveCapabilities: + + /* handler: uj.EffectiveCapabilities type=mesos.CapabilityInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.EffectiveCapabilities = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.EffectiveCapabilities == nil { + uj.EffectiveCapabilities = new(CapabilityInfo) + } + + err = uj.EffectiveCapabilities.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_SharePIDNamespace: + + /* handler: uj.SharePIDNamespace type=bool kind=bool quoted=false*/ + + { + if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) + } + } + + { + if tok == fflib.FFTok_null { + + uj.SharePIDNamespace = nil + + } else { + tmpb := fs.Output.Bytes() + + var tval bool + + if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { + + tval = true + + } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { + + tval = false + + } else { + err = errors.New("unexpected bytes for true/false value") + return fs.WrapErr(err) + } + + uj.SharePIDNamespace = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *MachineID) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *MachineID) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Hostname != nil { + if true { + buf.WriteString(`"hostname":`) + fflib.WriteJsonString(buf, string(*mj.Hostname)) + buf.WriteByte(',') + } + } + if mj.IP != nil { + if true { + buf.WriteString(`"ip":`) + fflib.WriteJsonString(buf, string(*mj.IP)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_MachineIDbase = iota + ffj_t_MachineIDno_such_key + + ffj_t_MachineID_Hostname + + ffj_t_MachineID_IP +) + +var ffj_key_MachineID_Hostname = []byte("hostname") + +var ffj_key_MachineID_IP = []byte("ip") + +func (uj *MachineID) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *MachineID) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_MachineIDbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_MachineIDno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'h': + + if bytes.Equal(ffj_key_MachineID_Hostname, kn) { + currentKey = ffj_t_MachineID_Hostname + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'i': + + if bytes.Equal(ffj_key_MachineID_IP, kn) { + currentKey = ffj_t_MachineID_IP + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_MachineID_IP, kn) { + currentKey = ffj_t_MachineID_IP + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_MachineID_Hostname, kn) { + currentKey = ffj_t_MachineID_Hostname + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_MachineIDno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_MachineID_Hostname: + goto handle_Hostname + + case ffj_t_MachineID_IP: + goto handle_IP + + case ffj_t_MachineIDno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Hostname: + + /* handler: uj.Hostname type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Hostname = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Hostname = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_IP: + + /* handler: uj.IP type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.IP = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.IP = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *MachineInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *MachineInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "id":`) + + { + + err = mj.ID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + if mj.Mode != nil { + if true { + buf.WriteString(`"mode":`) + + { + + obj, err = mj.Mode.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + if mj.Unavailability != nil { + if true { + buf.WriteString(`"unavailability":`) + + { + + err = mj.Unavailability.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_MachineInfobase = iota + ffj_t_MachineInfono_such_key + + ffj_t_MachineInfo_ID + + ffj_t_MachineInfo_Mode + + ffj_t_MachineInfo_Unavailability +) + +var ffj_key_MachineInfo_ID = []byte("id") + +var ffj_key_MachineInfo_Mode = []byte("mode") + +var ffj_key_MachineInfo_Unavailability = []byte("unavailability") + +func (uj *MachineInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *MachineInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_MachineInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_MachineInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'i': + + if bytes.Equal(ffj_key_MachineInfo_ID, kn) { + currentKey = ffj_t_MachineInfo_ID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'm': + + if bytes.Equal(ffj_key_MachineInfo_Mode, kn) { + currentKey = ffj_t_MachineInfo_Mode + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'u': + + if bytes.Equal(ffj_key_MachineInfo_Unavailability, kn) { + currentKey = ffj_t_MachineInfo_Unavailability + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_MachineInfo_Unavailability, kn) { + currentKey = ffj_t_MachineInfo_Unavailability + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_MachineInfo_Mode, kn) { + currentKey = ffj_t_MachineInfo_Mode + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_MachineInfo_ID, kn) { + currentKey = ffj_t_MachineInfo_ID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_MachineInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_MachineInfo_ID: + goto handle_ID + + case ffj_t_MachineInfo_Mode: + goto handle_Mode + + case ffj_t_MachineInfo_Unavailability: + goto handle_Unavailability + + case ffj_t_MachineInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ID: + + /* handler: uj.ID type=mesos.MachineID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.ID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Mode: + + /* handler: uj.Mode type=mesos.MachineInfo_Mode kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Mode = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.Mode == nil { + uj.Mode = new(MachineInfo_Mode) + } + + err = uj.Mode.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Unavailability: + + /* handler: uj.Unavailability type=mesos.Unavailability kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Unavailability = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Unavailability == nil { + uj.Unavailability = new(Unavailability) + } + + err = uj.Unavailability.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *MasterInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *MasterInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"id":`) + fflib.WriteJsonString(buf, string(mj.ID)) + buf.WriteString(`,"ip":`) + fflib.FormatBits2(buf, uint64(mj.IP), 10, false) + buf.WriteByte(',') + if mj.Port != nil { + if true { + buf.WriteString(`"port":`) + fflib.FormatBits2(buf, uint64(*mj.Port), 10, false) + buf.WriteByte(',') + } + } + if mj.PID != nil { + if true { + buf.WriteString(`"pid":`) + fflib.WriteJsonString(buf, string(*mj.PID)) + buf.WriteByte(',') + } + } + if mj.Hostname != nil { + if true { + buf.WriteString(`"hostname":`) + fflib.WriteJsonString(buf, string(*mj.Hostname)) + buf.WriteByte(',') + } + } + if mj.Version != nil { + if true { + buf.WriteString(`"version":`) + fflib.WriteJsonString(buf, string(*mj.Version)) + buf.WriteByte(',') + } + } + if mj.Address != nil { + if true { + buf.WriteString(`"address":`) + + { + + err = mj.Address.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Domain != nil { + if true { + buf.WriteString(`"domain":`) + + { + + err = mj.Domain.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"capabilities":`) + if mj.Capabilities != nil { + buf.WriteString(`[`) + for i, v := range mj.Capabilities { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_MasterInfobase = iota + ffj_t_MasterInfono_such_key + + ffj_t_MasterInfo_ID + + ffj_t_MasterInfo_IP + + ffj_t_MasterInfo_Port + + ffj_t_MasterInfo_PID + + ffj_t_MasterInfo_Hostname + + ffj_t_MasterInfo_Version + + ffj_t_MasterInfo_Address + + ffj_t_MasterInfo_Domain + + ffj_t_MasterInfo_Capabilities +) + +var ffj_key_MasterInfo_ID = []byte("id") + +var ffj_key_MasterInfo_IP = []byte("ip") + +var ffj_key_MasterInfo_Port = []byte("port") + +var ffj_key_MasterInfo_PID = []byte("pid") + +var ffj_key_MasterInfo_Hostname = []byte("hostname") + +var ffj_key_MasterInfo_Version = []byte("version") + +var ffj_key_MasterInfo_Address = []byte("address") + +var ffj_key_MasterInfo_Domain = []byte("domain") + +var ffj_key_MasterInfo_Capabilities = []byte("capabilities") + +func (uj *MasterInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *MasterInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_MasterInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_MasterInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'a': + + if bytes.Equal(ffj_key_MasterInfo_Address, kn) { + currentKey = ffj_t_MasterInfo_Address + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'c': + + if bytes.Equal(ffj_key_MasterInfo_Capabilities, kn) { + currentKey = ffj_t_MasterInfo_Capabilities + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'd': + + if bytes.Equal(ffj_key_MasterInfo_Domain, kn) { + currentKey = ffj_t_MasterInfo_Domain + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'h': + + if bytes.Equal(ffj_key_MasterInfo_Hostname, kn) { + currentKey = ffj_t_MasterInfo_Hostname + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'i': + + if bytes.Equal(ffj_key_MasterInfo_ID, kn) { + currentKey = ffj_t_MasterInfo_ID + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_MasterInfo_IP, kn) { + currentKey = ffj_t_MasterInfo_IP + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_MasterInfo_Port, kn) { + currentKey = ffj_t_MasterInfo_Port + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_MasterInfo_PID, kn) { + currentKey = ffj_t_MasterInfo_PID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'v': + + if bytes.Equal(ffj_key_MasterInfo_Version, kn) { + currentKey = ffj_t_MasterInfo_Version + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_MasterInfo_Capabilities, kn) { + currentKey = ffj_t_MasterInfo_Capabilities + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_MasterInfo_Domain, kn) { + currentKey = ffj_t_MasterInfo_Domain + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_MasterInfo_Address, kn) { + currentKey = ffj_t_MasterInfo_Address + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_MasterInfo_Version, kn) { + currentKey = ffj_t_MasterInfo_Version + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_MasterInfo_Hostname, kn) { + currentKey = ffj_t_MasterInfo_Hostname + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_MasterInfo_PID, kn) { + currentKey = ffj_t_MasterInfo_PID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_MasterInfo_Port, kn) { + currentKey = ffj_t_MasterInfo_Port + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_MasterInfo_IP, kn) { + currentKey = ffj_t_MasterInfo_IP + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_MasterInfo_ID, kn) { + currentKey = ffj_t_MasterInfo_ID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_MasterInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_MasterInfo_ID: + goto handle_ID + + case ffj_t_MasterInfo_IP: + goto handle_IP + + case ffj_t_MasterInfo_Port: + goto handle_Port + + case ffj_t_MasterInfo_PID: + goto handle_PID + + case ffj_t_MasterInfo_Hostname: + goto handle_Hostname + + case ffj_t_MasterInfo_Version: + goto handle_Version + + case ffj_t_MasterInfo_Address: + goto handle_Address + + case ffj_t_MasterInfo_Domain: + goto handle_Domain + + case ffj_t_MasterInfo_Capabilities: + goto handle_Capabilities + + case ffj_t_MasterInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ID: + + /* handler: uj.ID type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.ID = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_IP: + + /* handler: uj.IP type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + uj.IP = uint32(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Port: + + /* handler: uj.Port type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Port = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint32(tval) + uj.Port = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_PID: + + /* handler: uj.PID type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.PID = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.PID = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Hostname: + + /* handler: uj.Hostname type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Hostname = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Hostname = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Version: + + /* handler: uj.Version type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Version = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Version = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Address: + + /* handler: uj.Address type=mesos.Address kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Address = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Address == nil { + uj.Address = new(Address) + } + + err = uj.Address.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Domain: + + /* handler: uj.Domain type=mesos.DomainInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Domain = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Domain == nil { + uj.Domain = new(DomainInfo) + } + + err = uj.Domain.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Capabilities: + + /* handler: uj.Capabilities type=[]mesos.MasterInfo_Capability kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Capabilities = nil + } else { + + uj.Capabilities = []MasterInfo_Capability{} + + wantVal := true + + for { + + var tmp_uj__Capabilities MasterInfo_Capability + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Capabilities type=mesos.MasterInfo_Capability kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Capabilities.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Capabilities = append(uj.Capabilities, tmp_uj__Capabilities) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *MasterInfo_Capability) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *MasterInfo_Capability) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_MasterInfo_Capabilitybase = iota + ffj_t_MasterInfo_Capabilityno_such_key + + ffj_t_MasterInfo_Capability_Type +) + +var ffj_key_MasterInfo_Capability_Type = []byte("type") + +func (uj *MasterInfo_Capability) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *MasterInfo_Capability) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_MasterInfo_Capabilitybase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_MasterInfo_Capabilityno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 't': + + if bytes.Equal(ffj_key_MasterInfo_Capability_Type, kn) { + currentKey = ffj_t_MasterInfo_Capability_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_MasterInfo_Capability_Type, kn) { + currentKey = ffj_t_MasterInfo_Capability_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_MasterInfo_Capabilityno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_MasterInfo_Capability_Type: + goto handle_Type + + case ffj_t_MasterInfo_Capabilityno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=mesos.MasterInfo_Capability_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Metric) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Metric) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "name":`) + fflib.WriteJsonString(buf, string(mj.Name)) + buf.WriteByte(',') + if mj.Value != nil { + if true { + buf.WriteString(`"value":`) + fflib.AppendFloat(buf, float64(*mj.Value), 'g', -1, 64) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Metricbase = iota + ffj_t_Metricno_such_key + + ffj_t_Metric_Name + + ffj_t_Metric_Value +) + +var ffj_key_Metric_Name = []byte("name") + +var ffj_key_Metric_Value = []byte("value") + +func (uj *Metric) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Metric) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Metricbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Metricno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'n': + + if bytes.Equal(ffj_key_Metric_Name, kn) { + currentKey = ffj_t_Metric_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'v': + + if bytes.Equal(ffj_key_Metric_Value, kn) { + currentKey = ffj_t_Metric_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Metric_Value, kn) { + currentKey = ffj_t_Metric_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Metric_Name, kn) { + currentKey = ffj_t_Metric_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Metricno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Metric_Name: + goto handle_Name + + case ffj_t_Metric_Value: + goto handle_Value + + case ffj_t_Metricno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Name: + + /* handler: uj.Name type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Name = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Value: + + /* handler: uj.Value type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Value = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.Value = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *MountPropagation) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *MountPropagation) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Mode != nil { + if true { + buf.WriteString(`"mode":`) + + { + + obj, err = mj.Mode.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_MountPropagationbase = iota + ffj_t_MountPropagationno_such_key + + ffj_t_MountPropagation_Mode +) + +var ffj_key_MountPropagation_Mode = []byte("mode") + +func (uj *MountPropagation) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *MountPropagation) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_MountPropagationbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_MountPropagationno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'm': + + if bytes.Equal(ffj_key_MountPropagation_Mode, kn) { + currentKey = ffj_t_MountPropagation_Mode + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_MountPropagation_Mode, kn) { + currentKey = ffj_t_MountPropagation_Mode + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_MountPropagationno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_MountPropagation_Mode: + goto handle_Mode + + case ffj_t_MountPropagationno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Mode: + + /* handler: uj.Mode type=mesos.MountPropagation_Mode kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Mode = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.Mode == nil { + uj.Mode = new(MountPropagation_Mode) + } + + err = uj.Mode.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *NetworkInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *NetworkInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"ip_addresses":`) + if mj.IPAddresses != nil { + buf.WriteString(`[`) + for i, v := range mj.IPAddresses { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.Name != nil { + if true { + buf.WriteString(`"name":`) + fflib.WriteJsonString(buf, string(*mj.Name)) + buf.WriteByte(',') + } + } + if len(mj.Groups) != 0 { + buf.WriteString(`"groups":`) + if mj.Groups != nil { + buf.WriteString(`[`) + for i, v := range mj.Groups { + if i != 0 { + buf.WriteString(`,`) + } + fflib.WriteJsonString(buf, string(v)) + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + } + if mj.Labels != nil { + if true { + buf.WriteString(`"labels":`) + + { + + err = mj.Labels.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"port_mappings":`) + if mj.PortMappings != nil { + buf.WriteString(`[`) + for i, v := range mj.PortMappings { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_NetworkInfobase = iota + ffj_t_NetworkInfono_such_key + + ffj_t_NetworkInfo_IPAddresses + + ffj_t_NetworkInfo_Name + + ffj_t_NetworkInfo_Groups + + ffj_t_NetworkInfo_Labels + + ffj_t_NetworkInfo_PortMappings +) + +var ffj_key_NetworkInfo_IPAddresses = []byte("ip_addresses") + +var ffj_key_NetworkInfo_Name = []byte("name") + +var ffj_key_NetworkInfo_Groups = []byte("groups") + +var ffj_key_NetworkInfo_Labels = []byte("labels") + +var ffj_key_NetworkInfo_PortMappings = []byte("port_mappings") + +func (uj *NetworkInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *NetworkInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_NetworkInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_NetworkInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'g': + + if bytes.Equal(ffj_key_NetworkInfo_Groups, kn) { + currentKey = ffj_t_NetworkInfo_Groups + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'i': + + if bytes.Equal(ffj_key_NetworkInfo_IPAddresses, kn) { + currentKey = ffj_t_NetworkInfo_IPAddresses + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'l': + + if bytes.Equal(ffj_key_NetworkInfo_Labels, kn) { + currentKey = ffj_t_NetworkInfo_Labels + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'n': + + if bytes.Equal(ffj_key_NetworkInfo_Name, kn) { + currentKey = ffj_t_NetworkInfo_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_NetworkInfo_PortMappings, kn) { + currentKey = ffj_t_NetworkInfo_PortMappings + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_NetworkInfo_PortMappings, kn) { + currentKey = ffj_t_NetworkInfo_PortMappings + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_NetworkInfo_Labels, kn) { + currentKey = ffj_t_NetworkInfo_Labels + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_NetworkInfo_Groups, kn) { + currentKey = ffj_t_NetworkInfo_Groups + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_NetworkInfo_Name, kn) { + currentKey = ffj_t_NetworkInfo_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_NetworkInfo_IPAddresses, kn) { + currentKey = ffj_t_NetworkInfo_IPAddresses + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_NetworkInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_NetworkInfo_IPAddresses: + goto handle_IPAddresses + + case ffj_t_NetworkInfo_Name: + goto handle_Name + + case ffj_t_NetworkInfo_Groups: + goto handle_Groups + + case ffj_t_NetworkInfo_Labels: + goto handle_Labels + + case ffj_t_NetworkInfo_PortMappings: + goto handle_PortMappings + + case ffj_t_NetworkInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_IPAddresses: + + /* handler: uj.IPAddresses type=[]mesos.NetworkInfo_IPAddress kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.IPAddresses = nil + } else { + + uj.IPAddresses = []NetworkInfo_IPAddress{} + + wantVal := true + + for { + + var tmp_uj__IPAddresses NetworkInfo_IPAddress + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__IPAddresses type=mesos.NetworkInfo_IPAddress kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__IPAddresses.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.IPAddresses = append(uj.IPAddresses, tmp_uj__IPAddresses) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Name: + + /* handler: uj.Name type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Name = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Name = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Groups: + + /* handler: uj.Groups type=[]string kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Groups = nil + } else { + + uj.Groups = []string{} + + wantVal := true + + for { + + var tmp_uj__Groups string + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Groups type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + tmp_uj__Groups = string(string(outBuf)) + + } + } + + uj.Groups = append(uj.Groups, tmp_uj__Groups) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Labels: + + /* handler: uj.Labels type=mesos.Labels kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Labels = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Labels == nil { + uj.Labels = new(Labels) + } + + err = uj.Labels.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_PortMappings: + + /* handler: uj.PortMappings type=[]mesos.NetworkInfo_PortMapping kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.PortMappings = nil + } else { + + uj.PortMappings = []NetworkInfo_PortMapping{} + + wantVal := true + + for { + + var tmp_uj__PortMappings NetworkInfo_PortMapping + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__PortMappings type=mesos.NetworkInfo_PortMapping kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__PortMappings.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.PortMappings = append(uj.PortMappings, tmp_uj__PortMappings) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *NetworkInfo_IPAddress) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *NetworkInfo_IPAddress) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Protocol != nil { + if true { + buf.WriteString(`"protocol":`) + + { + + obj, err = mj.Protocol.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + if mj.IPAddress != nil { + if true { + buf.WriteString(`"ip_address":`) + fflib.WriteJsonString(buf, string(*mj.IPAddress)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_NetworkInfo_IPAddressbase = iota + ffj_t_NetworkInfo_IPAddressno_such_key + + ffj_t_NetworkInfo_IPAddress_Protocol + + ffj_t_NetworkInfo_IPAddress_IPAddress +) + +var ffj_key_NetworkInfo_IPAddress_Protocol = []byte("protocol") + +var ffj_key_NetworkInfo_IPAddress_IPAddress = []byte("ip_address") + +func (uj *NetworkInfo_IPAddress) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *NetworkInfo_IPAddress) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_NetworkInfo_IPAddressbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_NetworkInfo_IPAddressno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'i': + + if bytes.Equal(ffj_key_NetworkInfo_IPAddress_IPAddress, kn) { + currentKey = ffj_t_NetworkInfo_IPAddress_IPAddress + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_NetworkInfo_IPAddress_Protocol, kn) { + currentKey = ffj_t_NetworkInfo_IPAddress_Protocol + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_NetworkInfo_IPAddress_IPAddress, kn) { + currentKey = ffj_t_NetworkInfo_IPAddress_IPAddress + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_NetworkInfo_IPAddress_Protocol, kn) { + currentKey = ffj_t_NetworkInfo_IPAddress_Protocol + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_NetworkInfo_IPAddressno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_NetworkInfo_IPAddress_Protocol: + goto handle_Protocol + + case ffj_t_NetworkInfo_IPAddress_IPAddress: + goto handle_IPAddress + + case ffj_t_NetworkInfo_IPAddressno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Protocol: + + /* handler: uj.Protocol type=mesos.NetworkInfo_Protocol kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Protocol = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.Protocol == nil { + uj.Protocol = new(NetworkInfo_Protocol) + } + + err = uj.Protocol.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_IPAddress: + + /* handler: uj.IPAddress type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.IPAddress = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.IPAddress = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *NetworkInfo_PortMapping) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *NetworkInfo_PortMapping) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "host_port":`) + fflib.FormatBits2(buf, uint64(mj.HostPort), 10, false) + buf.WriteString(`,"container_port":`) + fflib.FormatBits2(buf, uint64(mj.ContainerPort), 10, false) + buf.WriteByte(',') + if mj.Protocol != nil { + if true { + buf.WriteString(`"protocol":`) + fflib.WriteJsonString(buf, string(*mj.Protocol)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_NetworkInfo_PortMappingbase = iota + ffj_t_NetworkInfo_PortMappingno_such_key + + ffj_t_NetworkInfo_PortMapping_HostPort + + ffj_t_NetworkInfo_PortMapping_ContainerPort + + ffj_t_NetworkInfo_PortMapping_Protocol +) + +var ffj_key_NetworkInfo_PortMapping_HostPort = []byte("host_port") + +var ffj_key_NetworkInfo_PortMapping_ContainerPort = []byte("container_port") + +var ffj_key_NetworkInfo_PortMapping_Protocol = []byte("protocol") + +func (uj *NetworkInfo_PortMapping) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *NetworkInfo_PortMapping) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_NetworkInfo_PortMappingbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_NetworkInfo_PortMappingno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_NetworkInfo_PortMapping_ContainerPort, kn) { + currentKey = ffj_t_NetworkInfo_PortMapping_ContainerPort + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'h': + + if bytes.Equal(ffj_key_NetworkInfo_PortMapping_HostPort, kn) { + currentKey = ffj_t_NetworkInfo_PortMapping_HostPort + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_NetworkInfo_PortMapping_Protocol, kn) { + currentKey = ffj_t_NetworkInfo_PortMapping_Protocol + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_NetworkInfo_PortMapping_Protocol, kn) { + currentKey = ffj_t_NetworkInfo_PortMapping_Protocol + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_NetworkInfo_PortMapping_ContainerPort, kn) { + currentKey = ffj_t_NetworkInfo_PortMapping_ContainerPort + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_NetworkInfo_PortMapping_HostPort, kn) { + currentKey = ffj_t_NetworkInfo_PortMapping_HostPort + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_NetworkInfo_PortMappingno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_NetworkInfo_PortMapping_HostPort: + goto handle_HostPort + + case ffj_t_NetworkInfo_PortMapping_ContainerPort: + goto handle_ContainerPort + + case ffj_t_NetworkInfo_PortMapping_Protocol: + goto handle_Protocol + + case ffj_t_NetworkInfo_PortMappingno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_HostPort: + + /* handler: uj.HostPort type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + uj.HostPort = uint32(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ContainerPort: + + /* handler: uj.ContainerPort type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + uj.ContainerPort = uint32(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Protocol: + + /* handler: uj.Protocol type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Protocol = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Protocol = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Offer) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Offer) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "id":`) + + { + + err = mj.ID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteString(`,"framework_id":`) + + { + + err = mj.FrameworkID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteString(`,"agent_id":`) + + { + + err = mj.AgentID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteString(`,"hostname":`) + fflib.WriteJsonString(buf, string(mj.Hostname)) + buf.WriteByte(',') + if mj.URL != nil { + if true { + buf.WriteString(`"url":`) + + { + + err = mj.URL.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Domain != nil { + if true { + buf.WriteString(`"domain":`) + + { + + err = mj.Domain.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"resources":`) + if mj.Resources != nil { + buf.WriteString(`[`) + for i, v := range mj.Resources { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteString(`,"attributes":`) + if mj.Attributes != nil { + buf.WriteString(`[`) + for i, v := range mj.Attributes { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteString(`,"executor_ids":`) + if mj.ExecutorIDs != nil { + buf.WriteString(`[`) + for i, v := range mj.ExecutorIDs { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.Unavailability != nil { + if true { + buf.WriteString(`"unavailability":`) + + { + + err = mj.Unavailability.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.AllocationInfo != nil { + if true { + buf.WriteString(`"allocation_info":`) + + { + + err = mj.AllocationInfo.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Offerbase = iota + ffj_t_Offerno_such_key + + ffj_t_Offer_ID + + ffj_t_Offer_FrameworkID + + ffj_t_Offer_AgentID + + ffj_t_Offer_Hostname + + ffj_t_Offer_URL + + ffj_t_Offer_Domain + + ffj_t_Offer_Resources + + ffj_t_Offer_Attributes + + ffj_t_Offer_ExecutorIDs + + ffj_t_Offer_Unavailability + + ffj_t_Offer_AllocationInfo +) + +var ffj_key_Offer_ID = []byte("id") + +var ffj_key_Offer_FrameworkID = []byte("framework_id") + +var ffj_key_Offer_AgentID = []byte("agent_id") + +var ffj_key_Offer_Hostname = []byte("hostname") + +var ffj_key_Offer_URL = []byte("url") + +var ffj_key_Offer_Domain = []byte("domain") + +var ffj_key_Offer_Resources = []byte("resources") + +var ffj_key_Offer_Attributes = []byte("attributes") + +var ffj_key_Offer_ExecutorIDs = []byte("executor_ids") + +var ffj_key_Offer_Unavailability = []byte("unavailability") + +var ffj_key_Offer_AllocationInfo = []byte("allocation_info") + +func (uj *Offer) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Offer) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Offerbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Offerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'a': + + if bytes.Equal(ffj_key_Offer_AgentID, kn) { + currentKey = ffj_t_Offer_AgentID + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Offer_Attributes, kn) { + currentKey = ffj_t_Offer_Attributes + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Offer_AllocationInfo, kn) { + currentKey = ffj_t_Offer_AllocationInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'd': + + if bytes.Equal(ffj_key_Offer_Domain, kn) { + currentKey = ffj_t_Offer_Domain + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'e': + + if bytes.Equal(ffj_key_Offer_ExecutorIDs, kn) { + currentKey = ffj_t_Offer_ExecutorIDs + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'f': + + if bytes.Equal(ffj_key_Offer_FrameworkID, kn) { + currentKey = ffj_t_Offer_FrameworkID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'h': + + if bytes.Equal(ffj_key_Offer_Hostname, kn) { + currentKey = ffj_t_Offer_Hostname + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'i': + + if bytes.Equal(ffj_key_Offer_ID, kn) { + currentKey = ffj_t_Offer_ID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_Offer_Resources, kn) { + currentKey = ffj_t_Offer_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'u': + + if bytes.Equal(ffj_key_Offer_URL, kn) { + currentKey = ffj_t_Offer_URL + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Offer_Unavailability, kn) { + currentKey = ffj_t_Offer_Unavailability + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_Offer_AllocationInfo, kn) { + currentKey = ffj_t_Offer_AllocationInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Offer_Unavailability, kn) { + currentKey = ffj_t_Offer_Unavailability + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Offer_ExecutorIDs, kn) { + currentKey = ffj_t_Offer_ExecutorIDs + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Offer_Attributes, kn) { + currentKey = ffj_t_Offer_Attributes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Offer_Resources, kn) { + currentKey = ffj_t_Offer_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Offer_Domain, kn) { + currentKey = ffj_t_Offer_Domain + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Offer_URL, kn) { + currentKey = ffj_t_Offer_URL + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Offer_Hostname, kn) { + currentKey = ffj_t_Offer_Hostname + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Offer_AgentID, kn) { + currentKey = ffj_t_Offer_AgentID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Offer_FrameworkID, kn) { + currentKey = ffj_t_Offer_FrameworkID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Offer_ID, kn) { + currentKey = ffj_t_Offer_ID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Offerno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Offer_ID: + goto handle_ID + + case ffj_t_Offer_FrameworkID: + goto handle_FrameworkID + + case ffj_t_Offer_AgentID: + goto handle_AgentID + + case ffj_t_Offer_Hostname: + goto handle_Hostname + + case ffj_t_Offer_URL: + goto handle_URL + + case ffj_t_Offer_Domain: + goto handle_Domain + + case ffj_t_Offer_Resources: + goto handle_Resources + + case ffj_t_Offer_Attributes: + goto handle_Attributes + + case ffj_t_Offer_ExecutorIDs: + goto handle_ExecutorIDs + + case ffj_t_Offer_Unavailability: + goto handle_Unavailability + + case ffj_t_Offer_AllocationInfo: + goto handle_AllocationInfo + + case ffj_t_Offerno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ID: + + /* handler: uj.ID type=mesos.OfferID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.ID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_FrameworkID: + + /* handler: uj.FrameworkID type=mesos.FrameworkID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.FrameworkID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_AgentID: + + /* handler: uj.AgentID type=mesos.AgentID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.AgentID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Hostname: + + /* handler: uj.Hostname type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Hostname = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_URL: + + /* handler: uj.URL type=mesos.URL kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.URL = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.URL == nil { + uj.URL = new(URL) + } + + err = uj.URL.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Domain: + + /* handler: uj.Domain type=mesos.DomainInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Domain = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Domain == nil { + uj.Domain = new(DomainInfo) + } + + err = uj.Domain.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Resources: + + /* handler: uj.Resources type=[]mesos.Resource kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Resources = nil + } else { + + uj.Resources = []Resource{} + + wantVal := true + + for { + + var tmp_uj__Resources Resource + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Resources type=mesos.Resource kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Resources.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Resources = append(uj.Resources, tmp_uj__Resources) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Attributes: + + /* handler: uj.Attributes type=[]mesos.Attribute kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Attributes = nil + } else { + + uj.Attributes = []Attribute{} + + wantVal := true + + for { + + var tmp_uj__Attributes Attribute + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Attributes type=mesos.Attribute kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Attributes.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Attributes = append(uj.Attributes, tmp_uj__Attributes) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ExecutorIDs: + + /* handler: uj.ExecutorIDs type=[]mesos.ExecutorID kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.ExecutorIDs = nil + } else { + + uj.ExecutorIDs = []ExecutorID{} + + wantVal := true + + for { + + var tmp_uj__ExecutorIDs ExecutorID + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__ExecutorIDs type=mesos.ExecutorID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__ExecutorIDs.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.ExecutorIDs = append(uj.ExecutorIDs, tmp_uj__ExecutorIDs) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Unavailability: + + /* handler: uj.Unavailability type=mesos.Unavailability kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Unavailability = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Unavailability == nil { + uj.Unavailability = new(Unavailability) + } + + err = uj.Unavailability.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_AllocationInfo: + + /* handler: uj.AllocationInfo type=mesos.Resource_AllocationInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.AllocationInfo = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.AllocationInfo == nil { + uj.AllocationInfo = new(Resource_AllocationInfo) + } + + err = uj.AllocationInfo.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *OfferID) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *OfferID) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"value":`) + fflib.WriteJsonString(buf, string(mj.Value)) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_OfferIDbase = iota + ffj_t_OfferIDno_such_key + + ffj_t_OfferID_Value +) + +var ffj_key_OfferID_Value = []byte("value") + +func (uj *OfferID) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *OfferID) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_OfferIDbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_OfferIDno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'v': + + if bytes.Equal(ffj_key_OfferID_Value, kn) { + currentKey = ffj_t_OfferID_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_OfferID_Value, kn) { + currentKey = ffj_t_OfferID_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_OfferIDno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_OfferID_Value: + goto handle_Value + + case ffj_t_OfferIDno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Value: + + /* handler: uj.Value type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Value = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Offer_Operation) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Offer_Operation) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + if mj.ID != nil { + if true { + buf.WriteString(`"id":`) + + { + + err = mj.ID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Launch != nil { + if true { + buf.WriteString(`"launch":`) + + { + + err = mj.Launch.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.LaunchGroup != nil { + if true { + buf.WriteString(`"launch_group":`) + + { + + err = mj.LaunchGroup.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Reserve != nil { + if true { + buf.WriteString(`"reserve":`) + + { + + err = mj.Reserve.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Unreserve != nil { + if true { + buf.WriteString(`"unreserve":`) + + { + + err = mj.Unreserve.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Create != nil { + if true { + buf.WriteString(`"create":`) + + { + + err = mj.Create.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Destroy != nil { + if true { + buf.WriteString(`"destroy":`) + + { + + err = mj.Destroy.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.CreateVolume != nil { + if true { + buf.WriteString(`"create_volume":`) + + { + + err = mj.CreateVolume.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.DestroyVolume != nil { + if true { + buf.WriteString(`"destroy_volume":`) + + { + + err = mj.DestroyVolume.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.CreateBlock != nil { + if true { + buf.WriteString(`"create_block":`) + + { + + err = mj.CreateBlock.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.DestroyBlock != nil { + if true { + buf.WriteString(`"destroy_block":`) + + { + + err = mj.DestroyBlock.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Offer_Operationbase = iota + ffj_t_Offer_Operationno_such_key + + ffj_t_Offer_Operation_Type + + ffj_t_Offer_Operation_ID + + ffj_t_Offer_Operation_Launch + + ffj_t_Offer_Operation_LaunchGroup + + ffj_t_Offer_Operation_Reserve + + ffj_t_Offer_Operation_Unreserve + + ffj_t_Offer_Operation_Create + + ffj_t_Offer_Operation_Destroy + + ffj_t_Offer_Operation_CreateVolume + + ffj_t_Offer_Operation_DestroyVolume + + ffj_t_Offer_Operation_CreateBlock + + ffj_t_Offer_Operation_DestroyBlock +) + +var ffj_key_Offer_Operation_Type = []byte("type") + +var ffj_key_Offer_Operation_ID = []byte("id") + +var ffj_key_Offer_Operation_Launch = []byte("launch") + +var ffj_key_Offer_Operation_LaunchGroup = []byte("launch_group") + +var ffj_key_Offer_Operation_Reserve = []byte("reserve") + +var ffj_key_Offer_Operation_Unreserve = []byte("unreserve") + +var ffj_key_Offer_Operation_Create = []byte("create") + +var ffj_key_Offer_Operation_Destroy = []byte("destroy") + +var ffj_key_Offer_Operation_CreateVolume = []byte("create_volume") + +var ffj_key_Offer_Operation_DestroyVolume = []byte("destroy_volume") + +var ffj_key_Offer_Operation_CreateBlock = []byte("create_block") + +var ffj_key_Offer_Operation_DestroyBlock = []byte("destroy_block") + +func (uj *Offer_Operation) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Offer_Operation) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Offer_Operationbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Offer_Operationno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_Offer_Operation_Create, kn) { + currentKey = ffj_t_Offer_Operation_Create + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Offer_Operation_CreateVolume, kn) { + currentKey = ffj_t_Offer_Operation_CreateVolume + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Offer_Operation_CreateBlock, kn) { + currentKey = ffj_t_Offer_Operation_CreateBlock + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'd': + + if bytes.Equal(ffj_key_Offer_Operation_Destroy, kn) { + currentKey = ffj_t_Offer_Operation_Destroy + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Offer_Operation_DestroyVolume, kn) { + currentKey = ffj_t_Offer_Operation_DestroyVolume + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Offer_Operation_DestroyBlock, kn) { + currentKey = ffj_t_Offer_Operation_DestroyBlock + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'i': + + if bytes.Equal(ffj_key_Offer_Operation_ID, kn) { + currentKey = ffj_t_Offer_Operation_ID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'l': + + if bytes.Equal(ffj_key_Offer_Operation_Launch, kn) { + currentKey = ffj_t_Offer_Operation_Launch + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Offer_Operation_LaunchGroup, kn) { + currentKey = ffj_t_Offer_Operation_LaunchGroup + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_Offer_Operation_Reserve, kn) { + currentKey = ffj_t_Offer_Operation_Reserve + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_Offer_Operation_Type, kn) { + currentKey = ffj_t_Offer_Operation_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'u': + + if bytes.Equal(ffj_key_Offer_Operation_Unreserve, kn) { + currentKey = ffj_t_Offer_Operation_Unreserve + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Offer_Operation_DestroyBlock, kn) { + currentKey = ffj_t_Offer_Operation_DestroyBlock + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Offer_Operation_CreateBlock, kn) { + currentKey = ffj_t_Offer_Operation_CreateBlock + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Offer_Operation_DestroyVolume, kn) { + currentKey = ffj_t_Offer_Operation_DestroyVolume + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Offer_Operation_CreateVolume, kn) { + currentKey = ffj_t_Offer_Operation_CreateVolume + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Offer_Operation_Destroy, kn) { + currentKey = ffj_t_Offer_Operation_Destroy + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Offer_Operation_Create, kn) { + currentKey = ffj_t_Offer_Operation_Create + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Offer_Operation_Unreserve, kn) { + currentKey = ffj_t_Offer_Operation_Unreserve + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Offer_Operation_Reserve, kn) { + currentKey = ffj_t_Offer_Operation_Reserve + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Offer_Operation_LaunchGroup, kn) { + currentKey = ffj_t_Offer_Operation_LaunchGroup + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Offer_Operation_Launch, kn) { + currentKey = ffj_t_Offer_Operation_Launch + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Offer_Operation_ID, kn) { + currentKey = ffj_t_Offer_Operation_ID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Offer_Operation_Type, kn) { + currentKey = ffj_t_Offer_Operation_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Offer_Operationno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Offer_Operation_Type: + goto handle_Type + + case ffj_t_Offer_Operation_ID: + goto handle_ID + + case ffj_t_Offer_Operation_Launch: + goto handle_Launch + + case ffj_t_Offer_Operation_LaunchGroup: + goto handle_LaunchGroup + + case ffj_t_Offer_Operation_Reserve: + goto handle_Reserve + + case ffj_t_Offer_Operation_Unreserve: + goto handle_Unreserve + + case ffj_t_Offer_Operation_Create: + goto handle_Create + + case ffj_t_Offer_Operation_Destroy: + goto handle_Destroy + + case ffj_t_Offer_Operation_CreateVolume: + goto handle_CreateVolume + + case ffj_t_Offer_Operation_DestroyVolume: + goto handle_DestroyVolume + + case ffj_t_Offer_Operation_CreateBlock: + goto handle_CreateBlock + + case ffj_t_Offer_Operation_DestroyBlock: + goto handle_DestroyBlock + + case ffj_t_Offer_Operationno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=mesos.Offer_Operation_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ID: + + /* handler: uj.ID type=mesos.OperationID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.ID = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.ID == nil { + uj.ID = new(OperationID) + } + + err = uj.ID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Launch: + + /* handler: uj.Launch type=mesos.Offer_Operation_Launch kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Launch = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Launch == nil { + uj.Launch = new(Offer_Operation_Launch) + } + + err = uj.Launch.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_LaunchGroup: + + /* handler: uj.LaunchGroup type=mesos.Offer_Operation_LaunchGroup kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.LaunchGroup = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.LaunchGroup == nil { + uj.LaunchGroup = new(Offer_Operation_LaunchGroup) + } + + err = uj.LaunchGroup.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Reserve: + + /* handler: uj.Reserve type=mesos.Offer_Operation_Reserve kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Reserve = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Reserve == nil { + uj.Reserve = new(Offer_Operation_Reserve) + } + + err = uj.Reserve.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Unreserve: + + /* handler: uj.Unreserve type=mesos.Offer_Operation_Unreserve kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Unreserve = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Unreserve == nil { + uj.Unreserve = new(Offer_Operation_Unreserve) + } + + err = uj.Unreserve.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Create: + + /* handler: uj.Create type=mesos.Offer_Operation_Create kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Create = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Create == nil { + uj.Create = new(Offer_Operation_Create) + } + + err = uj.Create.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Destroy: + + /* handler: uj.Destroy type=mesos.Offer_Operation_Destroy kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Destroy = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Destroy == nil { + uj.Destroy = new(Offer_Operation_Destroy) + } + + err = uj.Destroy.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_CreateVolume: + + /* handler: uj.CreateVolume type=mesos.Offer_Operation_CreateVolume kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.CreateVolume = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.CreateVolume == nil { + uj.CreateVolume = new(Offer_Operation_CreateVolume) + } + + err = uj.CreateVolume.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_DestroyVolume: + + /* handler: uj.DestroyVolume type=mesos.Offer_Operation_DestroyVolume kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.DestroyVolume = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.DestroyVolume == nil { + uj.DestroyVolume = new(Offer_Operation_DestroyVolume) + } + + err = uj.DestroyVolume.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_CreateBlock: + + /* handler: uj.CreateBlock type=mesos.Offer_Operation_CreateBlock kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.CreateBlock = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.CreateBlock == nil { + uj.CreateBlock = new(Offer_Operation_CreateBlock) + } + + err = uj.CreateBlock.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_DestroyBlock: + + /* handler: uj.DestroyBlock type=mesos.Offer_Operation_DestroyBlock kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.DestroyBlock = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.DestroyBlock == nil { + uj.DestroyBlock = new(Offer_Operation_DestroyBlock) + } + + err = uj.DestroyBlock.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Offer_Operation_Create) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Offer_Operation_Create) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"volumes":`) + if mj.Volumes != nil { + buf.WriteString(`[`) + for i, v := range mj.Volumes { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Offer_Operation_Createbase = iota + ffj_t_Offer_Operation_Createno_such_key + + ffj_t_Offer_Operation_Create_Volumes +) + +var ffj_key_Offer_Operation_Create_Volumes = []byte("volumes") + +func (uj *Offer_Operation_Create) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Offer_Operation_Create) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Offer_Operation_Createbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Offer_Operation_Createno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'v': + + if bytes.Equal(ffj_key_Offer_Operation_Create_Volumes, kn) { + currentKey = ffj_t_Offer_Operation_Create_Volumes + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Offer_Operation_Create_Volumes, kn) { + currentKey = ffj_t_Offer_Operation_Create_Volumes + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Offer_Operation_Createno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Offer_Operation_Create_Volumes: + goto handle_Volumes + + case ffj_t_Offer_Operation_Createno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Volumes: + + /* handler: uj.Volumes type=[]mesos.Resource kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Volumes = nil + } else { + + uj.Volumes = []Resource{} + + wantVal := true + + for { + + var tmp_uj__Volumes Resource + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Volumes type=mesos.Resource kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Volumes.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Volumes = append(uj.Volumes, tmp_uj__Volumes) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Offer_Operation_CreateBlock) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Offer_Operation_CreateBlock) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"source":`) + + { + + err = mj.Source.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Offer_Operation_CreateBlockbase = iota + ffj_t_Offer_Operation_CreateBlockno_such_key + + ffj_t_Offer_Operation_CreateBlock_Source +) + +var ffj_key_Offer_Operation_CreateBlock_Source = []byte("source") + +func (uj *Offer_Operation_CreateBlock) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Offer_Operation_CreateBlock) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Offer_Operation_CreateBlockbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Offer_Operation_CreateBlockno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 's': + + if bytes.Equal(ffj_key_Offer_Operation_CreateBlock_Source, kn) { + currentKey = ffj_t_Offer_Operation_CreateBlock_Source + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Offer_Operation_CreateBlock_Source, kn) { + currentKey = ffj_t_Offer_Operation_CreateBlock_Source + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Offer_Operation_CreateBlockno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Offer_Operation_CreateBlock_Source: + goto handle_Source + + case ffj_t_Offer_Operation_CreateBlockno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Source: + + /* handler: uj.Source type=mesos.Resource kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.Source.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Offer_Operation_CreateVolume) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Offer_Operation_CreateVolume) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"source":`) + + { + + err = mj.Source.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteString(`,"target_type":`) + + { + + obj, err = mj.TargetType.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Offer_Operation_CreateVolumebase = iota + ffj_t_Offer_Operation_CreateVolumeno_such_key + + ffj_t_Offer_Operation_CreateVolume_Source + + ffj_t_Offer_Operation_CreateVolume_TargetType +) + +var ffj_key_Offer_Operation_CreateVolume_Source = []byte("source") + +var ffj_key_Offer_Operation_CreateVolume_TargetType = []byte("target_type") + +func (uj *Offer_Operation_CreateVolume) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Offer_Operation_CreateVolume) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Offer_Operation_CreateVolumebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Offer_Operation_CreateVolumeno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 's': + + if bytes.Equal(ffj_key_Offer_Operation_CreateVolume_Source, kn) { + currentKey = ffj_t_Offer_Operation_CreateVolume_Source + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_Offer_Operation_CreateVolume_TargetType, kn) { + currentKey = ffj_t_Offer_Operation_CreateVolume_TargetType + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_Offer_Operation_CreateVolume_TargetType, kn) { + currentKey = ffj_t_Offer_Operation_CreateVolume_TargetType + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Offer_Operation_CreateVolume_Source, kn) { + currentKey = ffj_t_Offer_Operation_CreateVolume_Source + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Offer_Operation_CreateVolumeno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Offer_Operation_CreateVolume_Source: + goto handle_Source + + case ffj_t_Offer_Operation_CreateVolume_TargetType: + goto handle_TargetType + + case ffj_t_Offer_Operation_CreateVolumeno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Source: + + /* handler: uj.Source type=mesos.Resource kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.Source.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_TargetType: + + /* handler: uj.TargetType type=mesos.Resource_DiskInfo_Source_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.TargetType.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Offer_Operation_Destroy) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Offer_Operation_Destroy) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"volumes":`) + if mj.Volumes != nil { + buf.WriteString(`[`) + for i, v := range mj.Volumes { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Offer_Operation_Destroybase = iota + ffj_t_Offer_Operation_Destroyno_such_key + + ffj_t_Offer_Operation_Destroy_Volumes +) + +var ffj_key_Offer_Operation_Destroy_Volumes = []byte("volumes") + +func (uj *Offer_Operation_Destroy) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Offer_Operation_Destroy) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Offer_Operation_Destroybase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Offer_Operation_Destroyno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'v': + + if bytes.Equal(ffj_key_Offer_Operation_Destroy_Volumes, kn) { + currentKey = ffj_t_Offer_Operation_Destroy_Volumes + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Offer_Operation_Destroy_Volumes, kn) { + currentKey = ffj_t_Offer_Operation_Destroy_Volumes + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Offer_Operation_Destroyno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Offer_Operation_Destroy_Volumes: + goto handle_Volumes + + case ffj_t_Offer_Operation_Destroyno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Volumes: + + /* handler: uj.Volumes type=[]mesos.Resource kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Volumes = nil + } else { + + uj.Volumes = []Resource{} + + wantVal := true + + for { + + var tmp_uj__Volumes Resource + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Volumes type=mesos.Resource kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Volumes.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Volumes = append(uj.Volumes, tmp_uj__Volumes) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Offer_Operation_DestroyBlock) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Offer_Operation_DestroyBlock) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"block":`) + + { + + err = mj.Block.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Offer_Operation_DestroyBlockbase = iota + ffj_t_Offer_Operation_DestroyBlockno_such_key + + ffj_t_Offer_Operation_DestroyBlock_Block +) + +var ffj_key_Offer_Operation_DestroyBlock_Block = []byte("block") + +func (uj *Offer_Operation_DestroyBlock) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Offer_Operation_DestroyBlock) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Offer_Operation_DestroyBlockbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Offer_Operation_DestroyBlockno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'b': + + if bytes.Equal(ffj_key_Offer_Operation_DestroyBlock_Block, kn) { + currentKey = ffj_t_Offer_Operation_DestroyBlock_Block + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Offer_Operation_DestroyBlock_Block, kn) { + currentKey = ffj_t_Offer_Operation_DestroyBlock_Block + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Offer_Operation_DestroyBlockno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Offer_Operation_DestroyBlock_Block: + goto handle_Block + + case ffj_t_Offer_Operation_DestroyBlockno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Block: + + /* handler: uj.Block type=mesos.Resource kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.Block.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Offer_Operation_DestroyVolume) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Offer_Operation_DestroyVolume) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"volume":`) + + { + + err = mj.Volume.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Offer_Operation_DestroyVolumebase = iota + ffj_t_Offer_Operation_DestroyVolumeno_such_key + + ffj_t_Offer_Operation_DestroyVolume_Volume +) + +var ffj_key_Offer_Operation_DestroyVolume_Volume = []byte("volume") + +func (uj *Offer_Operation_DestroyVolume) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Offer_Operation_DestroyVolume) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Offer_Operation_DestroyVolumebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Offer_Operation_DestroyVolumeno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'v': + + if bytes.Equal(ffj_key_Offer_Operation_DestroyVolume_Volume, kn) { + currentKey = ffj_t_Offer_Operation_DestroyVolume_Volume + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Offer_Operation_DestroyVolume_Volume, kn) { + currentKey = ffj_t_Offer_Operation_DestroyVolume_Volume + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Offer_Operation_DestroyVolumeno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Offer_Operation_DestroyVolume_Volume: + goto handle_Volume + + case ffj_t_Offer_Operation_DestroyVolumeno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Volume: + + /* handler: uj.Volume type=mesos.Resource kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.Volume.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Offer_Operation_Launch) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Offer_Operation_Launch) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"task_infos":`) + if mj.TaskInfos != nil { + buf.WriteString(`[`) + for i, v := range mj.TaskInfos { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Offer_Operation_Launchbase = iota + ffj_t_Offer_Operation_Launchno_such_key + + ffj_t_Offer_Operation_Launch_TaskInfos +) + +var ffj_key_Offer_Operation_Launch_TaskInfos = []byte("task_infos") + +func (uj *Offer_Operation_Launch) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Offer_Operation_Launch) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Offer_Operation_Launchbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Offer_Operation_Launchno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 't': + + if bytes.Equal(ffj_key_Offer_Operation_Launch_TaskInfos, kn) { + currentKey = ffj_t_Offer_Operation_Launch_TaskInfos + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Offer_Operation_Launch_TaskInfos, kn) { + currentKey = ffj_t_Offer_Operation_Launch_TaskInfos + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Offer_Operation_Launchno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Offer_Operation_Launch_TaskInfos: + goto handle_TaskInfos + + case ffj_t_Offer_Operation_Launchno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_TaskInfos: + + /* handler: uj.TaskInfos type=[]mesos.TaskInfo kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.TaskInfos = nil + } else { + + uj.TaskInfos = []TaskInfo{} + + wantVal := true + + for { + + var tmp_uj__TaskInfos TaskInfo + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__TaskInfos type=mesos.TaskInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__TaskInfos.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.TaskInfos = append(uj.TaskInfos, tmp_uj__TaskInfos) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Offer_Operation_LaunchGroup) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Offer_Operation_LaunchGroup) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"executor":`) + + { + + err = mj.Executor.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteString(`,"task_group":`) + + { + + err = mj.TaskGroup.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Offer_Operation_LaunchGroupbase = iota + ffj_t_Offer_Operation_LaunchGroupno_such_key + + ffj_t_Offer_Operation_LaunchGroup_Executor + + ffj_t_Offer_Operation_LaunchGroup_TaskGroup +) + +var ffj_key_Offer_Operation_LaunchGroup_Executor = []byte("executor") + +var ffj_key_Offer_Operation_LaunchGroup_TaskGroup = []byte("task_group") + +func (uj *Offer_Operation_LaunchGroup) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Offer_Operation_LaunchGroup) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Offer_Operation_LaunchGroupbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Offer_Operation_LaunchGroupno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'e': + + if bytes.Equal(ffj_key_Offer_Operation_LaunchGroup_Executor, kn) { + currentKey = ffj_t_Offer_Operation_LaunchGroup_Executor + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_Offer_Operation_LaunchGroup_TaskGroup, kn) { + currentKey = ffj_t_Offer_Operation_LaunchGroup_TaskGroup + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Offer_Operation_LaunchGroup_TaskGroup, kn) { + currentKey = ffj_t_Offer_Operation_LaunchGroup_TaskGroup + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Offer_Operation_LaunchGroup_Executor, kn) { + currentKey = ffj_t_Offer_Operation_LaunchGroup_Executor + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Offer_Operation_LaunchGroupno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Offer_Operation_LaunchGroup_Executor: + goto handle_Executor + + case ffj_t_Offer_Operation_LaunchGroup_TaskGroup: + goto handle_TaskGroup + + case ffj_t_Offer_Operation_LaunchGroupno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Executor: + + /* handler: uj.Executor type=mesos.ExecutorInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.Executor.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_TaskGroup: + + /* handler: uj.TaskGroup type=mesos.TaskGroupInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.TaskGroup.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Offer_Operation_Reserve) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Offer_Operation_Reserve) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"resources":`) + if mj.Resources != nil { + buf.WriteString(`[`) + for i, v := range mj.Resources { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Offer_Operation_Reservebase = iota + ffj_t_Offer_Operation_Reserveno_such_key + + ffj_t_Offer_Operation_Reserve_Resources +) + +var ffj_key_Offer_Operation_Reserve_Resources = []byte("resources") + +func (uj *Offer_Operation_Reserve) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Offer_Operation_Reserve) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Offer_Operation_Reservebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Offer_Operation_Reserveno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'r': + + if bytes.Equal(ffj_key_Offer_Operation_Reserve_Resources, kn) { + currentKey = ffj_t_Offer_Operation_Reserve_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Offer_Operation_Reserve_Resources, kn) { + currentKey = ffj_t_Offer_Operation_Reserve_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Offer_Operation_Reserveno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Offer_Operation_Reserve_Resources: + goto handle_Resources + + case ffj_t_Offer_Operation_Reserveno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Resources: + + /* handler: uj.Resources type=[]mesos.Resource kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Resources = nil + } else { + + uj.Resources = []Resource{} + + wantVal := true + + for { + + var tmp_uj__Resources Resource + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Resources type=mesos.Resource kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Resources.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Resources = append(uj.Resources, tmp_uj__Resources) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Offer_Operation_Unreserve) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Offer_Operation_Unreserve) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"resources":`) + if mj.Resources != nil { + buf.WriteString(`[`) + for i, v := range mj.Resources { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Offer_Operation_Unreservebase = iota + ffj_t_Offer_Operation_Unreserveno_such_key + + ffj_t_Offer_Operation_Unreserve_Resources +) + +var ffj_key_Offer_Operation_Unreserve_Resources = []byte("resources") + +func (uj *Offer_Operation_Unreserve) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Offer_Operation_Unreserve) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Offer_Operation_Unreservebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Offer_Operation_Unreserveno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'r': + + if bytes.Equal(ffj_key_Offer_Operation_Unreserve_Resources, kn) { + currentKey = ffj_t_Offer_Operation_Unreserve_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Offer_Operation_Unreserve_Resources, kn) { + currentKey = ffj_t_Offer_Operation_Unreserve_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Offer_Operation_Unreserveno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Offer_Operation_Unreserve_Resources: + goto handle_Resources + + case ffj_t_Offer_Operation_Unreserveno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Resources: + + /* handler: uj.Resources type=[]mesos.Resource kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Resources = nil + } else { + + uj.Resources = []Resource{} + + wantVal := true + + for { + + var tmp_uj__Resources Resource + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Resources type=mesos.Resource kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Resources.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Resources = append(uj.Resources, tmp_uj__Resources) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Operation) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Operation) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteByte('{') + if mj.FrameworkID != nil { + if true { + buf.WriteString(`"framework_id":`) + + { + + err = mj.FrameworkID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.AgentID != nil { + if true { + buf.WriteString(`"agent_id":`) + + { + + err = mj.AgentID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"info":`) + + { + + err = mj.Info.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteString(`,"latest_status":`) + + { + + err = mj.LatestStatus.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteString(`,"statuses":`) + if mj.Statuses != nil { + buf.WriteString(`[`) + for i, v := range mj.Statuses { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteString(`,"uuid":`) + + { + + err = mj.UUID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Operationbase = iota + ffj_t_Operationno_such_key + + ffj_t_Operation_FrameworkID + + ffj_t_Operation_AgentID + + ffj_t_Operation_Info + + ffj_t_Operation_LatestStatus + + ffj_t_Operation_Statuses + + ffj_t_Operation_UUID +) + +var ffj_key_Operation_FrameworkID = []byte("framework_id") + +var ffj_key_Operation_AgentID = []byte("agent_id") + +var ffj_key_Operation_Info = []byte("info") + +var ffj_key_Operation_LatestStatus = []byte("latest_status") + +var ffj_key_Operation_Statuses = []byte("statuses") + +var ffj_key_Operation_UUID = []byte("uuid") + +func (uj *Operation) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Operation) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Operationbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Operationno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'a': + + if bytes.Equal(ffj_key_Operation_AgentID, kn) { + currentKey = ffj_t_Operation_AgentID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'f': + + if bytes.Equal(ffj_key_Operation_FrameworkID, kn) { + currentKey = ffj_t_Operation_FrameworkID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'i': + + if bytes.Equal(ffj_key_Operation_Info, kn) { + currentKey = ffj_t_Operation_Info + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'l': + + if bytes.Equal(ffj_key_Operation_LatestStatus, kn) { + currentKey = ffj_t_Operation_LatestStatus + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_Operation_Statuses, kn) { + currentKey = ffj_t_Operation_Statuses + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'u': + + if bytes.Equal(ffj_key_Operation_UUID, kn) { + currentKey = ffj_t_Operation_UUID + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Operation_UUID, kn) { + currentKey = ffj_t_Operation_UUID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Operation_Statuses, kn) { + currentKey = ffj_t_Operation_Statuses + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Operation_LatestStatus, kn) { + currentKey = ffj_t_Operation_LatestStatus + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Operation_Info, kn) { + currentKey = ffj_t_Operation_Info + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Operation_AgentID, kn) { + currentKey = ffj_t_Operation_AgentID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Operation_FrameworkID, kn) { + currentKey = ffj_t_Operation_FrameworkID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Operationno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Operation_FrameworkID: + goto handle_FrameworkID + + case ffj_t_Operation_AgentID: + goto handle_AgentID + + case ffj_t_Operation_Info: + goto handle_Info + + case ffj_t_Operation_LatestStatus: + goto handle_LatestStatus + + case ffj_t_Operation_Statuses: + goto handle_Statuses + + case ffj_t_Operation_UUID: + goto handle_UUID + + case ffj_t_Operationno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_FrameworkID: + + /* handler: uj.FrameworkID type=mesos.FrameworkID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.FrameworkID = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.FrameworkID == nil { + uj.FrameworkID = new(FrameworkID) + } + + err = uj.FrameworkID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_AgentID: + + /* handler: uj.AgentID type=mesos.AgentID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.AgentID = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.AgentID == nil { + uj.AgentID = new(AgentID) + } + + err = uj.AgentID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Info: + + /* handler: uj.Info type=mesos.Offer_Operation kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.Info.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_LatestStatus: + + /* handler: uj.LatestStatus type=mesos.OperationStatus kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.LatestStatus.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Statuses: + + /* handler: uj.Statuses type=[]mesos.OperationStatus kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Statuses = nil + } else { + + uj.Statuses = []OperationStatus{} + + wantVal := true + + for { + + var tmp_uj__Statuses OperationStatus + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Statuses type=mesos.OperationStatus kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Statuses.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Statuses = append(uj.Statuses, tmp_uj__Statuses) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_UUID: + + /* handler: uj.UUID type=mesos.UUID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.UUID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *OperationID) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *OperationID) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"value":`) + fflib.WriteJsonString(buf, string(mj.Value)) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_OperationIDbase = iota + ffj_t_OperationIDno_such_key + + ffj_t_OperationID_Value +) + +var ffj_key_OperationID_Value = []byte("value") + +func (uj *OperationID) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *OperationID) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_OperationIDbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_OperationIDno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'v': + + if bytes.Equal(ffj_key_OperationID_Value, kn) { + currentKey = ffj_t_OperationID_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_OperationID_Value, kn) { + currentKey = ffj_t_OperationID_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_OperationIDno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_OperationID_Value: + goto handle_Value + + case ffj_t_OperationIDno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Value: + + /* handler: uj.Value type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Value = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *OperationStatus) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *OperationStatus) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.OperationID != nil { + if true { + buf.WriteString(`"operation_id":`) + + { + + err = mj.OperationID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"state":`) + + { + + obj, err = mj.State.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + if mj.Message != nil { + if true { + buf.WriteString(`"message":`) + fflib.WriteJsonString(buf, string(*mj.Message)) + buf.WriteByte(',') + } + } + buf.WriteString(`"converted_resources":`) + if mj.ConvertedResources != nil { + buf.WriteString(`[`) + for i, v := range mj.ConvertedResources { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.UUID != nil { + if true { + buf.WriteString(`"uuid":`) + + { + + err = mj.UUID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_OperationStatusbase = iota + ffj_t_OperationStatusno_such_key + + ffj_t_OperationStatus_OperationID + + ffj_t_OperationStatus_State + + ffj_t_OperationStatus_Message + + ffj_t_OperationStatus_ConvertedResources + + ffj_t_OperationStatus_UUID +) + +var ffj_key_OperationStatus_OperationID = []byte("operation_id") + +var ffj_key_OperationStatus_State = []byte("state") + +var ffj_key_OperationStatus_Message = []byte("message") + +var ffj_key_OperationStatus_ConvertedResources = []byte("converted_resources") + +var ffj_key_OperationStatus_UUID = []byte("uuid") + +func (uj *OperationStatus) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *OperationStatus) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_OperationStatusbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_OperationStatusno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_OperationStatus_ConvertedResources, kn) { + currentKey = ffj_t_OperationStatus_ConvertedResources + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'm': + + if bytes.Equal(ffj_key_OperationStatus_Message, kn) { + currentKey = ffj_t_OperationStatus_Message + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'o': + + if bytes.Equal(ffj_key_OperationStatus_OperationID, kn) { + currentKey = ffj_t_OperationStatus_OperationID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_OperationStatus_State, kn) { + currentKey = ffj_t_OperationStatus_State + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'u': + + if bytes.Equal(ffj_key_OperationStatus_UUID, kn) { + currentKey = ffj_t_OperationStatus_UUID + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_OperationStatus_UUID, kn) { + currentKey = ffj_t_OperationStatus_UUID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_OperationStatus_ConvertedResources, kn) { + currentKey = ffj_t_OperationStatus_ConvertedResources + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_OperationStatus_Message, kn) { + currentKey = ffj_t_OperationStatus_Message + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_OperationStatus_State, kn) { + currentKey = ffj_t_OperationStatus_State + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_OperationStatus_OperationID, kn) { + currentKey = ffj_t_OperationStatus_OperationID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_OperationStatusno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_OperationStatus_OperationID: + goto handle_OperationID + + case ffj_t_OperationStatus_State: + goto handle_State + + case ffj_t_OperationStatus_Message: + goto handle_Message + + case ffj_t_OperationStatus_ConvertedResources: + goto handle_ConvertedResources + + case ffj_t_OperationStatus_UUID: + goto handle_UUID + + case ffj_t_OperationStatusno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_OperationID: + + /* handler: uj.OperationID type=mesos.OperationID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.OperationID = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.OperationID == nil { + uj.OperationID = new(OperationID) + } + + err = uj.OperationID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_State: + + /* handler: uj.State type=mesos.OperationState kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.State.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Message: + + /* handler: uj.Message type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Message = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Message = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ConvertedResources: + + /* handler: uj.ConvertedResources type=[]mesos.Resource kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.ConvertedResources = nil + } else { + + uj.ConvertedResources = []Resource{} + + wantVal := true + + for { + + var tmp_uj__ConvertedResources Resource + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__ConvertedResources type=mesos.Resource kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__ConvertedResources.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.ConvertedResources = append(uj.ConvertedResources, tmp_uj__ConvertedResources) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_UUID: + + /* handler: uj.UUID type=mesos.UUID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.UUID = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.UUID == nil { + uj.UUID = new(UUID) + } + + err = uj.UUID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Parameter) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Parameter) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"key":`) + fflib.WriteJsonString(buf, string(mj.Key)) + buf.WriteString(`,"value":`) + fflib.WriteJsonString(buf, string(mj.Value)) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Parameterbase = iota + ffj_t_Parameterno_such_key + + ffj_t_Parameter_Key + + ffj_t_Parameter_Value +) + +var ffj_key_Parameter_Key = []byte("key") + +var ffj_key_Parameter_Value = []byte("value") + +func (uj *Parameter) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Parameter) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Parameterbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Parameterno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'k': + + if bytes.Equal(ffj_key_Parameter_Key, kn) { + currentKey = ffj_t_Parameter_Key + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'v': + + if bytes.Equal(ffj_key_Parameter_Value, kn) { + currentKey = ffj_t_Parameter_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Parameter_Value, kn) { + currentKey = ffj_t_Parameter_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Parameter_Key, kn) { + currentKey = ffj_t_Parameter_Key + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Parameterno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Parameter_Key: + goto handle_Key + + case ffj_t_Parameter_Value: + goto handle_Value + + case ffj_t_Parameterno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Key: + + /* handler: uj.Key type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Key = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Value: + + /* handler: uj.Value type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Value = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Parameters) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Parameters) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"parameter":`) + if mj.Parameter != nil { + buf.WriteString(`[`) + for i, v := range mj.Parameter { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Parametersbase = iota + ffj_t_Parametersno_such_key + + ffj_t_Parameters_Parameter +) + +var ffj_key_Parameters_Parameter = []byte("parameter") + +func (uj *Parameters) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Parameters) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Parametersbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Parametersno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'p': + + if bytes.Equal(ffj_key_Parameters_Parameter, kn) { + currentKey = ffj_t_Parameters_Parameter + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Parameters_Parameter, kn) { + currentKey = ffj_t_Parameters_Parameter + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Parametersno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Parameters_Parameter: + goto handle_Parameter + + case ffj_t_Parametersno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Parameter: + + /* handler: uj.Parameter type=[]mesos.Parameter kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Parameter = nil + } else { + + uj.Parameter = []Parameter{} + + wantVal := true + + for { + + var tmp_uj__Parameter Parameter + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Parameter type=mesos.Parameter kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Parameter.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Parameter = append(uj.Parameter, tmp_uj__Parameter) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *PerfStatistics) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *PerfStatistics) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "timestamp":`) + fflib.AppendFloat(buf, float64(mj.Timestamp), 'g', -1, 64) + buf.WriteString(`,"duration":`) + fflib.AppendFloat(buf, float64(mj.Duration), 'g', -1, 64) + buf.WriteByte(',') + if mj.Cycles != nil { + if true { + buf.WriteString(`"cycles":`) + fflib.FormatBits2(buf, uint64(*mj.Cycles), 10, false) + buf.WriteByte(',') + } + } + if mj.StalledCyclesFrontend != nil { + if true { + buf.WriteString(`"stalled_cycles_frontend":`) + fflib.FormatBits2(buf, uint64(*mj.StalledCyclesFrontend), 10, false) + buf.WriteByte(',') + } + } + if mj.StalledCyclesBackend != nil { + if true { + buf.WriteString(`"stalled_cycles_backend":`) + fflib.FormatBits2(buf, uint64(*mj.StalledCyclesBackend), 10, false) + buf.WriteByte(',') + } + } + if mj.Instructions != nil { + if true { + buf.WriteString(`"instructions":`) + fflib.FormatBits2(buf, uint64(*mj.Instructions), 10, false) + buf.WriteByte(',') + } + } + if mj.CacheReferences != nil { + if true { + buf.WriteString(`"cache_references":`) + fflib.FormatBits2(buf, uint64(*mj.CacheReferences), 10, false) + buf.WriteByte(',') + } + } + if mj.CacheMisses != nil { + if true { + buf.WriteString(`"cache_misses":`) + fflib.FormatBits2(buf, uint64(*mj.CacheMisses), 10, false) + buf.WriteByte(',') + } + } + if mj.Branches != nil { + if true { + buf.WriteString(`"branches":`) + fflib.FormatBits2(buf, uint64(*mj.Branches), 10, false) + buf.WriteByte(',') + } + } + if mj.BranchMisses != nil { + if true { + buf.WriteString(`"branch_misses":`) + fflib.FormatBits2(buf, uint64(*mj.BranchMisses), 10, false) + buf.WriteByte(',') + } + } + if mj.BusCycles != nil { + if true { + buf.WriteString(`"bus_cycles":`) + fflib.FormatBits2(buf, uint64(*mj.BusCycles), 10, false) + buf.WriteByte(',') + } + } + if mj.RefCycles != nil { + if true { + buf.WriteString(`"ref_cycles":`) + fflib.FormatBits2(buf, uint64(*mj.RefCycles), 10, false) + buf.WriteByte(',') + } + } + if mj.CPUClock != nil { + if true { + buf.WriteString(`"cpu_clock":`) + fflib.AppendFloat(buf, float64(*mj.CPUClock), 'g', -1, 64) + buf.WriteByte(',') + } + } + if mj.TaskClock != nil { + if true { + buf.WriteString(`"task_clock":`) + fflib.AppendFloat(buf, float64(*mj.TaskClock), 'g', -1, 64) + buf.WriteByte(',') + } + } + if mj.PageFaults != nil { + if true { + buf.WriteString(`"page_faults":`) + fflib.FormatBits2(buf, uint64(*mj.PageFaults), 10, false) + buf.WriteByte(',') + } + } + if mj.MinorFaults != nil { + if true { + buf.WriteString(`"minor_faults":`) + fflib.FormatBits2(buf, uint64(*mj.MinorFaults), 10, false) + buf.WriteByte(',') + } + } + if mj.MajorFaults != nil { + if true { + buf.WriteString(`"major_faults":`) + fflib.FormatBits2(buf, uint64(*mj.MajorFaults), 10, false) + buf.WriteByte(',') + } + } + if mj.ContextSwitches != nil { + if true { + buf.WriteString(`"context_switches":`) + fflib.FormatBits2(buf, uint64(*mj.ContextSwitches), 10, false) + buf.WriteByte(',') + } + } + if mj.CPUMigrations != nil { + if true { + buf.WriteString(`"cpu_migrations":`) + fflib.FormatBits2(buf, uint64(*mj.CPUMigrations), 10, false) + buf.WriteByte(',') + } + } + if mj.AlignmentFaults != nil { + if true { + buf.WriteString(`"alignment_faults":`) + fflib.FormatBits2(buf, uint64(*mj.AlignmentFaults), 10, false) + buf.WriteByte(',') + } + } + if mj.EmulationFaults != nil { + if true { + buf.WriteString(`"emulation_faults":`) + fflib.FormatBits2(buf, uint64(*mj.EmulationFaults), 10, false) + buf.WriteByte(',') + } + } + if mj.L1DcacheLoads != nil { + if true { + buf.WriteString(`"l1_dcache_loads":`) + fflib.FormatBits2(buf, uint64(*mj.L1DcacheLoads), 10, false) + buf.WriteByte(',') + } + } + if mj.L1DcacheLoadMisses != nil { + if true { + buf.WriteString(`"l1_dcache_load_misses":`) + fflib.FormatBits2(buf, uint64(*mj.L1DcacheLoadMisses), 10, false) + buf.WriteByte(',') + } + } + if mj.L1DcacheStores != nil { + if true { + buf.WriteString(`"l1_dcache_stores":`) + fflib.FormatBits2(buf, uint64(*mj.L1DcacheStores), 10, false) + buf.WriteByte(',') + } + } + if mj.L1DcacheStoreMisses != nil { + if true { + buf.WriteString(`"l1_dcache_store_misses":`) + fflib.FormatBits2(buf, uint64(*mj.L1DcacheStoreMisses), 10, false) + buf.WriteByte(',') + } + } + if mj.L1DcachePrefetches != nil { + if true { + buf.WriteString(`"l1_dcache_prefetches":`) + fflib.FormatBits2(buf, uint64(*mj.L1DcachePrefetches), 10, false) + buf.WriteByte(',') + } + } + if mj.L1DcachePrefetchMisses != nil { + if true { + buf.WriteString(`"l1_dcache_prefetch_misses":`) + fflib.FormatBits2(buf, uint64(*mj.L1DcachePrefetchMisses), 10, false) + buf.WriteByte(',') + } + } + if mj.L1IcacheLoads != nil { + if true { + buf.WriteString(`"l1_icache_loads":`) + fflib.FormatBits2(buf, uint64(*mj.L1IcacheLoads), 10, false) + buf.WriteByte(',') + } + } + if mj.L1IcacheLoadMisses != nil { + if true { + buf.WriteString(`"l1_icache_load_misses":`) + fflib.FormatBits2(buf, uint64(*mj.L1IcacheLoadMisses), 10, false) + buf.WriteByte(',') + } + } + if mj.L1IcachePrefetches != nil { + if true { + buf.WriteString(`"l1_icache_prefetches":`) + fflib.FormatBits2(buf, uint64(*mj.L1IcachePrefetches), 10, false) + buf.WriteByte(',') + } + } + if mj.L1IcachePrefetchMisses != nil { + if true { + buf.WriteString(`"l1_icache_prefetch_misses":`) + fflib.FormatBits2(buf, uint64(*mj.L1IcachePrefetchMisses), 10, false) + buf.WriteByte(',') + } + } + if mj.LLCLoads != nil { + if true { + buf.WriteString(`"llc_loads":`) + fflib.FormatBits2(buf, uint64(*mj.LLCLoads), 10, false) + buf.WriteByte(',') + } + } + if mj.LLCLoadMisses != nil { + if true { + buf.WriteString(`"llc_load_misses":`) + fflib.FormatBits2(buf, uint64(*mj.LLCLoadMisses), 10, false) + buf.WriteByte(',') + } + } + if mj.LLCStores != nil { + if true { + buf.WriteString(`"llc_stores":`) + fflib.FormatBits2(buf, uint64(*mj.LLCStores), 10, false) + buf.WriteByte(',') + } + } + if mj.LLCStoreMisses != nil { + if true { + buf.WriteString(`"llc_store_misses":`) + fflib.FormatBits2(buf, uint64(*mj.LLCStoreMisses), 10, false) + buf.WriteByte(',') + } + } + if mj.LLCPrefetches != nil { + if true { + buf.WriteString(`"llc_prefetches":`) + fflib.FormatBits2(buf, uint64(*mj.LLCPrefetches), 10, false) + buf.WriteByte(',') + } + } + if mj.LLCPrefetchMisses != nil { + if true { + buf.WriteString(`"llc_prefetch_misses":`) + fflib.FormatBits2(buf, uint64(*mj.LLCPrefetchMisses), 10, false) + buf.WriteByte(',') + } + } + if mj.DTLBLoads != nil { + if true { + buf.WriteString(`"dtlb_loads":`) + fflib.FormatBits2(buf, uint64(*mj.DTLBLoads), 10, false) + buf.WriteByte(',') + } + } + if mj.DTLBLoadMisses != nil { + if true { + buf.WriteString(`"dtlb_load_misses":`) + fflib.FormatBits2(buf, uint64(*mj.DTLBLoadMisses), 10, false) + buf.WriteByte(',') + } + } + if mj.DTLBStores != nil { + if true { + buf.WriteString(`"dtlb_stores":`) + fflib.FormatBits2(buf, uint64(*mj.DTLBStores), 10, false) + buf.WriteByte(',') + } + } + if mj.DTLBStoreMisses != nil { + if true { + buf.WriteString(`"dtlb_store_misses":`) + fflib.FormatBits2(buf, uint64(*mj.DTLBStoreMisses), 10, false) + buf.WriteByte(',') + } + } + if mj.DTLBPrefetches != nil { + if true { + buf.WriteString(`"dtlb_prefetches":`) + fflib.FormatBits2(buf, uint64(*mj.DTLBPrefetches), 10, false) + buf.WriteByte(',') + } + } + if mj.DTLBPrefetchMisses != nil { + if true { + buf.WriteString(`"dtlb_prefetch_misses":`) + fflib.FormatBits2(buf, uint64(*mj.DTLBPrefetchMisses), 10, false) + buf.WriteByte(',') + } + } + if mj.ITLBLoads != nil { + if true { + buf.WriteString(`"itlb_loads":`) + fflib.FormatBits2(buf, uint64(*mj.ITLBLoads), 10, false) + buf.WriteByte(',') + } + } + if mj.ITLBLoadMisses != nil { + if true { + buf.WriteString(`"itlb_load_misses":`) + fflib.FormatBits2(buf, uint64(*mj.ITLBLoadMisses), 10, false) + buf.WriteByte(',') + } + } + if mj.BranchLoads != nil { + if true { + buf.WriteString(`"branch_loads":`) + fflib.FormatBits2(buf, uint64(*mj.BranchLoads), 10, false) + buf.WriteByte(',') + } + } + if mj.BranchLoadMisses != nil { + if true { + buf.WriteString(`"branch_load_misses":`) + fflib.FormatBits2(buf, uint64(*mj.BranchLoadMisses), 10, false) + buf.WriteByte(',') + } + } + if mj.NodeLoads != nil { + if true { + buf.WriteString(`"node_loads":`) + fflib.FormatBits2(buf, uint64(*mj.NodeLoads), 10, false) + buf.WriteByte(',') + } + } + if mj.NodeLoadMisses != nil { + if true { + buf.WriteString(`"node_load_misses":`) + fflib.FormatBits2(buf, uint64(*mj.NodeLoadMisses), 10, false) + buf.WriteByte(',') + } + } + if mj.NodeStores != nil { + if true { + buf.WriteString(`"node_stores":`) + fflib.FormatBits2(buf, uint64(*mj.NodeStores), 10, false) + buf.WriteByte(',') + } + } + if mj.NodeStoreMisses != nil { + if true { + buf.WriteString(`"node_store_misses":`) + fflib.FormatBits2(buf, uint64(*mj.NodeStoreMisses), 10, false) + buf.WriteByte(',') + } + } + if mj.NodePrefetches != nil { + if true { + buf.WriteString(`"node_prefetches":`) + fflib.FormatBits2(buf, uint64(*mj.NodePrefetches), 10, false) + buf.WriteByte(',') + } + } + if mj.NodePrefetchMisses != nil { + if true { + buf.WriteString(`"node_prefetch_misses":`) + fflib.FormatBits2(buf, uint64(*mj.NodePrefetchMisses), 10, false) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_PerfStatisticsbase = iota + ffj_t_PerfStatisticsno_such_key + + ffj_t_PerfStatistics_Timestamp + + ffj_t_PerfStatistics_Duration + + ffj_t_PerfStatistics_Cycles + + ffj_t_PerfStatistics_StalledCyclesFrontend + + ffj_t_PerfStatistics_StalledCyclesBackend + + ffj_t_PerfStatistics_Instructions + + ffj_t_PerfStatistics_CacheReferences + + ffj_t_PerfStatistics_CacheMisses + + ffj_t_PerfStatistics_Branches + + ffj_t_PerfStatistics_BranchMisses + + ffj_t_PerfStatistics_BusCycles + + ffj_t_PerfStatistics_RefCycles + + ffj_t_PerfStatistics_CPUClock + + ffj_t_PerfStatistics_TaskClock + + ffj_t_PerfStatistics_PageFaults + + ffj_t_PerfStatistics_MinorFaults + + ffj_t_PerfStatistics_MajorFaults + + ffj_t_PerfStatistics_ContextSwitches + + ffj_t_PerfStatistics_CPUMigrations + + ffj_t_PerfStatistics_AlignmentFaults + + ffj_t_PerfStatistics_EmulationFaults + + ffj_t_PerfStatistics_L1DcacheLoads + + ffj_t_PerfStatistics_L1DcacheLoadMisses + + ffj_t_PerfStatistics_L1DcacheStores + + ffj_t_PerfStatistics_L1DcacheStoreMisses + + ffj_t_PerfStatistics_L1DcachePrefetches + + ffj_t_PerfStatistics_L1DcachePrefetchMisses + + ffj_t_PerfStatistics_L1IcacheLoads + + ffj_t_PerfStatistics_L1IcacheLoadMisses + + ffj_t_PerfStatistics_L1IcachePrefetches + + ffj_t_PerfStatistics_L1IcachePrefetchMisses + + ffj_t_PerfStatistics_LLCLoads + + ffj_t_PerfStatistics_LLCLoadMisses + + ffj_t_PerfStatistics_LLCStores + + ffj_t_PerfStatistics_LLCStoreMisses + + ffj_t_PerfStatistics_LLCPrefetches + + ffj_t_PerfStatistics_LLCPrefetchMisses + + ffj_t_PerfStatistics_DTLBLoads + + ffj_t_PerfStatistics_DTLBLoadMisses + + ffj_t_PerfStatistics_DTLBStores + + ffj_t_PerfStatistics_DTLBStoreMisses + + ffj_t_PerfStatistics_DTLBPrefetches + + ffj_t_PerfStatistics_DTLBPrefetchMisses + + ffj_t_PerfStatistics_ITLBLoads + + ffj_t_PerfStatistics_ITLBLoadMisses + + ffj_t_PerfStatistics_BranchLoads + + ffj_t_PerfStatistics_BranchLoadMisses + + ffj_t_PerfStatistics_NodeLoads + + ffj_t_PerfStatistics_NodeLoadMisses + + ffj_t_PerfStatistics_NodeStores + + ffj_t_PerfStatistics_NodeStoreMisses + + ffj_t_PerfStatistics_NodePrefetches + + ffj_t_PerfStatistics_NodePrefetchMisses +) + +var ffj_key_PerfStatistics_Timestamp = []byte("timestamp") + +var ffj_key_PerfStatistics_Duration = []byte("duration") + +var ffj_key_PerfStatistics_Cycles = []byte("cycles") + +var ffj_key_PerfStatistics_StalledCyclesFrontend = []byte("stalled_cycles_frontend") + +var ffj_key_PerfStatistics_StalledCyclesBackend = []byte("stalled_cycles_backend") + +var ffj_key_PerfStatistics_Instructions = []byte("instructions") + +var ffj_key_PerfStatistics_CacheReferences = []byte("cache_references") + +var ffj_key_PerfStatistics_CacheMisses = []byte("cache_misses") + +var ffj_key_PerfStatistics_Branches = []byte("branches") + +var ffj_key_PerfStatistics_BranchMisses = []byte("branch_misses") + +var ffj_key_PerfStatistics_BusCycles = []byte("bus_cycles") + +var ffj_key_PerfStatistics_RefCycles = []byte("ref_cycles") + +var ffj_key_PerfStatistics_CPUClock = []byte("cpu_clock") + +var ffj_key_PerfStatistics_TaskClock = []byte("task_clock") + +var ffj_key_PerfStatistics_PageFaults = []byte("page_faults") + +var ffj_key_PerfStatistics_MinorFaults = []byte("minor_faults") + +var ffj_key_PerfStatistics_MajorFaults = []byte("major_faults") + +var ffj_key_PerfStatistics_ContextSwitches = []byte("context_switches") + +var ffj_key_PerfStatistics_CPUMigrations = []byte("cpu_migrations") + +var ffj_key_PerfStatistics_AlignmentFaults = []byte("alignment_faults") + +var ffj_key_PerfStatistics_EmulationFaults = []byte("emulation_faults") + +var ffj_key_PerfStatistics_L1DcacheLoads = []byte("l1_dcache_loads") + +var ffj_key_PerfStatistics_L1DcacheLoadMisses = []byte("l1_dcache_load_misses") + +var ffj_key_PerfStatistics_L1DcacheStores = []byte("l1_dcache_stores") + +var ffj_key_PerfStatistics_L1DcacheStoreMisses = []byte("l1_dcache_store_misses") + +var ffj_key_PerfStatistics_L1DcachePrefetches = []byte("l1_dcache_prefetches") + +var ffj_key_PerfStatistics_L1DcachePrefetchMisses = []byte("l1_dcache_prefetch_misses") + +var ffj_key_PerfStatistics_L1IcacheLoads = []byte("l1_icache_loads") + +var ffj_key_PerfStatistics_L1IcacheLoadMisses = []byte("l1_icache_load_misses") + +var ffj_key_PerfStatistics_L1IcachePrefetches = []byte("l1_icache_prefetches") + +var ffj_key_PerfStatistics_L1IcachePrefetchMisses = []byte("l1_icache_prefetch_misses") + +var ffj_key_PerfStatistics_LLCLoads = []byte("llc_loads") + +var ffj_key_PerfStatistics_LLCLoadMisses = []byte("llc_load_misses") + +var ffj_key_PerfStatistics_LLCStores = []byte("llc_stores") + +var ffj_key_PerfStatistics_LLCStoreMisses = []byte("llc_store_misses") + +var ffj_key_PerfStatistics_LLCPrefetches = []byte("llc_prefetches") + +var ffj_key_PerfStatistics_LLCPrefetchMisses = []byte("llc_prefetch_misses") + +var ffj_key_PerfStatistics_DTLBLoads = []byte("dtlb_loads") + +var ffj_key_PerfStatistics_DTLBLoadMisses = []byte("dtlb_load_misses") + +var ffj_key_PerfStatistics_DTLBStores = []byte("dtlb_stores") + +var ffj_key_PerfStatistics_DTLBStoreMisses = []byte("dtlb_store_misses") + +var ffj_key_PerfStatistics_DTLBPrefetches = []byte("dtlb_prefetches") + +var ffj_key_PerfStatistics_DTLBPrefetchMisses = []byte("dtlb_prefetch_misses") + +var ffj_key_PerfStatistics_ITLBLoads = []byte("itlb_loads") + +var ffj_key_PerfStatistics_ITLBLoadMisses = []byte("itlb_load_misses") + +var ffj_key_PerfStatistics_BranchLoads = []byte("branch_loads") + +var ffj_key_PerfStatistics_BranchLoadMisses = []byte("branch_load_misses") + +var ffj_key_PerfStatistics_NodeLoads = []byte("node_loads") + +var ffj_key_PerfStatistics_NodeLoadMisses = []byte("node_load_misses") + +var ffj_key_PerfStatistics_NodeStores = []byte("node_stores") + +var ffj_key_PerfStatistics_NodeStoreMisses = []byte("node_store_misses") + +var ffj_key_PerfStatistics_NodePrefetches = []byte("node_prefetches") + +var ffj_key_PerfStatistics_NodePrefetchMisses = []byte("node_prefetch_misses") + +func (uj *PerfStatistics) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *PerfStatistics) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_PerfStatisticsbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_PerfStatisticsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'a': + + if bytes.Equal(ffj_key_PerfStatistics_AlignmentFaults, kn) { + currentKey = ffj_t_PerfStatistics_AlignmentFaults + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'b': + + if bytes.Equal(ffj_key_PerfStatistics_Branches, kn) { + currentKey = ffj_t_PerfStatistics_Branches + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_BranchMisses, kn) { + currentKey = ffj_t_PerfStatistics_BranchMisses + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_BusCycles, kn) { + currentKey = ffj_t_PerfStatistics_BusCycles + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_BranchLoads, kn) { + currentKey = ffj_t_PerfStatistics_BranchLoads + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_BranchLoadMisses, kn) { + currentKey = ffj_t_PerfStatistics_BranchLoadMisses + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'c': + + if bytes.Equal(ffj_key_PerfStatistics_Cycles, kn) { + currentKey = ffj_t_PerfStatistics_Cycles + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_CacheReferences, kn) { + currentKey = ffj_t_PerfStatistics_CacheReferences + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_CacheMisses, kn) { + currentKey = ffj_t_PerfStatistics_CacheMisses + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_CPUClock, kn) { + currentKey = ffj_t_PerfStatistics_CPUClock + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_ContextSwitches, kn) { + currentKey = ffj_t_PerfStatistics_ContextSwitches + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_CPUMigrations, kn) { + currentKey = ffj_t_PerfStatistics_CPUMigrations + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'd': + + if bytes.Equal(ffj_key_PerfStatistics_Duration, kn) { + currentKey = ffj_t_PerfStatistics_Duration + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_DTLBLoads, kn) { + currentKey = ffj_t_PerfStatistics_DTLBLoads + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_DTLBLoadMisses, kn) { + currentKey = ffj_t_PerfStatistics_DTLBLoadMisses + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_DTLBStores, kn) { + currentKey = ffj_t_PerfStatistics_DTLBStores + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_DTLBStoreMisses, kn) { + currentKey = ffj_t_PerfStatistics_DTLBStoreMisses + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_DTLBPrefetches, kn) { + currentKey = ffj_t_PerfStatistics_DTLBPrefetches + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_DTLBPrefetchMisses, kn) { + currentKey = ffj_t_PerfStatistics_DTLBPrefetchMisses + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'e': + + if bytes.Equal(ffj_key_PerfStatistics_EmulationFaults, kn) { + currentKey = ffj_t_PerfStatistics_EmulationFaults + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'i': + + if bytes.Equal(ffj_key_PerfStatistics_Instructions, kn) { + currentKey = ffj_t_PerfStatistics_Instructions + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_ITLBLoads, kn) { + currentKey = ffj_t_PerfStatistics_ITLBLoads + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_ITLBLoadMisses, kn) { + currentKey = ffj_t_PerfStatistics_ITLBLoadMisses + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'l': + + if bytes.Equal(ffj_key_PerfStatistics_L1DcacheLoads, kn) { + currentKey = ffj_t_PerfStatistics_L1DcacheLoads + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_L1DcacheLoadMisses, kn) { + currentKey = ffj_t_PerfStatistics_L1DcacheLoadMisses + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_L1DcacheStores, kn) { + currentKey = ffj_t_PerfStatistics_L1DcacheStores + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_L1DcacheStoreMisses, kn) { + currentKey = ffj_t_PerfStatistics_L1DcacheStoreMisses + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_L1DcachePrefetches, kn) { + currentKey = ffj_t_PerfStatistics_L1DcachePrefetches + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_L1DcachePrefetchMisses, kn) { + currentKey = ffj_t_PerfStatistics_L1DcachePrefetchMisses + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_L1IcacheLoads, kn) { + currentKey = ffj_t_PerfStatistics_L1IcacheLoads + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_L1IcacheLoadMisses, kn) { + currentKey = ffj_t_PerfStatistics_L1IcacheLoadMisses + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_L1IcachePrefetches, kn) { + currentKey = ffj_t_PerfStatistics_L1IcachePrefetches + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_L1IcachePrefetchMisses, kn) { + currentKey = ffj_t_PerfStatistics_L1IcachePrefetchMisses + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_LLCLoads, kn) { + currentKey = ffj_t_PerfStatistics_LLCLoads + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_LLCLoadMisses, kn) { + currentKey = ffj_t_PerfStatistics_LLCLoadMisses + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_LLCStores, kn) { + currentKey = ffj_t_PerfStatistics_LLCStores + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_LLCStoreMisses, kn) { + currentKey = ffj_t_PerfStatistics_LLCStoreMisses + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_LLCPrefetches, kn) { + currentKey = ffj_t_PerfStatistics_LLCPrefetches + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_LLCPrefetchMisses, kn) { + currentKey = ffj_t_PerfStatistics_LLCPrefetchMisses + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'm': + + if bytes.Equal(ffj_key_PerfStatistics_MinorFaults, kn) { + currentKey = ffj_t_PerfStatistics_MinorFaults + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_MajorFaults, kn) { + currentKey = ffj_t_PerfStatistics_MajorFaults + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'n': + + if bytes.Equal(ffj_key_PerfStatistics_NodeLoads, kn) { + currentKey = ffj_t_PerfStatistics_NodeLoads + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_NodeLoadMisses, kn) { + currentKey = ffj_t_PerfStatistics_NodeLoadMisses + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_NodeStores, kn) { + currentKey = ffj_t_PerfStatistics_NodeStores + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_NodeStoreMisses, kn) { + currentKey = ffj_t_PerfStatistics_NodeStoreMisses + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_NodePrefetches, kn) { + currentKey = ffj_t_PerfStatistics_NodePrefetches + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_NodePrefetchMisses, kn) { + currentKey = ffj_t_PerfStatistics_NodePrefetchMisses + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_PerfStatistics_PageFaults, kn) { + currentKey = ffj_t_PerfStatistics_PageFaults + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_PerfStatistics_RefCycles, kn) { + currentKey = ffj_t_PerfStatistics_RefCycles + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_PerfStatistics_StalledCyclesFrontend, kn) { + currentKey = ffj_t_PerfStatistics_StalledCyclesFrontend + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_StalledCyclesBackend, kn) { + currentKey = ffj_t_PerfStatistics_StalledCyclesBackend + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_PerfStatistics_Timestamp, kn) { + currentKey = ffj_t_PerfStatistics_Timestamp + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_PerfStatistics_TaskClock, kn) { + currentKey = ffj_t_PerfStatistics_TaskClock + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_NodePrefetchMisses, kn) { + currentKey = ffj_t_PerfStatistics_NodePrefetchMisses + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_NodePrefetches, kn) { + currentKey = ffj_t_PerfStatistics_NodePrefetches + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_NodeStoreMisses, kn) { + currentKey = ffj_t_PerfStatistics_NodeStoreMisses + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_NodeStores, kn) { + currentKey = ffj_t_PerfStatistics_NodeStores + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_NodeLoadMisses, kn) { + currentKey = ffj_t_PerfStatistics_NodeLoadMisses + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_NodeLoads, kn) { + currentKey = ffj_t_PerfStatistics_NodeLoads + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_BranchLoadMisses, kn) { + currentKey = ffj_t_PerfStatistics_BranchLoadMisses + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_BranchLoads, kn) { + currentKey = ffj_t_PerfStatistics_BranchLoads + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_ITLBLoadMisses, kn) { + currentKey = ffj_t_PerfStatistics_ITLBLoadMisses + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_ITLBLoads, kn) { + currentKey = ffj_t_PerfStatistics_ITLBLoads + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_DTLBPrefetchMisses, kn) { + currentKey = ffj_t_PerfStatistics_DTLBPrefetchMisses + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_DTLBPrefetches, kn) { + currentKey = ffj_t_PerfStatistics_DTLBPrefetches + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_DTLBStoreMisses, kn) { + currentKey = ffj_t_PerfStatistics_DTLBStoreMisses + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_DTLBStores, kn) { + currentKey = ffj_t_PerfStatistics_DTLBStores + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_DTLBLoadMisses, kn) { + currentKey = ffj_t_PerfStatistics_DTLBLoadMisses + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_DTLBLoads, kn) { + currentKey = ffj_t_PerfStatistics_DTLBLoads + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_LLCPrefetchMisses, kn) { + currentKey = ffj_t_PerfStatistics_LLCPrefetchMisses + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_LLCPrefetches, kn) { + currentKey = ffj_t_PerfStatistics_LLCPrefetches + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_LLCStoreMisses, kn) { + currentKey = ffj_t_PerfStatistics_LLCStoreMisses + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_LLCStores, kn) { + currentKey = ffj_t_PerfStatistics_LLCStores + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_LLCLoadMisses, kn) { + currentKey = ffj_t_PerfStatistics_LLCLoadMisses + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_LLCLoads, kn) { + currentKey = ffj_t_PerfStatistics_LLCLoads + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_L1IcachePrefetchMisses, kn) { + currentKey = ffj_t_PerfStatistics_L1IcachePrefetchMisses + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_L1IcachePrefetches, kn) { + currentKey = ffj_t_PerfStatistics_L1IcachePrefetches + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_L1IcacheLoadMisses, kn) { + currentKey = ffj_t_PerfStatistics_L1IcacheLoadMisses + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_L1IcacheLoads, kn) { + currentKey = ffj_t_PerfStatistics_L1IcacheLoads + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_L1DcachePrefetchMisses, kn) { + currentKey = ffj_t_PerfStatistics_L1DcachePrefetchMisses + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_L1DcachePrefetches, kn) { + currentKey = ffj_t_PerfStatistics_L1DcachePrefetches + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_L1DcacheStoreMisses, kn) { + currentKey = ffj_t_PerfStatistics_L1DcacheStoreMisses + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_L1DcacheStores, kn) { + currentKey = ffj_t_PerfStatistics_L1DcacheStores + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_L1DcacheLoadMisses, kn) { + currentKey = ffj_t_PerfStatistics_L1DcacheLoadMisses + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_L1DcacheLoads, kn) { + currentKey = ffj_t_PerfStatistics_L1DcacheLoads + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_EmulationFaults, kn) { + currentKey = ffj_t_PerfStatistics_EmulationFaults + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_AlignmentFaults, kn) { + currentKey = ffj_t_PerfStatistics_AlignmentFaults + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_CPUMigrations, kn) { + currentKey = ffj_t_PerfStatistics_CPUMigrations + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_ContextSwitches, kn) { + currentKey = ffj_t_PerfStatistics_ContextSwitches + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_MajorFaults, kn) { + currentKey = ffj_t_PerfStatistics_MajorFaults + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_MinorFaults, kn) { + currentKey = ffj_t_PerfStatistics_MinorFaults + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_PageFaults, kn) { + currentKey = ffj_t_PerfStatistics_PageFaults + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_TaskClock, kn) { + currentKey = ffj_t_PerfStatistics_TaskClock + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_CPUClock, kn) { + currentKey = ffj_t_PerfStatistics_CPUClock + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_RefCycles, kn) { + currentKey = ffj_t_PerfStatistics_RefCycles + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_BusCycles, kn) { + currentKey = ffj_t_PerfStatistics_BusCycles + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_BranchMisses, kn) { + currentKey = ffj_t_PerfStatistics_BranchMisses + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_Branches, kn) { + currentKey = ffj_t_PerfStatistics_Branches + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_CacheMisses, kn) { + currentKey = ffj_t_PerfStatistics_CacheMisses + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_CacheReferences, kn) { + currentKey = ffj_t_PerfStatistics_CacheReferences + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_Instructions, kn) { + currentKey = ffj_t_PerfStatistics_Instructions + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_StalledCyclesBackend, kn) { + currentKey = ffj_t_PerfStatistics_StalledCyclesBackend + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_StalledCyclesFrontend, kn) { + currentKey = ffj_t_PerfStatistics_StalledCyclesFrontend + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_Cycles, kn) { + currentKey = ffj_t_PerfStatistics_Cycles + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_PerfStatistics_Duration, kn) { + currentKey = ffj_t_PerfStatistics_Duration + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_PerfStatistics_Timestamp, kn) { + currentKey = ffj_t_PerfStatistics_Timestamp + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_PerfStatisticsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_PerfStatistics_Timestamp: + goto handle_Timestamp + + case ffj_t_PerfStatistics_Duration: + goto handle_Duration + + case ffj_t_PerfStatistics_Cycles: + goto handle_Cycles + + case ffj_t_PerfStatistics_StalledCyclesFrontend: + goto handle_StalledCyclesFrontend + + case ffj_t_PerfStatistics_StalledCyclesBackend: + goto handle_StalledCyclesBackend + + case ffj_t_PerfStatistics_Instructions: + goto handle_Instructions + + case ffj_t_PerfStatistics_CacheReferences: + goto handle_CacheReferences + + case ffj_t_PerfStatistics_CacheMisses: + goto handle_CacheMisses + + case ffj_t_PerfStatistics_Branches: + goto handle_Branches + + case ffj_t_PerfStatistics_BranchMisses: + goto handle_BranchMisses + + case ffj_t_PerfStatistics_BusCycles: + goto handle_BusCycles + + case ffj_t_PerfStatistics_RefCycles: + goto handle_RefCycles + + case ffj_t_PerfStatistics_CPUClock: + goto handle_CPUClock + + case ffj_t_PerfStatistics_TaskClock: + goto handle_TaskClock + + case ffj_t_PerfStatistics_PageFaults: + goto handle_PageFaults + + case ffj_t_PerfStatistics_MinorFaults: + goto handle_MinorFaults + + case ffj_t_PerfStatistics_MajorFaults: + goto handle_MajorFaults + + case ffj_t_PerfStatistics_ContextSwitches: + goto handle_ContextSwitches + + case ffj_t_PerfStatistics_CPUMigrations: + goto handle_CPUMigrations + + case ffj_t_PerfStatistics_AlignmentFaults: + goto handle_AlignmentFaults + + case ffj_t_PerfStatistics_EmulationFaults: + goto handle_EmulationFaults + + case ffj_t_PerfStatistics_L1DcacheLoads: + goto handle_L1DcacheLoads + + case ffj_t_PerfStatistics_L1DcacheLoadMisses: + goto handle_L1DcacheLoadMisses + + case ffj_t_PerfStatistics_L1DcacheStores: + goto handle_L1DcacheStores + + case ffj_t_PerfStatistics_L1DcacheStoreMisses: + goto handle_L1DcacheStoreMisses + + case ffj_t_PerfStatistics_L1DcachePrefetches: + goto handle_L1DcachePrefetches + + case ffj_t_PerfStatistics_L1DcachePrefetchMisses: + goto handle_L1DcachePrefetchMisses + + case ffj_t_PerfStatistics_L1IcacheLoads: + goto handle_L1IcacheLoads + + case ffj_t_PerfStatistics_L1IcacheLoadMisses: + goto handle_L1IcacheLoadMisses + + case ffj_t_PerfStatistics_L1IcachePrefetches: + goto handle_L1IcachePrefetches + + case ffj_t_PerfStatistics_L1IcachePrefetchMisses: + goto handle_L1IcachePrefetchMisses + + case ffj_t_PerfStatistics_LLCLoads: + goto handle_LLCLoads + + case ffj_t_PerfStatistics_LLCLoadMisses: + goto handle_LLCLoadMisses + + case ffj_t_PerfStatistics_LLCStores: + goto handle_LLCStores + + case ffj_t_PerfStatistics_LLCStoreMisses: + goto handle_LLCStoreMisses + + case ffj_t_PerfStatistics_LLCPrefetches: + goto handle_LLCPrefetches + + case ffj_t_PerfStatistics_LLCPrefetchMisses: + goto handle_LLCPrefetchMisses + + case ffj_t_PerfStatistics_DTLBLoads: + goto handle_DTLBLoads + + case ffj_t_PerfStatistics_DTLBLoadMisses: + goto handle_DTLBLoadMisses + + case ffj_t_PerfStatistics_DTLBStores: + goto handle_DTLBStores + + case ffj_t_PerfStatistics_DTLBStoreMisses: + goto handle_DTLBStoreMisses + + case ffj_t_PerfStatistics_DTLBPrefetches: + goto handle_DTLBPrefetches + + case ffj_t_PerfStatistics_DTLBPrefetchMisses: + goto handle_DTLBPrefetchMisses + + case ffj_t_PerfStatistics_ITLBLoads: + goto handle_ITLBLoads + + case ffj_t_PerfStatistics_ITLBLoadMisses: + goto handle_ITLBLoadMisses + + case ffj_t_PerfStatistics_BranchLoads: + goto handle_BranchLoads + + case ffj_t_PerfStatistics_BranchLoadMisses: + goto handle_BranchLoadMisses + + case ffj_t_PerfStatistics_NodeLoads: + goto handle_NodeLoads + + case ffj_t_PerfStatistics_NodeLoadMisses: + goto handle_NodeLoadMisses + + case ffj_t_PerfStatistics_NodeStores: + goto handle_NodeStores + + case ffj_t_PerfStatistics_NodeStoreMisses: + goto handle_NodeStoreMisses + + case ffj_t_PerfStatistics_NodePrefetches: + goto handle_NodePrefetches + + case ffj_t_PerfStatistics_NodePrefetchMisses: + goto handle_NodePrefetchMisses + + case ffj_t_PerfStatisticsno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Timestamp: + + /* handler: uj.Timestamp type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + uj.Timestamp = float64(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Duration: + + /* handler: uj.Duration type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + uj.Duration = float64(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Cycles: + + /* handler: uj.Cycles type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Cycles = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.Cycles = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_StalledCyclesFrontend: + + /* handler: uj.StalledCyclesFrontend type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.StalledCyclesFrontend = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.StalledCyclesFrontend = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_StalledCyclesBackend: + + /* handler: uj.StalledCyclesBackend type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.StalledCyclesBackend = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.StalledCyclesBackend = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Instructions: + + /* handler: uj.Instructions type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Instructions = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.Instructions = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_CacheReferences: + + /* handler: uj.CacheReferences type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.CacheReferences = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.CacheReferences = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_CacheMisses: + + /* handler: uj.CacheMisses type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.CacheMisses = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.CacheMisses = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Branches: + + /* handler: uj.Branches type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Branches = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.Branches = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_BranchMisses: + + /* handler: uj.BranchMisses type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.BranchMisses = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.BranchMisses = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_BusCycles: + + /* handler: uj.BusCycles type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.BusCycles = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.BusCycles = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_RefCycles: + + /* handler: uj.RefCycles type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.RefCycles = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.RefCycles = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_CPUClock: + + /* handler: uj.CPUClock type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.CPUClock = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.CPUClock = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_TaskClock: + + /* handler: uj.TaskClock type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.TaskClock = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.TaskClock = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_PageFaults: + + /* handler: uj.PageFaults type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.PageFaults = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.PageFaults = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_MinorFaults: + + /* handler: uj.MinorFaults type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.MinorFaults = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.MinorFaults = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_MajorFaults: + + /* handler: uj.MajorFaults type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.MajorFaults = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.MajorFaults = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ContextSwitches: + + /* handler: uj.ContextSwitches type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.ContextSwitches = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.ContextSwitches = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_CPUMigrations: + + /* handler: uj.CPUMigrations type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.CPUMigrations = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.CPUMigrations = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_AlignmentFaults: + + /* handler: uj.AlignmentFaults type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.AlignmentFaults = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.AlignmentFaults = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_EmulationFaults: + + /* handler: uj.EmulationFaults type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.EmulationFaults = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.EmulationFaults = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_L1DcacheLoads: + + /* handler: uj.L1DcacheLoads type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.L1DcacheLoads = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.L1DcacheLoads = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_L1DcacheLoadMisses: + + /* handler: uj.L1DcacheLoadMisses type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.L1DcacheLoadMisses = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.L1DcacheLoadMisses = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_L1DcacheStores: + + /* handler: uj.L1DcacheStores type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.L1DcacheStores = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.L1DcacheStores = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_L1DcacheStoreMisses: + + /* handler: uj.L1DcacheStoreMisses type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.L1DcacheStoreMisses = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.L1DcacheStoreMisses = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_L1DcachePrefetches: + + /* handler: uj.L1DcachePrefetches type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.L1DcachePrefetches = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.L1DcachePrefetches = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_L1DcachePrefetchMisses: + + /* handler: uj.L1DcachePrefetchMisses type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.L1DcachePrefetchMisses = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.L1DcachePrefetchMisses = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_L1IcacheLoads: + + /* handler: uj.L1IcacheLoads type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.L1IcacheLoads = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.L1IcacheLoads = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_L1IcacheLoadMisses: + + /* handler: uj.L1IcacheLoadMisses type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.L1IcacheLoadMisses = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.L1IcacheLoadMisses = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_L1IcachePrefetches: + + /* handler: uj.L1IcachePrefetches type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.L1IcachePrefetches = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.L1IcachePrefetches = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_L1IcachePrefetchMisses: + + /* handler: uj.L1IcachePrefetchMisses type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.L1IcachePrefetchMisses = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.L1IcachePrefetchMisses = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_LLCLoads: + + /* handler: uj.LLCLoads type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.LLCLoads = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.LLCLoads = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_LLCLoadMisses: + + /* handler: uj.LLCLoadMisses type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.LLCLoadMisses = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.LLCLoadMisses = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_LLCStores: + + /* handler: uj.LLCStores type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.LLCStores = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.LLCStores = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_LLCStoreMisses: + + /* handler: uj.LLCStoreMisses type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.LLCStoreMisses = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.LLCStoreMisses = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_LLCPrefetches: + + /* handler: uj.LLCPrefetches type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.LLCPrefetches = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.LLCPrefetches = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_LLCPrefetchMisses: + + /* handler: uj.LLCPrefetchMisses type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.LLCPrefetchMisses = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.LLCPrefetchMisses = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_DTLBLoads: + + /* handler: uj.DTLBLoads type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.DTLBLoads = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.DTLBLoads = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_DTLBLoadMisses: + + /* handler: uj.DTLBLoadMisses type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.DTLBLoadMisses = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.DTLBLoadMisses = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_DTLBStores: + + /* handler: uj.DTLBStores type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.DTLBStores = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.DTLBStores = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_DTLBStoreMisses: + + /* handler: uj.DTLBStoreMisses type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.DTLBStoreMisses = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.DTLBStoreMisses = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_DTLBPrefetches: + + /* handler: uj.DTLBPrefetches type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.DTLBPrefetches = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.DTLBPrefetches = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_DTLBPrefetchMisses: + + /* handler: uj.DTLBPrefetchMisses type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.DTLBPrefetchMisses = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.DTLBPrefetchMisses = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ITLBLoads: + + /* handler: uj.ITLBLoads type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.ITLBLoads = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.ITLBLoads = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ITLBLoadMisses: + + /* handler: uj.ITLBLoadMisses type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.ITLBLoadMisses = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.ITLBLoadMisses = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_BranchLoads: + + /* handler: uj.BranchLoads type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.BranchLoads = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.BranchLoads = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_BranchLoadMisses: + + /* handler: uj.BranchLoadMisses type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.BranchLoadMisses = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.BranchLoadMisses = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NodeLoads: + + /* handler: uj.NodeLoads type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.NodeLoads = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.NodeLoads = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NodeLoadMisses: + + /* handler: uj.NodeLoadMisses type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.NodeLoadMisses = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.NodeLoadMisses = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NodeStores: + + /* handler: uj.NodeStores type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.NodeStores = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.NodeStores = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NodeStoreMisses: + + /* handler: uj.NodeStoreMisses type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.NodeStoreMisses = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.NodeStoreMisses = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NodePrefetches: + + /* handler: uj.NodePrefetches type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.NodePrefetches = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.NodePrefetches = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NodePrefetchMisses: + + /* handler: uj.NodePrefetchMisses type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.NodePrefetchMisses = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.NodePrefetchMisses = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Port) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Port) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "number":`) + fflib.FormatBits2(buf, uint64(mj.Number), 10, false) + buf.WriteByte(',') + if mj.Name != nil { + if true { + buf.WriteString(`"name":`) + fflib.WriteJsonString(buf, string(*mj.Name)) + buf.WriteByte(',') + } + } + if mj.Protocol != nil { + if true { + buf.WriteString(`"protocol":`) + fflib.WriteJsonString(buf, string(*mj.Protocol)) + buf.WriteByte(',') + } + } + if mj.Visibility != nil { + if true { + buf.WriteString(`"visibility":`) + + { + + obj, err = mj.Visibility.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + if mj.Labels != nil { + if true { + buf.WriteString(`"labels":`) + + { + + err = mj.Labels.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Portbase = iota + ffj_t_Portno_such_key + + ffj_t_Port_Number + + ffj_t_Port_Name + + ffj_t_Port_Protocol + + ffj_t_Port_Visibility + + ffj_t_Port_Labels +) + +var ffj_key_Port_Number = []byte("number") + +var ffj_key_Port_Name = []byte("name") + +var ffj_key_Port_Protocol = []byte("protocol") + +var ffj_key_Port_Visibility = []byte("visibility") + +var ffj_key_Port_Labels = []byte("labels") + +func (uj *Port) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Port) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Portbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Portno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'l': + + if bytes.Equal(ffj_key_Port_Labels, kn) { + currentKey = ffj_t_Port_Labels + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'n': + + if bytes.Equal(ffj_key_Port_Number, kn) { + currentKey = ffj_t_Port_Number + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Port_Name, kn) { + currentKey = ffj_t_Port_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_Port_Protocol, kn) { + currentKey = ffj_t_Port_Protocol + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'v': + + if bytes.Equal(ffj_key_Port_Visibility, kn) { + currentKey = ffj_t_Port_Visibility + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Port_Labels, kn) { + currentKey = ffj_t_Port_Labels + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Port_Visibility, kn) { + currentKey = ffj_t_Port_Visibility + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Port_Protocol, kn) { + currentKey = ffj_t_Port_Protocol + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Port_Name, kn) { + currentKey = ffj_t_Port_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Port_Number, kn) { + currentKey = ffj_t_Port_Number + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Portno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Port_Number: + goto handle_Number + + case ffj_t_Port_Name: + goto handle_Name + + case ffj_t_Port_Protocol: + goto handle_Protocol + + case ffj_t_Port_Visibility: + goto handle_Visibility + + case ffj_t_Port_Labels: + goto handle_Labels + + case ffj_t_Portno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Number: + + /* handler: uj.Number type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + uj.Number = uint32(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Name: + + /* handler: uj.Name type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Name = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Name = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Protocol: + + /* handler: uj.Protocol type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Protocol = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Protocol = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Visibility: + + /* handler: uj.Visibility type=mesos.DiscoveryInfo_Visibility kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Visibility = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.Visibility == nil { + uj.Visibility = new(DiscoveryInfo_Visibility) + } + + err = uj.Visibility.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Labels: + + /* handler: uj.Labels type=mesos.Labels kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Labels = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Labels == nil { + uj.Labels = new(Labels) + } + + err = uj.Labels.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Ports) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Ports) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"ports":`) + if mj.Ports != nil { + buf.WriteString(`[`) + for i, v := range mj.Ports { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Portsbase = iota + ffj_t_Portsno_such_key + + ffj_t_Ports_Ports +) + +var ffj_key_Ports_Ports = []byte("ports") + +func (uj *Ports) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Ports) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Portsbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Portsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'p': + + if bytes.Equal(ffj_key_Ports_Ports, kn) { + currentKey = ffj_t_Ports_Ports + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Ports_Ports, kn) { + currentKey = ffj_t_Ports_Ports + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Portsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Ports_Ports: + goto handle_Ports + + case ffj_t_Portsno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Ports: + + /* handler: uj.Ports type=[]mesos.Port kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Ports = nil + } else { + + uj.Ports = []Port{} + + wantVal := true + + for { + + var tmp_uj__Ports Port + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Ports type=mesos.Port kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Ports.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Ports = append(uj.Ports, tmp_uj__Ports) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *RLimitInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *RLimitInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"rlimits":`) + if mj.Rlimits != nil { + buf.WriteString(`[`) + for i, v := range mj.Rlimits { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_RLimitInfobase = iota + ffj_t_RLimitInfono_such_key + + ffj_t_RLimitInfo_Rlimits +) + +var ffj_key_RLimitInfo_Rlimits = []byte("rlimits") + +func (uj *RLimitInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *RLimitInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_RLimitInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_RLimitInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'r': + + if bytes.Equal(ffj_key_RLimitInfo_Rlimits, kn) { + currentKey = ffj_t_RLimitInfo_Rlimits + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_RLimitInfo_Rlimits, kn) { + currentKey = ffj_t_RLimitInfo_Rlimits + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_RLimitInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_RLimitInfo_Rlimits: + goto handle_Rlimits + + case ffj_t_RLimitInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Rlimits: + + /* handler: uj.Rlimits type=[]mesos.RLimitInfo_RLimit kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Rlimits = nil + } else { + + uj.Rlimits = []RLimitInfo_RLimit{} + + wantVal := true + + for { + + var tmp_uj__Rlimits RLimitInfo_RLimit + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Rlimits type=mesos.RLimitInfo_RLimit kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Rlimits.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Rlimits = append(uj.Rlimits, tmp_uj__Rlimits) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *RLimitInfo_RLimit) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *RLimitInfo_RLimit) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + if mj.Hard != nil { + if true { + buf.WriteString(`"hard":`) + fflib.FormatBits2(buf, uint64(*mj.Hard), 10, false) + buf.WriteByte(',') + } + } + if mj.Soft != nil { + if true { + buf.WriteString(`"soft":`) + fflib.FormatBits2(buf, uint64(*mj.Soft), 10, false) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_RLimitInfo_RLimitbase = iota + ffj_t_RLimitInfo_RLimitno_such_key + + ffj_t_RLimitInfo_RLimit_Type + + ffj_t_RLimitInfo_RLimit_Hard + + ffj_t_RLimitInfo_RLimit_Soft +) + +var ffj_key_RLimitInfo_RLimit_Type = []byte("type") + +var ffj_key_RLimitInfo_RLimit_Hard = []byte("hard") + +var ffj_key_RLimitInfo_RLimit_Soft = []byte("soft") + +func (uj *RLimitInfo_RLimit) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *RLimitInfo_RLimit) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_RLimitInfo_RLimitbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_RLimitInfo_RLimitno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'h': + + if bytes.Equal(ffj_key_RLimitInfo_RLimit_Hard, kn) { + currentKey = ffj_t_RLimitInfo_RLimit_Hard + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_RLimitInfo_RLimit_Soft, kn) { + currentKey = ffj_t_RLimitInfo_RLimit_Soft + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_RLimitInfo_RLimit_Type, kn) { + currentKey = ffj_t_RLimitInfo_RLimit_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_RLimitInfo_RLimit_Soft, kn) { + currentKey = ffj_t_RLimitInfo_RLimit_Soft + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_RLimitInfo_RLimit_Hard, kn) { + currentKey = ffj_t_RLimitInfo_RLimit_Hard + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_RLimitInfo_RLimit_Type, kn) { + currentKey = ffj_t_RLimitInfo_RLimit_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_RLimitInfo_RLimitno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_RLimitInfo_RLimit_Type: + goto handle_Type + + case ffj_t_RLimitInfo_RLimit_Hard: + goto handle_Hard + + case ffj_t_RLimitInfo_RLimit_Soft: + goto handle_Soft + + case ffj_t_RLimitInfo_RLimitno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=mesos.RLimitInfo_RLimit_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Hard: + + /* handler: uj.Hard type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Hard = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.Hard = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Soft: + + /* handler: uj.Soft type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Soft = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.Soft = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *RateLimit) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *RateLimit) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.QPS != nil { + if true { + buf.WriteString(`"qps":`) + fflib.AppendFloat(buf, float64(*mj.QPS), 'g', -1, 64) + buf.WriteByte(',') + } + } + buf.WriteString(`"principal":`) + fflib.WriteJsonString(buf, string(mj.Principal)) + buf.WriteByte(',') + if mj.Capacity != nil { + if true { + buf.WriteString(`"capacity":`) + fflib.FormatBits2(buf, uint64(*mj.Capacity), 10, false) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_RateLimitbase = iota + ffj_t_RateLimitno_such_key + + ffj_t_RateLimit_QPS + + ffj_t_RateLimit_Principal + + ffj_t_RateLimit_Capacity +) + +var ffj_key_RateLimit_QPS = []byte("qps") + +var ffj_key_RateLimit_Principal = []byte("principal") + +var ffj_key_RateLimit_Capacity = []byte("capacity") + +func (uj *RateLimit) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *RateLimit) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_RateLimitbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_RateLimitno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_RateLimit_Capacity, kn) { + currentKey = ffj_t_RateLimit_Capacity + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_RateLimit_Principal, kn) { + currentKey = ffj_t_RateLimit_Principal + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'q': + + if bytes.Equal(ffj_key_RateLimit_QPS, kn) { + currentKey = ffj_t_RateLimit_QPS + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_RateLimit_Capacity, kn) { + currentKey = ffj_t_RateLimit_Capacity + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_RateLimit_Principal, kn) { + currentKey = ffj_t_RateLimit_Principal + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_RateLimit_QPS, kn) { + currentKey = ffj_t_RateLimit_QPS + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_RateLimitno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_RateLimit_QPS: + goto handle_QPS + + case ffj_t_RateLimit_Principal: + goto handle_Principal + + case ffj_t_RateLimit_Capacity: + goto handle_Capacity + + case ffj_t_RateLimitno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_QPS: + + /* handler: uj.QPS type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.QPS = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.QPS = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Principal: + + /* handler: uj.Principal type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Principal = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Capacity: + + /* handler: uj.Capacity type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Capacity = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.Capacity = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *RateLimits) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *RateLimits) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "limits":`) + if mj.Limits != nil { + buf.WriteString(`[`) + for i, v := range mj.Limits { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.AggregateDefaultQPS != nil { + if true { + buf.WriteString(`"aggregate_default_qps":`) + fflib.AppendFloat(buf, float64(*mj.AggregateDefaultQPS), 'g', -1, 64) + buf.WriteByte(',') + } + } + if mj.AggregateDefaultCapacity != nil { + if true { + buf.WriteString(`"aggregate_default_capacity":`) + fflib.FormatBits2(buf, uint64(*mj.AggregateDefaultCapacity), 10, false) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_RateLimitsbase = iota + ffj_t_RateLimitsno_such_key + + ffj_t_RateLimits_Limits + + ffj_t_RateLimits_AggregateDefaultQPS + + ffj_t_RateLimits_AggregateDefaultCapacity +) + +var ffj_key_RateLimits_Limits = []byte("limits") + +var ffj_key_RateLimits_AggregateDefaultQPS = []byte("aggregate_default_qps") + +var ffj_key_RateLimits_AggregateDefaultCapacity = []byte("aggregate_default_capacity") + +func (uj *RateLimits) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *RateLimits) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_RateLimitsbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_RateLimitsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'a': + + if bytes.Equal(ffj_key_RateLimits_AggregateDefaultQPS, kn) { + currentKey = ffj_t_RateLimits_AggregateDefaultQPS + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_RateLimits_AggregateDefaultCapacity, kn) { + currentKey = ffj_t_RateLimits_AggregateDefaultCapacity + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'l': + + if bytes.Equal(ffj_key_RateLimits_Limits, kn) { + currentKey = ffj_t_RateLimits_Limits + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_RateLimits_AggregateDefaultCapacity, kn) { + currentKey = ffj_t_RateLimits_AggregateDefaultCapacity + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_RateLimits_AggregateDefaultQPS, kn) { + currentKey = ffj_t_RateLimits_AggregateDefaultQPS + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_RateLimits_Limits, kn) { + currentKey = ffj_t_RateLimits_Limits + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_RateLimitsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_RateLimits_Limits: + goto handle_Limits + + case ffj_t_RateLimits_AggregateDefaultQPS: + goto handle_AggregateDefaultQPS + + case ffj_t_RateLimits_AggregateDefaultCapacity: + goto handle_AggregateDefaultCapacity + + case ffj_t_RateLimitsno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Limits: + + /* handler: uj.Limits type=[]mesos.RateLimit kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Limits = nil + } else { + + uj.Limits = []RateLimit{} + + wantVal := true + + for { + + var tmp_uj__Limits RateLimit + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Limits type=mesos.RateLimit kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Limits.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Limits = append(uj.Limits, tmp_uj__Limits) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_AggregateDefaultQPS: + + /* handler: uj.AggregateDefaultQPS type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.AggregateDefaultQPS = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.AggregateDefaultQPS = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_AggregateDefaultCapacity: + + /* handler: uj.AggregateDefaultCapacity type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.AggregateDefaultCapacity = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.AggregateDefaultCapacity = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Request) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Request) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteByte('{') + if mj.AgentID != nil { + if true { + buf.WriteString(`"agent_id":`) + + { + + err = mj.AgentID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"resources":`) + if mj.Resources != nil { + buf.WriteString(`[`) + for i, v := range mj.Resources { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Requestbase = iota + ffj_t_Requestno_such_key + + ffj_t_Request_AgentID + + ffj_t_Request_Resources +) + +var ffj_key_Request_AgentID = []byte("agent_id") + +var ffj_key_Request_Resources = []byte("resources") + +func (uj *Request) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Request) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Requestbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Requestno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'a': + + if bytes.Equal(ffj_key_Request_AgentID, kn) { + currentKey = ffj_t_Request_AgentID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_Request_Resources, kn) { + currentKey = ffj_t_Request_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Request_Resources, kn) { + currentKey = ffj_t_Request_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Request_AgentID, kn) { + currentKey = ffj_t_Request_AgentID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Requestno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Request_AgentID: + goto handle_AgentID + + case ffj_t_Request_Resources: + goto handle_Resources + + case ffj_t_Requestno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_AgentID: + + /* handler: uj.AgentID type=mesos.AgentID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.AgentID = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.AgentID == nil { + uj.AgentID = new(AgentID) + } + + err = uj.AgentID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Resources: + + /* handler: uj.Resources type=[]mesos.Resource kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Resources = nil + } else { + + uj.Resources = []Resource{} + + wantVal := true + + for { + + var tmp_uj__Resources Resource + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Resources type=mesos.Resource kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Resources.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Resources = append(uj.Resources, tmp_uj__Resources) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Resource) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Resource) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.ProviderID != nil { + if true { + buf.WriteString(`"provider_id":`) + + { + + err = mj.ProviderID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"name":`) + fflib.WriteJsonString(buf, string(mj.Name)) + buf.WriteByte(',') + if mj.Type != nil { + if true { + buf.WriteString(`"type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + if mj.Scalar != nil { + if true { + buf.WriteString(`"scalar":`) + + { + + err = mj.Scalar.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Ranges != nil { + if true { + buf.WriteString(`"ranges":`) + + { + + err = mj.Ranges.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Set != nil { + if true { + buf.WriteString(`"set":`) + + { + + err = mj.Set.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Role != nil { + if true { + buf.WriteString(`"role":`) + fflib.WriteJsonString(buf, string(*mj.Role)) + buf.WriteByte(',') + } + } + if mj.AllocationInfo != nil { + if true { + buf.WriteString(`"allocation_info":`) + + { + + err = mj.AllocationInfo.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Reservation != nil { + if true { + buf.WriteString(`"reservation":`) + + { + + err = mj.Reservation.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"reservations":`) + if mj.Reservations != nil { + buf.WriteString(`[`) + for i, v := range mj.Reservations { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.Disk != nil { + if true { + buf.WriteString(`"disk":`) + + { + + err = mj.Disk.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Revocable != nil { + if true { + buf.WriteString(`"revocable":`) + + { + + err = mj.Revocable.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Shared != nil { + if true { + buf.WriteString(`"shared":`) + + { + + err = mj.Shared.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Resourcebase = iota + ffj_t_Resourceno_such_key + + ffj_t_Resource_ProviderID + + ffj_t_Resource_Name + + ffj_t_Resource_Type + + ffj_t_Resource_Scalar + + ffj_t_Resource_Ranges + + ffj_t_Resource_Set + + ffj_t_Resource_Role + + ffj_t_Resource_AllocationInfo + + ffj_t_Resource_Reservation + + ffj_t_Resource_Reservations + + ffj_t_Resource_Disk + + ffj_t_Resource_Revocable + + ffj_t_Resource_Shared +) + +var ffj_key_Resource_ProviderID = []byte("provider_id") + +var ffj_key_Resource_Name = []byte("name") + +var ffj_key_Resource_Type = []byte("type") + +var ffj_key_Resource_Scalar = []byte("scalar") + +var ffj_key_Resource_Ranges = []byte("ranges") + +var ffj_key_Resource_Set = []byte("set") + +var ffj_key_Resource_Role = []byte("role") + +var ffj_key_Resource_AllocationInfo = []byte("allocation_info") + +var ffj_key_Resource_Reservation = []byte("reservation") + +var ffj_key_Resource_Reservations = []byte("reservations") + +var ffj_key_Resource_Disk = []byte("disk") + +var ffj_key_Resource_Revocable = []byte("revocable") + +var ffj_key_Resource_Shared = []byte("shared") + +func (uj *Resource) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Resource) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Resourcebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Resourceno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'a': + + if bytes.Equal(ffj_key_Resource_AllocationInfo, kn) { + currentKey = ffj_t_Resource_AllocationInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'd': + + if bytes.Equal(ffj_key_Resource_Disk, kn) { + currentKey = ffj_t_Resource_Disk + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'n': + + if bytes.Equal(ffj_key_Resource_Name, kn) { + currentKey = ffj_t_Resource_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_Resource_ProviderID, kn) { + currentKey = ffj_t_Resource_ProviderID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_Resource_Ranges, kn) { + currentKey = ffj_t_Resource_Ranges + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Resource_Role, kn) { + currentKey = ffj_t_Resource_Role + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Resource_Reservation, kn) { + currentKey = ffj_t_Resource_Reservation + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Resource_Reservations, kn) { + currentKey = ffj_t_Resource_Reservations + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Resource_Revocable, kn) { + currentKey = ffj_t_Resource_Revocable + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_Resource_Scalar, kn) { + currentKey = ffj_t_Resource_Scalar + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Resource_Set, kn) { + currentKey = ffj_t_Resource_Set + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Resource_Shared, kn) { + currentKey = ffj_t_Resource_Shared + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_Resource_Type, kn) { + currentKey = ffj_t_Resource_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Resource_Shared, kn) { + currentKey = ffj_t_Resource_Shared + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Resource_Revocable, kn) { + currentKey = ffj_t_Resource_Revocable + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Resource_Disk, kn) { + currentKey = ffj_t_Resource_Disk + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Resource_Reservations, kn) { + currentKey = ffj_t_Resource_Reservations + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Resource_Reservation, kn) { + currentKey = ffj_t_Resource_Reservation + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Resource_AllocationInfo, kn) { + currentKey = ffj_t_Resource_AllocationInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Resource_Role, kn) { + currentKey = ffj_t_Resource_Role + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Resource_Set, kn) { + currentKey = ffj_t_Resource_Set + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Resource_Ranges, kn) { + currentKey = ffj_t_Resource_Ranges + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Resource_Scalar, kn) { + currentKey = ffj_t_Resource_Scalar + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Resource_Type, kn) { + currentKey = ffj_t_Resource_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Resource_Name, kn) { + currentKey = ffj_t_Resource_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Resource_ProviderID, kn) { + currentKey = ffj_t_Resource_ProviderID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Resourceno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Resource_ProviderID: + goto handle_ProviderID + + case ffj_t_Resource_Name: + goto handle_Name + + case ffj_t_Resource_Type: + goto handle_Type + + case ffj_t_Resource_Scalar: + goto handle_Scalar + + case ffj_t_Resource_Ranges: + goto handle_Ranges + + case ffj_t_Resource_Set: + goto handle_Set + + case ffj_t_Resource_Role: + goto handle_Role + + case ffj_t_Resource_AllocationInfo: + goto handle_AllocationInfo + + case ffj_t_Resource_Reservation: + goto handle_Reservation + + case ffj_t_Resource_Reservations: + goto handle_Reservations + + case ffj_t_Resource_Disk: + goto handle_Disk + + case ffj_t_Resource_Revocable: + goto handle_Revocable + + case ffj_t_Resource_Shared: + goto handle_Shared + + case ffj_t_Resourceno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ProviderID: + + /* handler: uj.ProviderID type=mesos.ResourceProviderID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.ProviderID = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.ProviderID == nil { + uj.ProviderID = new(ResourceProviderID) + } + + err = uj.ProviderID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Name: + + /* handler: uj.Name type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Name = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Type: + + /* handler: uj.Type type=mesos.Value_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Type = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.Type == nil { + uj.Type = new(Value_Type) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Scalar: + + /* handler: uj.Scalar type=mesos.Value_Scalar kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Scalar = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Scalar == nil { + uj.Scalar = new(Value_Scalar) + } + + err = uj.Scalar.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Ranges: + + /* handler: uj.Ranges type=mesos.Value_Ranges kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Ranges = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Ranges == nil { + uj.Ranges = new(Value_Ranges) + } + + err = uj.Ranges.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Set: + + /* handler: uj.Set type=mesos.Value_Set kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Set = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Set == nil { + uj.Set = new(Value_Set) + } + + err = uj.Set.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Role: + + /* handler: uj.Role type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Role = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Role = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_AllocationInfo: + + /* handler: uj.AllocationInfo type=mesos.Resource_AllocationInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.AllocationInfo = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.AllocationInfo == nil { + uj.AllocationInfo = new(Resource_AllocationInfo) + } + + err = uj.AllocationInfo.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Reservation: + + /* handler: uj.Reservation type=mesos.Resource_ReservationInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Reservation = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Reservation == nil { + uj.Reservation = new(Resource_ReservationInfo) + } + + err = uj.Reservation.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Reservations: + + /* handler: uj.Reservations type=[]mesos.Resource_ReservationInfo kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Reservations = nil + } else { + + uj.Reservations = []Resource_ReservationInfo{} + + wantVal := true + + for { + + var tmp_uj__Reservations Resource_ReservationInfo + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Reservations type=mesos.Resource_ReservationInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Reservations.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Reservations = append(uj.Reservations, tmp_uj__Reservations) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Disk: + + /* handler: uj.Disk type=mesos.Resource_DiskInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Disk = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Disk == nil { + uj.Disk = new(Resource_DiskInfo) + } + + err = uj.Disk.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Revocable: + + /* handler: uj.Revocable type=mesos.Resource_RevocableInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Revocable = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Revocable == nil { + uj.Revocable = new(Resource_RevocableInfo) + } + + err = uj.Revocable.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Shared: + + /* handler: uj.Shared type=mesos.Resource_SharedInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Shared = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Shared == nil { + uj.Shared = new(Resource_SharedInfo) + } + + err = uj.Shared.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *ResourceProviderID) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *ResourceProviderID) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"value":`) + fflib.WriteJsonString(buf, string(mj.Value)) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_ResourceProviderIDbase = iota + ffj_t_ResourceProviderIDno_such_key + + ffj_t_ResourceProviderID_Value +) + +var ffj_key_ResourceProviderID_Value = []byte("value") + +func (uj *ResourceProviderID) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *ResourceProviderID) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_ResourceProviderIDbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_ResourceProviderIDno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'v': + + if bytes.Equal(ffj_key_ResourceProviderID_Value, kn) { + currentKey = ffj_t_ResourceProviderID_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_ResourceProviderID_Value, kn) { + currentKey = ffj_t_ResourceProviderID_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_ResourceProviderIDno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_ResourceProviderID_Value: + goto handle_Value + + case ffj_t_ResourceProviderIDno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Value: + + /* handler: uj.Value type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Value = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *ResourceProviderInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *ResourceProviderInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.ID != nil { + if true { + buf.WriteString(`"id":`) + + { + + err = mj.ID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"attributes":`) + if mj.Attributes != nil { + buf.WriteString(`[`) + for i, v := range mj.Attributes { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteString(`,"type":`) + fflib.WriteJsonString(buf, string(mj.Type)) + buf.WriteString(`,"name":`) + fflib.WriteJsonString(buf, string(mj.Name)) + buf.WriteString(`,"default_reservations":`) + if mj.DefaultReservations != nil { + buf.WriteString(`[`) + for i, v := range mj.DefaultReservations { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.Storage != nil { + if true { + buf.WriteString(`"storage":`) + + { + + err = mj.Storage.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_ResourceProviderInfobase = iota + ffj_t_ResourceProviderInfono_such_key + + ffj_t_ResourceProviderInfo_ID + + ffj_t_ResourceProviderInfo_Attributes + + ffj_t_ResourceProviderInfo_Type + + ffj_t_ResourceProviderInfo_Name + + ffj_t_ResourceProviderInfo_DefaultReservations + + ffj_t_ResourceProviderInfo_Storage +) + +var ffj_key_ResourceProviderInfo_ID = []byte("id") + +var ffj_key_ResourceProviderInfo_Attributes = []byte("attributes") + +var ffj_key_ResourceProviderInfo_Type = []byte("type") + +var ffj_key_ResourceProviderInfo_Name = []byte("name") + +var ffj_key_ResourceProviderInfo_DefaultReservations = []byte("default_reservations") + +var ffj_key_ResourceProviderInfo_Storage = []byte("storage") + +func (uj *ResourceProviderInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *ResourceProviderInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_ResourceProviderInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_ResourceProviderInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'a': + + if bytes.Equal(ffj_key_ResourceProviderInfo_Attributes, kn) { + currentKey = ffj_t_ResourceProviderInfo_Attributes + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'd': + + if bytes.Equal(ffj_key_ResourceProviderInfo_DefaultReservations, kn) { + currentKey = ffj_t_ResourceProviderInfo_DefaultReservations + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'i': + + if bytes.Equal(ffj_key_ResourceProviderInfo_ID, kn) { + currentKey = ffj_t_ResourceProviderInfo_ID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'n': + + if bytes.Equal(ffj_key_ResourceProviderInfo_Name, kn) { + currentKey = ffj_t_ResourceProviderInfo_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_ResourceProviderInfo_Storage, kn) { + currentKey = ffj_t_ResourceProviderInfo_Storage + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_ResourceProviderInfo_Type, kn) { + currentKey = ffj_t_ResourceProviderInfo_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_ResourceProviderInfo_Storage, kn) { + currentKey = ffj_t_ResourceProviderInfo_Storage + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceProviderInfo_DefaultReservations, kn) { + currentKey = ffj_t_ResourceProviderInfo_DefaultReservations + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_ResourceProviderInfo_Name, kn) { + currentKey = ffj_t_ResourceProviderInfo_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_ResourceProviderInfo_Type, kn) { + currentKey = ffj_t_ResourceProviderInfo_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceProviderInfo_Attributes, kn) { + currentKey = ffj_t_ResourceProviderInfo_Attributes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_ResourceProviderInfo_ID, kn) { + currentKey = ffj_t_ResourceProviderInfo_ID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_ResourceProviderInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_ResourceProviderInfo_ID: + goto handle_ID + + case ffj_t_ResourceProviderInfo_Attributes: + goto handle_Attributes + + case ffj_t_ResourceProviderInfo_Type: + goto handle_Type + + case ffj_t_ResourceProviderInfo_Name: + goto handle_Name + + case ffj_t_ResourceProviderInfo_DefaultReservations: + goto handle_DefaultReservations + + case ffj_t_ResourceProviderInfo_Storage: + goto handle_Storage + + case ffj_t_ResourceProviderInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ID: + + /* handler: uj.ID type=mesos.ResourceProviderID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.ID = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.ID == nil { + uj.ID = new(ResourceProviderID) + } + + err = uj.ID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Attributes: + + /* handler: uj.Attributes type=[]mesos.Attribute kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Attributes = nil + } else { + + uj.Attributes = []Attribute{} + + wantVal := true + + for { + + var tmp_uj__Attributes Attribute + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Attributes type=mesos.Attribute kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Attributes.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Attributes = append(uj.Attributes, tmp_uj__Attributes) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Type: + + /* handler: uj.Type type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Type = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Name: + + /* handler: uj.Name type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Name = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_DefaultReservations: + + /* handler: uj.DefaultReservations type=[]mesos.Resource_ReservationInfo kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.DefaultReservations = nil + } else { + + uj.DefaultReservations = []Resource_ReservationInfo{} + + wantVal := true + + for { + + var tmp_uj__DefaultReservations Resource_ReservationInfo + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__DefaultReservations type=mesos.Resource_ReservationInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__DefaultReservations.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.DefaultReservations = append(uj.DefaultReservations, tmp_uj__DefaultReservations) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Storage: + + /* handler: uj.Storage type=mesos.ResourceProviderInfo_Storage kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Storage = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Storage == nil { + uj.Storage = new(ResourceProviderInfo_Storage) + } + + err = uj.Storage.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *ResourceProviderInfo_Storage) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *ResourceProviderInfo_Storage) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"plugin":`) + + { + + err = mj.Plugin.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_ResourceProviderInfo_Storagebase = iota + ffj_t_ResourceProviderInfo_Storageno_such_key + + ffj_t_ResourceProviderInfo_Storage_Plugin +) + +var ffj_key_ResourceProviderInfo_Storage_Plugin = []byte("plugin") + +func (uj *ResourceProviderInfo_Storage) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *ResourceProviderInfo_Storage) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_ResourceProviderInfo_Storagebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_ResourceProviderInfo_Storageno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'p': + + if bytes.Equal(ffj_key_ResourceProviderInfo_Storage_Plugin, kn) { + currentKey = ffj_t_ResourceProviderInfo_Storage_Plugin + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_ResourceProviderInfo_Storage_Plugin, kn) { + currentKey = ffj_t_ResourceProviderInfo_Storage_Plugin + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_ResourceProviderInfo_Storageno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_ResourceProviderInfo_Storage_Plugin: + goto handle_Plugin + + case ffj_t_ResourceProviderInfo_Storageno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Plugin: + + /* handler: uj.Plugin type=mesos.CSIPluginInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.Plugin.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *ResourceStatistics) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *ResourceStatistics) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "timestamp":`) + fflib.AppendFloat(buf, float64(mj.Timestamp), 'g', -1, 64) + buf.WriteByte(',') + if mj.Processes != nil { + if true { + buf.WriteString(`"processes":`) + fflib.FormatBits2(buf, uint64(*mj.Processes), 10, false) + buf.WriteByte(',') + } + } + if mj.Threads != nil { + if true { + buf.WriteString(`"threads":`) + fflib.FormatBits2(buf, uint64(*mj.Threads), 10, false) + buf.WriteByte(',') + } + } + if mj.CPUsUserTimeSecs != nil { + if true { + buf.WriteString(`"cpus_user_time_secs":`) + fflib.AppendFloat(buf, float64(*mj.CPUsUserTimeSecs), 'g', -1, 64) + buf.WriteByte(',') + } + } + if mj.CPUsSystemTimeSecs != nil { + if true { + buf.WriteString(`"cpus_system_time_secs":`) + fflib.AppendFloat(buf, float64(*mj.CPUsSystemTimeSecs), 'g', -1, 64) + buf.WriteByte(',') + } + } + if mj.CPUsLimit != nil { + if true { + buf.WriteString(`"cpus_limit":`) + fflib.AppendFloat(buf, float64(*mj.CPUsLimit), 'g', -1, 64) + buf.WriteByte(',') + } + } + if mj.CPUsNrPeriods != nil { + if true { + buf.WriteString(`"cpus_nr_periods":`) + fflib.FormatBits2(buf, uint64(*mj.CPUsNrPeriods), 10, false) + buf.WriteByte(',') + } + } + if mj.CPUsNrThrottled != nil { + if true { + buf.WriteString(`"cpus_nr_throttled":`) + fflib.FormatBits2(buf, uint64(*mj.CPUsNrThrottled), 10, false) + buf.WriteByte(',') + } + } + if mj.CPUsThrottledTimeSecs != nil { + if true { + buf.WriteString(`"cpus_throttled_time_secs":`) + fflib.AppendFloat(buf, float64(*mj.CPUsThrottledTimeSecs), 'g', -1, 64) + buf.WriteByte(',') + } + } + if mj.MemTotalBytes != nil { + if true { + buf.WriteString(`"mem_total_bytes":`) + fflib.FormatBits2(buf, uint64(*mj.MemTotalBytes), 10, false) + buf.WriteByte(',') + } + } + if mj.MemTotalMemswBytes != nil { + if true { + buf.WriteString(`"mem_total_memsw_bytes":`) + fflib.FormatBits2(buf, uint64(*mj.MemTotalMemswBytes), 10, false) + buf.WriteByte(',') + } + } + if mj.MemLimitBytes != nil { + if true { + buf.WriteString(`"mem_limit_bytes":`) + fflib.FormatBits2(buf, uint64(*mj.MemLimitBytes), 10, false) + buf.WriteByte(',') + } + } + if mj.MemSoftLimitBytes != nil { + if true { + buf.WriteString(`"mem_soft_limit_bytes":`) + fflib.FormatBits2(buf, uint64(*mj.MemSoftLimitBytes), 10, false) + buf.WriteByte(',') + } + } + if mj.MemFileBytes != nil { + if true { + buf.WriteString(`"mem_file_bytes":`) + fflib.FormatBits2(buf, uint64(*mj.MemFileBytes), 10, false) + buf.WriteByte(',') + } + } + if mj.MemAnonBytes != nil { + if true { + buf.WriteString(`"mem_anon_bytes":`) + fflib.FormatBits2(buf, uint64(*mj.MemAnonBytes), 10, false) + buf.WriteByte(',') + } + } + if mj.MemCacheBytes != nil { + if true { + buf.WriteString(`"mem_cache_bytes":`) + fflib.FormatBits2(buf, uint64(*mj.MemCacheBytes), 10, false) + buf.WriteByte(',') + } + } + if mj.MemRSSBytes != nil { + if true { + buf.WriteString(`"mem_rss_bytes":`) + fflib.FormatBits2(buf, uint64(*mj.MemRSSBytes), 10, false) + buf.WriteByte(',') + } + } + if mj.MemMappedFileBytes != nil { + if true { + buf.WriteString(`"mem_mapped_file_bytes":`) + fflib.FormatBits2(buf, uint64(*mj.MemMappedFileBytes), 10, false) + buf.WriteByte(',') + } + } + if mj.MemSwapBytes != nil { + if true { + buf.WriteString(`"mem_swap_bytes":`) + fflib.FormatBits2(buf, uint64(*mj.MemSwapBytes), 10, false) + buf.WriteByte(',') + } + } + if mj.MemUnevictableBytes != nil { + if true { + buf.WriteString(`"mem_unevictable_bytes":`) + fflib.FormatBits2(buf, uint64(*mj.MemUnevictableBytes), 10, false) + buf.WriteByte(',') + } + } + if mj.MemLowPressureCounter != nil { + if true { + buf.WriteString(`"mem_low_pressure_counter":`) + fflib.FormatBits2(buf, uint64(*mj.MemLowPressureCounter), 10, false) + buf.WriteByte(',') + } + } + if mj.MemMediumPressureCounter != nil { + if true { + buf.WriteString(`"mem_medium_pressure_counter":`) + fflib.FormatBits2(buf, uint64(*mj.MemMediumPressureCounter), 10, false) + buf.WriteByte(',') + } + } + if mj.MemCriticalPressureCounter != nil { + if true { + buf.WriteString(`"mem_critical_pressure_counter":`) + fflib.FormatBits2(buf, uint64(*mj.MemCriticalPressureCounter), 10, false) + buf.WriteByte(',') + } + } + if mj.DiskLimitBytes != nil { + if true { + buf.WriteString(`"disk_limit_bytes":`) + fflib.FormatBits2(buf, uint64(*mj.DiskLimitBytes), 10, false) + buf.WriteByte(',') + } + } + if mj.DiskUsedBytes != nil { + if true { + buf.WriteString(`"disk_used_bytes":`) + fflib.FormatBits2(buf, uint64(*mj.DiskUsedBytes), 10, false) + buf.WriteByte(',') + } + } + buf.WriteString(`"disk_statistics":`) + if mj.DiskStatistics != nil { + buf.WriteString(`[`) + for i, v := range mj.DiskStatistics { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.BlkioStatistics != nil { + if true { + buf.WriteString(`"blkio_statistics":`) + + { + + err = mj.BlkioStatistics.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Perf != nil { + if true { + buf.WriteString(`"perf":`) + + { + + err = mj.Perf.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.NetRxPackets != nil { + if true { + buf.WriteString(`"net_rx_packets":`) + fflib.FormatBits2(buf, uint64(*mj.NetRxPackets), 10, false) + buf.WriteByte(',') + } + } + if mj.NetRxBytes != nil { + if true { + buf.WriteString(`"net_rx_bytes":`) + fflib.FormatBits2(buf, uint64(*mj.NetRxBytes), 10, false) + buf.WriteByte(',') + } + } + if mj.NetRxErrors != nil { + if true { + buf.WriteString(`"net_rx_errors":`) + fflib.FormatBits2(buf, uint64(*mj.NetRxErrors), 10, false) + buf.WriteByte(',') + } + } + if mj.NetRxDropped != nil { + if true { + buf.WriteString(`"net_rx_dropped":`) + fflib.FormatBits2(buf, uint64(*mj.NetRxDropped), 10, false) + buf.WriteByte(',') + } + } + if mj.NetTxPackets != nil { + if true { + buf.WriteString(`"net_tx_packets":`) + fflib.FormatBits2(buf, uint64(*mj.NetTxPackets), 10, false) + buf.WriteByte(',') + } + } + if mj.NetTxBytes != nil { + if true { + buf.WriteString(`"net_tx_bytes":`) + fflib.FormatBits2(buf, uint64(*mj.NetTxBytes), 10, false) + buf.WriteByte(',') + } + } + if mj.NetTxErrors != nil { + if true { + buf.WriteString(`"net_tx_errors":`) + fflib.FormatBits2(buf, uint64(*mj.NetTxErrors), 10, false) + buf.WriteByte(',') + } + } + if mj.NetTxDropped != nil { + if true { + buf.WriteString(`"net_tx_dropped":`) + fflib.FormatBits2(buf, uint64(*mj.NetTxDropped), 10, false) + buf.WriteByte(',') + } + } + if mj.NetTCPRttMicrosecsP50 != nil { + if true { + buf.WriteString(`"net_tcp_rtt_microsecs_p50":`) + fflib.AppendFloat(buf, float64(*mj.NetTCPRttMicrosecsP50), 'g', -1, 64) + buf.WriteByte(',') + } + } + if mj.NetTCPRttMicrosecsP90 != nil { + if true { + buf.WriteString(`"net_tcp_rtt_microsecs_p90":`) + fflib.AppendFloat(buf, float64(*mj.NetTCPRttMicrosecsP90), 'g', -1, 64) + buf.WriteByte(',') + } + } + if mj.NetTCPRttMicrosecsP95 != nil { + if true { + buf.WriteString(`"net_tcp_rtt_microsecs_p95":`) + fflib.AppendFloat(buf, float64(*mj.NetTCPRttMicrosecsP95), 'g', -1, 64) + buf.WriteByte(',') + } + } + if mj.NetTCPRttMicrosecsP99 != nil { + if true { + buf.WriteString(`"net_tcp_rtt_microsecs_p99":`) + fflib.AppendFloat(buf, float64(*mj.NetTCPRttMicrosecsP99), 'g', -1, 64) + buf.WriteByte(',') + } + } + if mj.NetTCPActiveConnections != nil { + if true { + buf.WriteString(`"net_tcp_active_connections":`) + fflib.AppendFloat(buf, float64(*mj.NetTCPActiveConnections), 'g', -1, 64) + buf.WriteByte(',') + } + } + if mj.NetTCPTimeWaitConnections != nil { + if true { + buf.WriteString(`"net_tcp_time_wait_connections":`) + fflib.AppendFloat(buf, float64(*mj.NetTCPTimeWaitConnections), 'g', -1, 64) + buf.WriteByte(',') + } + } + buf.WriteString(`"net_traffic_control_statistics":`) + if mj.NetTrafficControlStatistics != nil { + buf.WriteString(`[`) + for i, v := range mj.NetTrafficControlStatistics { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.NetSNMPStatistics != nil { + if true { + buf.WriteString(`"net_snmp_statistics":`) + + { + + err = mj.NetSNMPStatistics.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_ResourceStatisticsbase = iota + ffj_t_ResourceStatisticsno_such_key + + ffj_t_ResourceStatistics_Timestamp + + ffj_t_ResourceStatistics_Processes + + ffj_t_ResourceStatistics_Threads + + ffj_t_ResourceStatistics_CPUsUserTimeSecs + + ffj_t_ResourceStatistics_CPUsSystemTimeSecs + + ffj_t_ResourceStatistics_CPUsLimit + + ffj_t_ResourceStatistics_CPUsNrPeriods + + ffj_t_ResourceStatistics_CPUsNrThrottled + + ffj_t_ResourceStatistics_CPUsThrottledTimeSecs + + ffj_t_ResourceStatistics_MemTotalBytes + + ffj_t_ResourceStatistics_MemTotalMemswBytes + + ffj_t_ResourceStatistics_MemLimitBytes + + ffj_t_ResourceStatistics_MemSoftLimitBytes + + ffj_t_ResourceStatistics_MemFileBytes + + ffj_t_ResourceStatistics_MemAnonBytes + + ffj_t_ResourceStatistics_MemCacheBytes + + ffj_t_ResourceStatistics_MemRSSBytes + + ffj_t_ResourceStatistics_MemMappedFileBytes + + ffj_t_ResourceStatistics_MemSwapBytes + + ffj_t_ResourceStatistics_MemUnevictableBytes + + ffj_t_ResourceStatistics_MemLowPressureCounter + + ffj_t_ResourceStatistics_MemMediumPressureCounter + + ffj_t_ResourceStatistics_MemCriticalPressureCounter + + ffj_t_ResourceStatistics_DiskLimitBytes + + ffj_t_ResourceStatistics_DiskUsedBytes + + ffj_t_ResourceStatistics_DiskStatistics + + ffj_t_ResourceStatistics_BlkioStatistics + + ffj_t_ResourceStatistics_Perf + + ffj_t_ResourceStatistics_NetRxPackets + + ffj_t_ResourceStatistics_NetRxBytes + + ffj_t_ResourceStatistics_NetRxErrors + + ffj_t_ResourceStatistics_NetRxDropped + + ffj_t_ResourceStatistics_NetTxPackets + + ffj_t_ResourceStatistics_NetTxBytes + + ffj_t_ResourceStatistics_NetTxErrors + + ffj_t_ResourceStatistics_NetTxDropped + + ffj_t_ResourceStatistics_NetTCPRttMicrosecsP50 + + ffj_t_ResourceStatistics_NetTCPRttMicrosecsP90 + + ffj_t_ResourceStatistics_NetTCPRttMicrosecsP95 + + ffj_t_ResourceStatistics_NetTCPRttMicrosecsP99 + + ffj_t_ResourceStatistics_NetTCPActiveConnections + + ffj_t_ResourceStatistics_NetTCPTimeWaitConnections + + ffj_t_ResourceStatistics_NetTrafficControlStatistics + + ffj_t_ResourceStatistics_NetSNMPStatistics +) + +var ffj_key_ResourceStatistics_Timestamp = []byte("timestamp") + +var ffj_key_ResourceStatistics_Processes = []byte("processes") + +var ffj_key_ResourceStatistics_Threads = []byte("threads") + +var ffj_key_ResourceStatistics_CPUsUserTimeSecs = []byte("cpus_user_time_secs") + +var ffj_key_ResourceStatistics_CPUsSystemTimeSecs = []byte("cpus_system_time_secs") + +var ffj_key_ResourceStatistics_CPUsLimit = []byte("cpus_limit") + +var ffj_key_ResourceStatistics_CPUsNrPeriods = []byte("cpus_nr_periods") + +var ffj_key_ResourceStatistics_CPUsNrThrottled = []byte("cpus_nr_throttled") + +var ffj_key_ResourceStatistics_CPUsThrottledTimeSecs = []byte("cpus_throttled_time_secs") + +var ffj_key_ResourceStatistics_MemTotalBytes = []byte("mem_total_bytes") + +var ffj_key_ResourceStatistics_MemTotalMemswBytes = []byte("mem_total_memsw_bytes") + +var ffj_key_ResourceStatistics_MemLimitBytes = []byte("mem_limit_bytes") + +var ffj_key_ResourceStatistics_MemSoftLimitBytes = []byte("mem_soft_limit_bytes") + +var ffj_key_ResourceStatistics_MemFileBytes = []byte("mem_file_bytes") + +var ffj_key_ResourceStatistics_MemAnonBytes = []byte("mem_anon_bytes") + +var ffj_key_ResourceStatistics_MemCacheBytes = []byte("mem_cache_bytes") + +var ffj_key_ResourceStatistics_MemRSSBytes = []byte("mem_rss_bytes") + +var ffj_key_ResourceStatistics_MemMappedFileBytes = []byte("mem_mapped_file_bytes") + +var ffj_key_ResourceStatistics_MemSwapBytes = []byte("mem_swap_bytes") + +var ffj_key_ResourceStatistics_MemUnevictableBytes = []byte("mem_unevictable_bytes") + +var ffj_key_ResourceStatistics_MemLowPressureCounter = []byte("mem_low_pressure_counter") + +var ffj_key_ResourceStatistics_MemMediumPressureCounter = []byte("mem_medium_pressure_counter") + +var ffj_key_ResourceStatistics_MemCriticalPressureCounter = []byte("mem_critical_pressure_counter") + +var ffj_key_ResourceStatistics_DiskLimitBytes = []byte("disk_limit_bytes") + +var ffj_key_ResourceStatistics_DiskUsedBytes = []byte("disk_used_bytes") + +var ffj_key_ResourceStatistics_DiskStatistics = []byte("disk_statistics") + +var ffj_key_ResourceStatistics_BlkioStatistics = []byte("blkio_statistics") + +var ffj_key_ResourceStatistics_Perf = []byte("perf") + +var ffj_key_ResourceStatistics_NetRxPackets = []byte("net_rx_packets") + +var ffj_key_ResourceStatistics_NetRxBytes = []byte("net_rx_bytes") + +var ffj_key_ResourceStatistics_NetRxErrors = []byte("net_rx_errors") + +var ffj_key_ResourceStatistics_NetRxDropped = []byte("net_rx_dropped") + +var ffj_key_ResourceStatistics_NetTxPackets = []byte("net_tx_packets") + +var ffj_key_ResourceStatistics_NetTxBytes = []byte("net_tx_bytes") + +var ffj_key_ResourceStatistics_NetTxErrors = []byte("net_tx_errors") + +var ffj_key_ResourceStatistics_NetTxDropped = []byte("net_tx_dropped") + +var ffj_key_ResourceStatistics_NetTCPRttMicrosecsP50 = []byte("net_tcp_rtt_microsecs_p50") + +var ffj_key_ResourceStatistics_NetTCPRttMicrosecsP90 = []byte("net_tcp_rtt_microsecs_p90") + +var ffj_key_ResourceStatistics_NetTCPRttMicrosecsP95 = []byte("net_tcp_rtt_microsecs_p95") + +var ffj_key_ResourceStatistics_NetTCPRttMicrosecsP99 = []byte("net_tcp_rtt_microsecs_p99") + +var ffj_key_ResourceStatistics_NetTCPActiveConnections = []byte("net_tcp_active_connections") + +var ffj_key_ResourceStatistics_NetTCPTimeWaitConnections = []byte("net_tcp_time_wait_connections") + +var ffj_key_ResourceStatistics_NetTrafficControlStatistics = []byte("net_traffic_control_statistics") + +var ffj_key_ResourceStatistics_NetSNMPStatistics = []byte("net_snmp_statistics") + +func (uj *ResourceStatistics) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *ResourceStatistics) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_ResourceStatisticsbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_ResourceStatisticsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'b': + + if bytes.Equal(ffj_key_ResourceStatistics_BlkioStatistics, kn) { + currentKey = ffj_t_ResourceStatistics_BlkioStatistics + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'c': + + if bytes.Equal(ffj_key_ResourceStatistics_CPUsUserTimeSecs, kn) { + currentKey = ffj_t_ResourceStatistics_CPUsUserTimeSecs + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_CPUsSystemTimeSecs, kn) { + currentKey = ffj_t_ResourceStatistics_CPUsSystemTimeSecs + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_CPUsLimit, kn) { + currentKey = ffj_t_ResourceStatistics_CPUsLimit + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_CPUsNrPeriods, kn) { + currentKey = ffj_t_ResourceStatistics_CPUsNrPeriods + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_CPUsNrThrottled, kn) { + currentKey = ffj_t_ResourceStatistics_CPUsNrThrottled + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_CPUsThrottledTimeSecs, kn) { + currentKey = ffj_t_ResourceStatistics_CPUsThrottledTimeSecs + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'd': + + if bytes.Equal(ffj_key_ResourceStatistics_DiskLimitBytes, kn) { + currentKey = ffj_t_ResourceStatistics_DiskLimitBytes + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_DiskUsedBytes, kn) { + currentKey = ffj_t_ResourceStatistics_DiskUsedBytes + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_DiskStatistics, kn) { + currentKey = ffj_t_ResourceStatistics_DiskStatistics + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'm': + + if bytes.Equal(ffj_key_ResourceStatistics_MemTotalBytes, kn) { + currentKey = ffj_t_ResourceStatistics_MemTotalBytes + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_MemTotalMemswBytes, kn) { + currentKey = ffj_t_ResourceStatistics_MemTotalMemswBytes + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_MemLimitBytes, kn) { + currentKey = ffj_t_ResourceStatistics_MemLimitBytes + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_MemSoftLimitBytes, kn) { + currentKey = ffj_t_ResourceStatistics_MemSoftLimitBytes + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_MemFileBytes, kn) { + currentKey = ffj_t_ResourceStatistics_MemFileBytes + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_MemAnonBytes, kn) { + currentKey = ffj_t_ResourceStatistics_MemAnonBytes + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_MemCacheBytes, kn) { + currentKey = ffj_t_ResourceStatistics_MemCacheBytes + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_MemRSSBytes, kn) { + currentKey = ffj_t_ResourceStatistics_MemRSSBytes + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_MemMappedFileBytes, kn) { + currentKey = ffj_t_ResourceStatistics_MemMappedFileBytes + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_MemSwapBytes, kn) { + currentKey = ffj_t_ResourceStatistics_MemSwapBytes + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_MemUnevictableBytes, kn) { + currentKey = ffj_t_ResourceStatistics_MemUnevictableBytes + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_MemLowPressureCounter, kn) { + currentKey = ffj_t_ResourceStatistics_MemLowPressureCounter + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_MemMediumPressureCounter, kn) { + currentKey = ffj_t_ResourceStatistics_MemMediumPressureCounter + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_MemCriticalPressureCounter, kn) { + currentKey = ffj_t_ResourceStatistics_MemCriticalPressureCounter + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'n': + + if bytes.Equal(ffj_key_ResourceStatistics_NetRxPackets, kn) { + currentKey = ffj_t_ResourceStatistics_NetRxPackets + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_NetRxBytes, kn) { + currentKey = ffj_t_ResourceStatistics_NetRxBytes + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_NetRxErrors, kn) { + currentKey = ffj_t_ResourceStatistics_NetRxErrors + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_NetRxDropped, kn) { + currentKey = ffj_t_ResourceStatistics_NetRxDropped + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_NetTxPackets, kn) { + currentKey = ffj_t_ResourceStatistics_NetTxPackets + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_NetTxBytes, kn) { + currentKey = ffj_t_ResourceStatistics_NetTxBytes + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_NetTxErrors, kn) { + currentKey = ffj_t_ResourceStatistics_NetTxErrors + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_NetTxDropped, kn) { + currentKey = ffj_t_ResourceStatistics_NetTxDropped + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_NetTCPRttMicrosecsP50, kn) { + currentKey = ffj_t_ResourceStatistics_NetTCPRttMicrosecsP50 + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_NetTCPRttMicrosecsP90, kn) { + currentKey = ffj_t_ResourceStatistics_NetTCPRttMicrosecsP90 + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_NetTCPRttMicrosecsP95, kn) { + currentKey = ffj_t_ResourceStatistics_NetTCPRttMicrosecsP95 + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_NetTCPRttMicrosecsP99, kn) { + currentKey = ffj_t_ResourceStatistics_NetTCPRttMicrosecsP99 + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_NetTCPActiveConnections, kn) { + currentKey = ffj_t_ResourceStatistics_NetTCPActiveConnections + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_NetTCPTimeWaitConnections, kn) { + currentKey = ffj_t_ResourceStatistics_NetTCPTimeWaitConnections + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_NetTrafficControlStatistics, kn) { + currentKey = ffj_t_ResourceStatistics_NetTrafficControlStatistics + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_NetSNMPStatistics, kn) { + currentKey = ffj_t_ResourceStatistics_NetSNMPStatistics + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_ResourceStatistics_Processes, kn) { + currentKey = ffj_t_ResourceStatistics_Processes + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_Perf, kn) { + currentKey = ffj_t_ResourceStatistics_Perf + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_ResourceStatistics_Timestamp, kn) { + currentKey = ffj_t_ResourceStatistics_Timestamp + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_ResourceStatistics_Threads, kn) { + currentKey = ffj_t_ResourceStatistics_Threads + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_NetSNMPStatistics, kn) { + currentKey = ffj_t_ResourceStatistics_NetSNMPStatistics + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_NetTrafficControlStatistics, kn) { + currentKey = ffj_t_ResourceStatistics_NetTrafficControlStatistics + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_NetTCPTimeWaitConnections, kn) { + currentKey = ffj_t_ResourceStatistics_NetTCPTimeWaitConnections + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_NetTCPActiveConnections, kn) { + currentKey = ffj_t_ResourceStatistics_NetTCPActiveConnections + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_NetTCPRttMicrosecsP99, kn) { + currentKey = ffj_t_ResourceStatistics_NetTCPRttMicrosecsP99 + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_NetTCPRttMicrosecsP95, kn) { + currentKey = ffj_t_ResourceStatistics_NetTCPRttMicrosecsP95 + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_NetTCPRttMicrosecsP90, kn) { + currentKey = ffj_t_ResourceStatistics_NetTCPRttMicrosecsP90 + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_NetTCPRttMicrosecsP50, kn) { + currentKey = ffj_t_ResourceStatistics_NetTCPRttMicrosecsP50 + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_ResourceStatistics_NetTxDropped, kn) { + currentKey = ffj_t_ResourceStatistics_NetTxDropped + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_NetTxErrors, kn) { + currentKey = ffj_t_ResourceStatistics_NetTxErrors + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_NetTxBytes, kn) { + currentKey = ffj_t_ResourceStatistics_NetTxBytes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_NetTxPackets, kn) { + currentKey = ffj_t_ResourceStatistics_NetTxPackets + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_ResourceStatistics_NetRxDropped, kn) { + currentKey = ffj_t_ResourceStatistics_NetRxDropped + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_NetRxErrors, kn) { + currentKey = ffj_t_ResourceStatistics_NetRxErrors + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_NetRxBytes, kn) { + currentKey = ffj_t_ResourceStatistics_NetRxBytes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_NetRxPackets, kn) { + currentKey = ffj_t_ResourceStatistics_NetRxPackets + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_ResourceStatistics_Perf, kn) { + currentKey = ffj_t_ResourceStatistics_Perf + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_BlkioStatistics, kn) { + currentKey = ffj_t_ResourceStatistics_BlkioStatistics + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_DiskStatistics, kn) { + currentKey = ffj_t_ResourceStatistics_DiskStatistics + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_DiskUsedBytes, kn) { + currentKey = ffj_t_ResourceStatistics_DiskUsedBytes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_DiskLimitBytes, kn) { + currentKey = ffj_t_ResourceStatistics_DiskLimitBytes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_MemCriticalPressureCounter, kn) { + currentKey = ffj_t_ResourceStatistics_MemCriticalPressureCounter + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_MemMediumPressureCounter, kn) { + currentKey = ffj_t_ResourceStatistics_MemMediumPressureCounter + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_MemLowPressureCounter, kn) { + currentKey = ffj_t_ResourceStatistics_MemLowPressureCounter + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_MemUnevictableBytes, kn) { + currentKey = ffj_t_ResourceStatistics_MemUnevictableBytes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_MemSwapBytes, kn) { + currentKey = ffj_t_ResourceStatistics_MemSwapBytes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_MemMappedFileBytes, kn) { + currentKey = ffj_t_ResourceStatistics_MemMappedFileBytes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_MemRSSBytes, kn) { + currentKey = ffj_t_ResourceStatistics_MemRSSBytes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_MemCacheBytes, kn) { + currentKey = ffj_t_ResourceStatistics_MemCacheBytes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_MemAnonBytes, kn) { + currentKey = ffj_t_ResourceStatistics_MemAnonBytes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_MemFileBytes, kn) { + currentKey = ffj_t_ResourceStatistics_MemFileBytes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_MemSoftLimitBytes, kn) { + currentKey = ffj_t_ResourceStatistics_MemSoftLimitBytes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_MemLimitBytes, kn) { + currentKey = ffj_t_ResourceStatistics_MemLimitBytes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_MemTotalMemswBytes, kn) { + currentKey = ffj_t_ResourceStatistics_MemTotalMemswBytes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_MemTotalBytes, kn) { + currentKey = ffj_t_ResourceStatistics_MemTotalBytes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_CPUsThrottledTimeSecs, kn) { + currentKey = ffj_t_ResourceStatistics_CPUsThrottledTimeSecs + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_CPUsNrThrottled, kn) { + currentKey = ffj_t_ResourceStatistics_CPUsNrThrottled + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_CPUsNrPeriods, kn) { + currentKey = ffj_t_ResourceStatistics_CPUsNrPeriods + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_CPUsLimit, kn) { + currentKey = ffj_t_ResourceStatistics_CPUsLimit + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_CPUsSystemTimeSecs, kn) { + currentKey = ffj_t_ResourceStatistics_CPUsSystemTimeSecs + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_CPUsUserTimeSecs, kn) { + currentKey = ffj_t_ResourceStatistics_CPUsUserTimeSecs + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_Threads, kn) { + currentKey = ffj_t_ResourceStatistics_Threads + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_Processes, kn) { + currentKey = ffj_t_ResourceStatistics_Processes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceStatistics_Timestamp, kn) { + currentKey = ffj_t_ResourceStatistics_Timestamp + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_ResourceStatisticsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_ResourceStatistics_Timestamp: + goto handle_Timestamp + + case ffj_t_ResourceStatistics_Processes: + goto handle_Processes + + case ffj_t_ResourceStatistics_Threads: + goto handle_Threads + + case ffj_t_ResourceStatistics_CPUsUserTimeSecs: + goto handle_CPUsUserTimeSecs + + case ffj_t_ResourceStatistics_CPUsSystemTimeSecs: + goto handle_CPUsSystemTimeSecs + + case ffj_t_ResourceStatistics_CPUsLimit: + goto handle_CPUsLimit + + case ffj_t_ResourceStatistics_CPUsNrPeriods: + goto handle_CPUsNrPeriods + + case ffj_t_ResourceStatistics_CPUsNrThrottled: + goto handle_CPUsNrThrottled + + case ffj_t_ResourceStatistics_CPUsThrottledTimeSecs: + goto handle_CPUsThrottledTimeSecs + + case ffj_t_ResourceStatistics_MemTotalBytes: + goto handle_MemTotalBytes + + case ffj_t_ResourceStatistics_MemTotalMemswBytes: + goto handle_MemTotalMemswBytes + + case ffj_t_ResourceStatistics_MemLimitBytes: + goto handle_MemLimitBytes + + case ffj_t_ResourceStatistics_MemSoftLimitBytes: + goto handle_MemSoftLimitBytes + + case ffj_t_ResourceStatistics_MemFileBytes: + goto handle_MemFileBytes + + case ffj_t_ResourceStatistics_MemAnonBytes: + goto handle_MemAnonBytes + + case ffj_t_ResourceStatistics_MemCacheBytes: + goto handle_MemCacheBytes + + case ffj_t_ResourceStatistics_MemRSSBytes: + goto handle_MemRSSBytes + + case ffj_t_ResourceStatistics_MemMappedFileBytes: + goto handle_MemMappedFileBytes + + case ffj_t_ResourceStatistics_MemSwapBytes: + goto handle_MemSwapBytes + + case ffj_t_ResourceStatistics_MemUnevictableBytes: + goto handle_MemUnevictableBytes + + case ffj_t_ResourceStatistics_MemLowPressureCounter: + goto handle_MemLowPressureCounter + + case ffj_t_ResourceStatistics_MemMediumPressureCounter: + goto handle_MemMediumPressureCounter + + case ffj_t_ResourceStatistics_MemCriticalPressureCounter: + goto handle_MemCriticalPressureCounter + + case ffj_t_ResourceStatistics_DiskLimitBytes: + goto handle_DiskLimitBytes + + case ffj_t_ResourceStatistics_DiskUsedBytes: + goto handle_DiskUsedBytes + + case ffj_t_ResourceStatistics_DiskStatistics: + goto handle_DiskStatistics + + case ffj_t_ResourceStatistics_BlkioStatistics: + goto handle_BlkioStatistics + + case ffj_t_ResourceStatistics_Perf: + goto handle_Perf + + case ffj_t_ResourceStatistics_NetRxPackets: + goto handle_NetRxPackets + + case ffj_t_ResourceStatistics_NetRxBytes: + goto handle_NetRxBytes + + case ffj_t_ResourceStatistics_NetRxErrors: + goto handle_NetRxErrors + + case ffj_t_ResourceStatistics_NetRxDropped: + goto handle_NetRxDropped + + case ffj_t_ResourceStatistics_NetTxPackets: + goto handle_NetTxPackets + + case ffj_t_ResourceStatistics_NetTxBytes: + goto handle_NetTxBytes + + case ffj_t_ResourceStatistics_NetTxErrors: + goto handle_NetTxErrors + + case ffj_t_ResourceStatistics_NetTxDropped: + goto handle_NetTxDropped + + case ffj_t_ResourceStatistics_NetTCPRttMicrosecsP50: + goto handle_NetTCPRttMicrosecsP50 + + case ffj_t_ResourceStatistics_NetTCPRttMicrosecsP90: + goto handle_NetTCPRttMicrosecsP90 + + case ffj_t_ResourceStatistics_NetTCPRttMicrosecsP95: + goto handle_NetTCPRttMicrosecsP95 + + case ffj_t_ResourceStatistics_NetTCPRttMicrosecsP99: + goto handle_NetTCPRttMicrosecsP99 + + case ffj_t_ResourceStatistics_NetTCPActiveConnections: + goto handle_NetTCPActiveConnections + + case ffj_t_ResourceStatistics_NetTCPTimeWaitConnections: + goto handle_NetTCPTimeWaitConnections + + case ffj_t_ResourceStatistics_NetTrafficControlStatistics: + goto handle_NetTrafficControlStatistics + + case ffj_t_ResourceStatistics_NetSNMPStatistics: + goto handle_NetSNMPStatistics + + case ffj_t_ResourceStatisticsno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Timestamp: + + /* handler: uj.Timestamp type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + uj.Timestamp = float64(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Processes: + + /* handler: uj.Processes type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Processes = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint32(tval) + uj.Processes = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Threads: + + /* handler: uj.Threads type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Threads = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint32(tval) + uj.Threads = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_CPUsUserTimeSecs: + + /* handler: uj.CPUsUserTimeSecs type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.CPUsUserTimeSecs = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.CPUsUserTimeSecs = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_CPUsSystemTimeSecs: + + /* handler: uj.CPUsSystemTimeSecs type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.CPUsSystemTimeSecs = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.CPUsSystemTimeSecs = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_CPUsLimit: + + /* handler: uj.CPUsLimit type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.CPUsLimit = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.CPUsLimit = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_CPUsNrPeriods: + + /* handler: uj.CPUsNrPeriods type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.CPUsNrPeriods = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint32(tval) + uj.CPUsNrPeriods = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_CPUsNrThrottled: + + /* handler: uj.CPUsNrThrottled type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.CPUsNrThrottled = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint32(tval) + uj.CPUsNrThrottled = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_CPUsThrottledTimeSecs: + + /* handler: uj.CPUsThrottledTimeSecs type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.CPUsThrottledTimeSecs = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.CPUsThrottledTimeSecs = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_MemTotalBytes: + + /* handler: uj.MemTotalBytes type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.MemTotalBytes = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.MemTotalBytes = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_MemTotalMemswBytes: + + /* handler: uj.MemTotalMemswBytes type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.MemTotalMemswBytes = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.MemTotalMemswBytes = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_MemLimitBytes: + + /* handler: uj.MemLimitBytes type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.MemLimitBytes = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.MemLimitBytes = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_MemSoftLimitBytes: + + /* handler: uj.MemSoftLimitBytes type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.MemSoftLimitBytes = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.MemSoftLimitBytes = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_MemFileBytes: + + /* handler: uj.MemFileBytes type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.MemFileBytes = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.MemFileBytes = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_MemAnonBytes: + + /* handler: uj.MemAnonBytes type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.MemAnonBytes = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.MemAnonBytes = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_MemCacheBytes: + + /* handler: uj.MemCacheBytes type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.MemCacheBytes = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.MemCacheBytes = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_MemRSSBytes: + + /* handler: uj.MemRSSBytes type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.MemRSSBytes = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.MemRSSBytes = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_MemMappedFileBytes: + + /* handler: uj.MemMappedFileBytes type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.MemMappedFileBytes = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.MemMappedFileBytes = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_MemSwapBytes: + + /* handler: uj.MemSwapBytes type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.MemSwapBytes = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.MemSwapBytes = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_MemUnevictableBytes: + + /* handler: uj.MemUnevictableBytes type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.MemUnevictableBytes = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.MemUnevictableBytes = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_MemLowPressureCounter: + + /* handler: uj.MemLowPressureCounter type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.MemLowPressureCounter = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.MemLowPressureCounter = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_MemMediumPressureCounter: + + /* handler: uj.MemMediumPressureCounter type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.MemMediumPressureCounter = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.MemMediumPressureCounter = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_MemCriticalPressureCounter: + + /* handler: uj.MemCriticalPressureCounter type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.MemCriticalPressureCounter = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.MemCriticalPressureCounter = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_DiskLimitBytes: + + /* handler: uj.DiskLimitBytes type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.DiskLimitBytes = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.DiskLimitBytes = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_DiskUsedBytes: + + /* handler: uj.DiskUsedBytes type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.DiskUsedBytes = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.DiskUsedBytes = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_DiskStatistics: + + /* handler: uj.DiskStatistics type=[]mesos.DiskStatistics kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.DiskStatistics = nil + } else { + + uj.DiskStatistics = []DiskStatistics{} + + wantVal := true + + for { + + var tmp_uj__DiskStatistics DiskStatistics + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__DiskStatistics type=mesos.DiskStatistics kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__DiskStatistics.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.DiskStatistics = append(uj.DiskStatistics, tmp_uj__DiskStatistics) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_BlkioStatistics: + + /* handler: uj.BlkioStatistics type=mesos.CgroupInfo_Blkio_Statistics kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.BlkioStatistics = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.BlkioStatistics == nil { + uj.BlkioStatistics = new(CgroupInfo_Blkio_Statistics) + } + + err = uj.BlkioStatistics.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Perf: + + /* handler: uj.Perf type=mesos.PerfStatistics kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Perf = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Perf == nil { + uj.Perf = new(PerfStatistics) + } + + err = uj.Perf.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NetRxPackets: + + /* handler: uj.NetRxPackets type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.NetRxPackets = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.NetRxPackets = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NetRxBytes: + + /* handler: uj.NetRxBytes type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.NetRxBytes = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.NetRxBytes = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NetRxErrors: + + /* handler: uj.NetRxErrors type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.NetRxErrors = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.NetRxErrors = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NetRxDropped: + + /* handler: uj.NetRxDropped type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.NetRxDropped = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.NetRxDropped = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NetTxPackets: + + /* handler: uj.NetTxPackets type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.NetTxPackets = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.NetTxPackets = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NetTxBytes: + + /* handler: uj.NetTxBytes type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.NetTxBytes = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.NetTxBytes = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NetTxErrors: + + /* handler: uj.NetTxErrors type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.NetTxErrors = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.NetTxErrors = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NetTxDropped: + + /* handler: uj.NetTxDropped type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.NetTxDropped = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.NetTxDropped = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NetTCPRttMicrosecsP50: + + /* handler: uj.NetTCPRttMicrosecsP50 type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.NetTCPRttMicrosecsP50 = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.NetTCPRttMicrosecsP50 = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NetTCPRttMicrosecsP90: + + /* handler: uj.NetTCPRttMicrosecsP90 type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.NetTCPRttMicrosecsP90 = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.NetTCPRttMicrosecsP90 = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NetTCPRttMicrosecsP95: + + /* handler: uj.NetTCPRttMicrosecsP95 type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.NetTCPRttMicrosecsP95 = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.NetTCPRttMicrosecsP95 = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NetTCPRttMicrosecsP99: + + /* handler: uj.NetTCPRttMicrosecsP99 type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.NetTCPRttMicrosecsP99 = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.NetTCPRttMicrosecsP99 = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NetTCPActiveConnections: + + /* handler: uj.NetTCPActiveConnections type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.NetTCPActiveConnections = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.NetTCPActiveConnections = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NetTCPTimeWaitConnections: + + /* handler: uj.NetTCPTimeWaitConnections type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.NetTCPTimeWaitConnections = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.NetTCPTimeWaitConnections = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NetTrafficControlStatistics: + + /* handler: uj.NetTrafficControlStatistics type=[]mesos.TrafficControlStatistics kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.NetTrafficControlStatistics = nil + } else { + + uj.NetTrafficControlStatistics = []TrafficControlStatistics{} + + wantVal := true + + for { + + var tmp_uj__NetTrafficControlStatistics TrafficControlStatistics + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__NetTrafficControlStatistics type=mesos.TrafficControlStatistics kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__NetTrafficControlStatistics.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.NetTrafficControlStatistics = append(uj.NetTrafficControlStatistics, tmp_uj__NetTrafficControlStatistics) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NetSNMPStatistics: + + /* handler: uj.NetSNMPStatistics type=mesos.SNMPStatistics kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.NetSNMPStatistics = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.NetSNMPStatistics == nil { + uj.NetSNMPStatistics = new(SNMPStatistics) + } + + err = uj.NetSNMPStatistics.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *ResourceUsage) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *ResourceUsage) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"executors":`) + if mj.Executors != nil { + buf.WriteString(`[`) + for i, v := range mj.Executors { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteString(`,"total":`) + if mj.Total != nil { + buf.WriteString(`[`) + for i, v := range mj.Total { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_ResourceUsagebase = iota + ffj_t_ResourceUsageno_such_key + + ffj_t_ResourceUsage_Executors + + ffj_t_ResourceUsage_Total +) + +var ffj_key_ResourceUsage_Executors = []byte("executors") + +var ffj_key_ResourceUsage_Total = []byte("total") + +func (uj *ResourceUsage) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *ResourceUsage) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_ResourceUsagebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_ResourceUsageno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'e': + + if bytes.Equal(ffj_key_ResourceUsage_Executors, kn) { + currentKey = ffj_t_ResourceUsage_Executors + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_ResourceUsage_Total, kn) { + currentKey = ffj_t_ResourceUsage_Total + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_ResourceUsage_Total, kn) { + currentKey = ffj_t_ResourceUsage_Total + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceUsage_Executors, kn) { + currentKey = ffj_t_ResourceUsage_Executors + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_ResourceUsageno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_ResourceUsage_Executors: + goto handle_Executors + + case ffj_t_ResourceUsage_Total: + goto handle_Total + + case ffj_t_ResourceUsageno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Executors: + + /* handler: uj.Executors type=[]mesos.ResourceUsage_Executor kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Executors = nil + } else { + + uj.Executors = []ResourceUsage_Executor{} + + wantVal := true + + for { + + var tmp_uj__Executors ResourceUsage_Executor + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Executors type=mesos.ResourceUsage_Executor kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Executors.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Executors = append(uj.Executors, tmp_uj__Executors) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Total: + + /* handler: uj.Total type=[]mesos.Resource kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Total = nil + } else { + + uj.Total = []Resource{} + + wantVal := true + + for { + + var tmp_uj__Total Resource + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Total type=mesos.Resource kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Total.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Total = append(uj.Total, tmp_uj__Total) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *ResourceUsage_Executor) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *ResourceUsage_Executor) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"executor_info":`) + + { + + err = mj.ExecutorInfo.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteString(`,"allocated":`) + if mj.Allocated != nil { + buf.WriteString(`[`) + for i, v := range mj.Allocated { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.Statistics != nil { + if true { + buf.WriteString(`"statistics":`) + + { + + err = mj.Statistics.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"container_id":`) + + { + + err = mj.ContainerID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteString(`,"tasks":`) + if mj.Tasks != nil { + buf.WriteString(`[`) + for i, v := range mj.Tasks { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_ResourceUsage_Executorbase = iota + ffj_t_ResourceUsage_Executorno_such_key + + ffj_t_ResourceUsage_Executor_ExecutorInfo + + ffj_t_ResourceUsage_Executor_Allocated + + ffj_t_ResourceUsage_Executor_Statistics + + ffj_t_ResourceUsage_Executor_ContainerID + + ffj_t_ResourceUsage_Executor_Tasks +) + +var ffj_key_ResourceUsage_Executor_ExecutorInfo = []byte("executor_info") + +var ffj_key_ResourceUsage_Executor_Allocated = []byte("allocated") + +var ffj_key_ResourceUsage_Executor_Statistics = []byte("statistics") + +var ffj_key_ResourceUsage_Executor_ContainerID = []byte("container_id") + +var ffj_key_ResourceUsage_Executor_Tasks = []byte("tasks") + +func (uj *ResourceUsage_Executor) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *ResourceUsage_Executor) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_ResourceUsage_Executorbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_ResourceUsage_Executorno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'a': + + if bytes.Equal(ffj_key_ResourceUsage_Executor_Allocated, kn) { + currentKey = ffj_t_ResourceUsage_Executor_Allocated + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'c': + + if bytes.Equal(ffj_key_ResourceUsage_Executor_ContainerID, kn) { + currentKey = ffj_t_ResourceUsage_Executor_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'e': + + if bytes.Equal(ffj_key_ResourceUsage_Executor_ExecutorInfo, kn) { + currentKey = ffj_t_ResourceUsage_Executor_ExecutorInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_ResourceUsage_Executor_Statistics, kn) { + currentKey = ffj_t_ResourceUsage_Executor_Statistics + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_ResourceUsage_Executor_Tasks, kn) { + currentKey = ffj_t_ResourceUsage_Executor_Tasks + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_ResourceUsage_Executor_Tasks, kn) { + currentKey = ffj_t_ResourceUsage_Executor_Tasks + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_ResourceUsage_Executor_ContainerID, kn) { + currentKey = ffj_t_ResourceUsage_Executor_ContainerID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceUsage_Executor_Statistics, kn) { + currentKey = ffj_t_ResourceUsage_Executor_Statistics + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_ResourceUsage_Executor_Allocated, kn) { + currentKey = ffj_t_ResourceUsage_Executor_Allocated + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_ResourceUsage_Executor_ExecutorInfo, kn) { + currentKey = ffj_t_ResourceUsage_Executor_ExecutorInfo + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_ResourceUsage_Executorno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_ResourceUsage_Executor_ExecutorInfo: + goto handle_ExecutorInfo + + case ffj_t_ResourceUsage_Executor_Allocated: + goto handle_Allocated + + case ffj_t_ResourceUsage_Executor_Statistics: + goto handle_Statistics + + case ffj_t_ResourceUsage_Executor_ContainerID: + goto handle_ContainerID + + case ffj_t_ResourceUsage_Executor_Tasks: + goto handle_Tasks + + case ffj_t_ResourceUsage_Executorno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ExecutorInfo: + + /* handler: uj.ExecutorInfo type=mesos.ExecutorInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.ExecutorInfo.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Allocated: + + /* handler: uj.Allocated type=[]mesos.Resource kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Allocated = nil + } else { + + uj.Allocated = []Resource{} + + wantVal := true + + for { + + var tmp_uj__Allocated Resource + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Allocated type=mesos.Resource kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Allocated.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Allocated = append(uj.Allocated, tmp_uj__Allocated) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Statistics: + + /* handler: uj.Statistics type=mesos.ResourceStatistics kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Statistics = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Statistics == nil { + uj.Statistics = new(ResourceStatistics) + } + + err = uj.Statistics.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ContainerID: + + /* handler: uj.ContainerID type=mesos.ContainerID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.ContainerID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Tasks: + + /* handler: uj.Tasks type=[]mesos.ResourceUsage_Executor_Task kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Tasks = nil + } else { + + uj.Tasks = []ResourceUsage_Executor_Task{} + + wantVal := true + + for { + + var tmp_uj__Tasks ResourceUsage_Executor_Task + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Tasks type=mesos.ResourceUsage_Executor_Task kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Tasks.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Tasks = append(uj.Tasks, tmp_uj__Tasks) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *ResourceUsage_Executor_Task) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *ResourceUsage_Executor_Task) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "name":`) + fflib.WriteJsonString(buf, string(mj.Name)) + buf.WriteString(`,"id":`) + + { + + err = mj.ID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteString(`,"resources":`) + if mj.Resources != nil { + buf.WriteString(`[`) + for i, v := range mj.Resources { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.Labels != nil { + if true { + buf.WriteString(`"labels":`) + + { + + err = mj.Labels.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_ResourceUsage_Executor_Taskbase = iota + ffj_t_ResourceUsage_Executor_Taskno_such_key + + ffj_t_ResourceUsage_Executor_Task_Name + + ffj_t_ResourceUsage_Executor_Task_ID + + ffj_t_ResourceUsage_Executor_Task_Resources + + ffj_t_ResourceUsage_Executor_Task_Labels +) + +var ffj_key_ResourceUsage_Executor_Task_Name = []byte("name") + +var ffj_key_ResourceUsage_Executor_Task_ID = []byte("id") + +var ffj_key_ResourceUsage_Executor_Task_Resources = []byte("resources") + +var ffj_key_ResourceUsage_Executor_Task_Labels = []byte("labels") + +func (uj *ResourceUsage_Executor_Task) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *ResourceUsage_Executor_Task) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_ResourceUsage_Executor_Taskbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_ResourceUsage_Executor_Taskno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'i': + + if bytes.Equal(ffj_key_ResourceUsage_Executor_Task_ID, kn) { + currentKey = ffj_t_ResourceUsage_Executor_Task_ID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'l': + + if bytes.Equal(ffj_key_ResourceUsage_Executor_Task_Labels, kn) { + currentKey = ffj_t_ResourceUsage_Executor_Task_Labels + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'n': + + if bytes.Equal(ffj_key_ResourceUsage_Executor_Task_Name, kn) { + currentKey = ffj_t_ResourceUsage_Executor_Task_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_ResourceUsage_Executor_Task_Resources, kn) { + currentKey = ffj_t_ResourceUsage_Executor_Task_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_ResourceUsage_Executor_Task_Labels, kn) { + currentKey = ffj_t_ResourceUsage_Executor_Task_Labels + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_ResourceUsage_Executor_Task_Resources, kn) { + currentKey = ffj_t_ResourceUsage_Executor_Task_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_ResourceUsage_Executor_Task_ID, kn) { + currentKey = ffj_t_ResourceUsage_Executor_Task_ID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_ResourceUsage_Executor_Task_Name, kn) { + currentKey = ffj_t_ResourceUsage_Executor_Task_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_ResourceUsage_Executor_Taskno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_ResourceUsage_Executor_Task_Name: + goto handle_Name + + case ffj_t_ResourceUsage_Executor_Task_ID: + goto handle_ID + + case ffj_t_ResourceUsage_Executor_Task_Resources: + goto handle_Resources + + case ffj_t_ResourceUsage_Executor_Task_Labels: + goto handle_Labels + + case ffj_t_ResourceUsage_Executor_Taskno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Name: + + /* handler: uj.Name type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Name = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ID: + + /* handler: uj.ID type=mesos.TaskID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.ID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Resources: + + /* handler: uj.Resources type=[]mesos.Resource kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Resources = nil + } else { + + uj.Resources = []Resource{} + + wantVal := true + + for { + + var tmp_uj__Resources Resource + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Resources type=mesos.Resource kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Resources.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Resources = append(uj.Resources, tmp_uj__Resources) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Labels: + + /* handler: uj.Labels type=mesos.Labels kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Labels = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Labels == nil { + uj.Labels = new(Labels) + } + + err = uj.Labels.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Resource_AllocationInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Resource_AllocationInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Role != nil { + if true { + buf.WriteString(`"role":`) + fflib.WriteJsonString(buf, string(*mj.Role)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Resource_AllocationInfobase = iota + ffj_t_Resource_AllocationInfono_such_key + + ffj_t_Resource_AllocationInfo_Role +) + +var ffj_key_Resource_AllocationInfo_Role = []byte("role") + +func (uj *Resource_AllocationInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Resource_AllocationInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Resource_AllocationInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Resource_AllocationInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'r': + + if bytes.Equal(ffj_key_Resource_AllocationInfo_Role, kn) { + currentKey = ffj_t_Resource_AllocationInfo_Role + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Resource_AllocationInfo_Role, kn) { + currentKey = ffj_t_Resource_AllocationInfo_Role + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Resource_AllocationInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Resource_AllocationInfo_Role: + goto handle_Role + + case ffj_t_Resource_AllocationInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Role: + + /* handler: uj.Role type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Role = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Role = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Resource_DiskInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Resource_DiskInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Persistence != nil { + if true { + buf.WriteString(`"persistence":`) + + { + + err = mj.Persistence.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Volume != nil { + if true { + buf.WriteString(`"volume":`) + + { + + err = mj.Volume.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Source != nil { + if true { + buf.WriteString(`"source":`) + + { + + err = mj.Source.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Resource_DiskInfobase = iota + ffj_t_Resource_DiskInfono_such_key + + ffj_t_Resource_DiskInfo_Persistence + + ffj_t_Resource_DiskInfo_Volume + + ffj_t_Resource_DiskInfo_Source +) + +var ffj_key_Resource_DiskInfo_Persistence = []byte("persistence") + +var ffj_key_Resource_DiskInfo_Volume = []byte("volume") + +var ffj_key_Resource_DiskInfo_Source = []byte("source") + +func (uj *Resource_DiskInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Resource_DiskInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Resource_DiskInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Resource_DiskInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'p': + + if bytes.Equal(ffj_key_Resource_DiskInfo_Persistence, kn) { + currentKey = ffj_t_Resource_DiskInfo_Persistence + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_Resource_DiskInfo_Source, kn) { + currentKey = ffj_t_Resource_DiskInfo_Source + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'v': + + if bytes.Equal(ffj_key_Resource_DiskInfo_Volume, kn) { + currentKey = ffj_t_Resource_DiskInfo_Volume + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Resource_DiskInfo_Source, kn) { + currentKey = ffj_t_Resource_DiskInfo_Source + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Resource_DiskInfo_Volume, kn) { + currentKey = ffj_t_Resource_DiskInfo_Volume + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Resource_DiskInfo_Persistence, kn) { + currentKey = ffj_t_Resource_DiskInfo_Persistence + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Resource_DiskInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Resource_DiskInfo_Persistence: + goto handle_Persistence + + case ffj_t_Resource_DiskInfo_Volume: + goto handle_Volume + + case ffj_t_Resource_DiskInfo_Source: + goto handle_Source + + case ffj_t_Resource_DiskInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Persistence: + + /* handler: uj.Persistence type=mesos.Resource_DiskInfo_Persistence kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Persistence = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Persistence == nil { + uj.Persistence = new(Resource_DiskInfo_Persistence) + } + + err = uj.Persistence.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Volume: + + /* handler: uj.Volume type=mesos.Volume kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Volume = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Volume == nil { + uj.Volume = new(Volume) + } + + err = uj.Volume.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Source: + + /* handler: uj.Source type=mesos.Resource_DiskInfo_Source kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Source = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Source == nil { + uj.Source = new(Resource_DiskInfo_Source) + } + + err = uj.Source.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Resource_DiskInfo_Persistence) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Resource_DiskInfo_Persistence) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "id":`) + fflib.WriteJsonString(buf, string(mj.ID)) + buf.WriteByte(',') + if mj.Principal != nil { + if true { + buf.WriteString(`"principal":`) + fflib.WriteJsonString(buf, string(*mj.Principal)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Resource_DiskInfo_Persistencebase = iota + ffj_t_Resource_DiskInfo_Persistenceno_such_key + + ffj_t_Resource_DiskInfo_Persistence_ID + + ffj_t_Resource_DiskInfo_Persistence_Principal +) + +var ffj_key_Resource_DiskInfo_Persistence_ID = []byte("id") + +var ffj_key_Resource_DiskInfo_Persistence_Principal = []byte("principal") + +func (uj *Resource_DiskInfo_Persistence) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Resource_DiskInfo_Persistence) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Resource_DiskInfo_Persistencebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Resource_DiskInfo_Persistenceno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'i': + + if bytes.Equal(ffj_key_Resource_DiskInfo_Persistence_ID, kn) { + currentKey = ffj_t_Resource_DiskInfo_Persistence_ID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_Resource_DiskInfo_Persistence_Principal, kn) { + currentKey = ffj_t_Resource_DiskInfo_Persistence_Principal + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Resource_DiskInfo_Persistence_Principal, kn) { + currentKey = ffj_t_Resource_DiskInfo_Persistence_Principal + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Resource_DiskInfo_Persistence_ID, kn) { + currentKey = ffj_t_Resource_DiskInfo_Persistence_ID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Resource_DiskInfo_Persistenceno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Resource_DiskInfo_Persistence_ID: + goto handle_ID + + case ffj_t_Resource_DiskInfo_Persistence_Principal: + goto handle_Principal + + case ffj_t_Resource_DiskInfo_Persistenceno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ID: + + /* handler: uj.ID type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.ID = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Principal: + + /* handler: uj.Principal type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Principal = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Principal = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Resource_DiskInfo_Source) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Resource_DiskInfo_Source) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + if mj.Path != nil { + if true { + buf.WriteString(`"path":`) + + { + + err = mj.Path.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Mount != nil { + if true { + buf.WriteString(`"mount":`) + + { + + err = mj.Mount.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.ID != nil { + if true { + buf.WriteString(`"id":`) + fflib.WriteJsonString(buf, string(*mj.ID)) + buf.WriteByte(',') + } + } + if mj.Metadata != nil { + if true { + buf.WriteString(`"metadata":`) + + { + + err = mj.Metadata.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Profile != nil { + if true { + buf.WriteString(`"profile":`) + fflib.WriteJsonString(buf, string(*mj.Profile)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Resource_DiskInfo_Sourcebase = iota + ffj_t_Resource_DiskInfo_Sourceno_such_key + + ffj_t_Resource_DiskInfo_Source_Type + + ffj_t_Resource_DiskInfo_Source_Path + + ffj_t_Resource_DiskInfo_Source_Mount + + ffj_t_Resource_DiskInfo_Source_ID + + ffj_t_Resource_DiskInfo_Source_Metadata + + ffj_t_Resource_DiskInfo_Source_Profile +) + +var ffj_key_Resource_DiskInfo_Source_Type = []byte("type") + +var ffj_key_Resource_DiskInfo_Source_Path = []byte("path") + +var ffj_key_Resource_DiskInfo_Source_Mount = []byte("mount") + +var ffj_key_Resource_DiskInfo_Source_ID = []byte("id") + +var ffj_key_Resource_DiskInfo_Source_Metadata = []byte("metadata") + +var ffj_key_Resource_DiskInfo_Source_Profile = []byte("profile") + +func (uj *Resource_DiskInfo_Source) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Resource_DiskInfo_Source) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Resource_DiskInfo_Sourcebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Resource_DiskInfo_Sourceno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'i': + + if bytes.Equal(ffj_key_Resource_DiskInfo_Source_ID, kn) { + currentKey = ffj_t_Resource_DiskInfo_Source_ID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'm': + + if bytes.Equal(ffj_key_Resource_DiskInfo_Source_Mount, kn) { + currentKey = ffj_t_Resource_DiskInfo_Source_Mount + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Resource_DiskInfo_Source_Metadata, kn) { + currentKey = ffj_t_Resource_DiskInfo_Source_Metadata + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_Resource_DiskInfo_Source_Path, kn) { + currentKey = ffj_t_Resource_DiskInfo_Source_Path + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Resource_DiskInfo_Source_Profile, kn) { + currentKey = ffj_t_Resource_DiskInfo_Source_Profile + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_Resource_DiskInfo_Source_Type, kn) { + currentKey = ffj_t_Resource_DiskInfo_Source_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Resource_DiskInfo_Source_Profile, kn) { + currentKey = ffj_t_Resource_DiskInfo_Source_Profile + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Resource_DiskInfo_Source_Metadata, kn) { + currentKey = ffj_t_Resource_DiskInfo_Source_Metadata + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Resource_DiskInfo_Source_ID, kn) { + currentKey = ffj_t_Resource_DiskInfo_Source_ID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Resource_DiskInfo_Source_Mount, kn) { + currentKey = ffj_t_Resource_DiskInfo_Source_Mount + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Resource_DiskInfo_Source_Path, kn) { + currentKey = ffj_t_Resource_DiskInfo_Source_Path + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Resource_DiskInfo_Source_Type, kn) { + currentKey = ffj_t_Resource_DiskInfo_Source_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Resource_DiskInfo_Sourceno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Resource_DiskInfo_Source_Type: + goto handle_Type + + case ffj_t_Resource_DiskInfo_Source_Path: + goto handle_Path + + case ffj_t_Resource_DiskInfo_Source_Mount: + goto handle_Mount + + case ffj_t_Resource_DiskInfo_Source_ID: + goto handle_ID + + case ffj_t_Resource_DiskInfo_Source_Metadata: + goto handle_Metadata + + case ffj_t_Resource_DiskInfo_Source_Profile: + goto handle_Profile + + case ffj_t_Resource_DiskInfo_Sourceno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=mesos.Resource_DiskInfo_Source_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Path: + + /* handler: uj.Path type=mesos.Resource_DiskInfo_Source_Path kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Path = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Path == nil { + uj.Path = new(Resource_DiskInfo_Source_Path) + } + + err = uj.Path.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Mount: + + /* handler: uj.Mount type=mesos.Resource_DiskInfo_Source_Mount kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Mount = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Mount == nil { + uj.Mount = new(Resource_DiskInfo_Source_Mount) + } + + err = uj.Mount.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ID: + + /* handler: uj.ID type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.ID = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.ID = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Metadata: + + /* handler: uj.Metadata type=mesos.Labels kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Metadata = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Metadata == nil { + uj.Metadata = new(Labels) + } + + err = uj.Metadata.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Profile: + + /* handler: uj.Profile type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Profile = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Profile = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Resource_DiskInfo_Source_Mount) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Resource_DiskInfo_Source_Mount) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Root != nil { + if true { + buf.WriteString(`"root":`) + fflib.WriteJsonString(buf, string(*mj.Root)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Resource_DiskInfo_Source_Mountbase = iota + ffj_t_Resource_DiskInfo_Source_Mountno_such_key + + ffj_t_Resource_DiskInfo_Source_Mount_Root +) + +var ffj_key_Resource_DiskInfo_Source_Mount_Root = []byte("root") + +func (uj *Resource_DiskInfo_Source_Mount) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Resource_DiskInfo_Source_Mount) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Resource_DiskInfo_Source_Mountbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Resource_DiskInfo_Source_Mountno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'r': + + if bytes.Equal(ffj_key_Resource_DiskInfo_Source_Mount_Root, kn) { + currentKey = ffj_t_Resource_DiskInfo_Source_Mount_Root + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Resource_DiskInfo_Source_Mount_Root, kn) { + currentKey = ffj_t_Resource_DiskInfo_Source_Mount_Root + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Resource_DiskInfo_Source_Mountno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Resource_DiskInfo_Source_Mount_Root: + goto handle_Root + + case ffj_t_Resource_DiskInfo_Source_Mountno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Root: + + /* handler: uj.Root type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Root = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Root = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Resource_DiskInfo_Source_Path) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Resource_DiskInfo_Source_Path) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Root != nil { + if true { + buf.WriteString(`"root":`) + fflib.WriteJsonString(buf, string(*mj.Root)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Resource_DiskInfo_Source_Pathbase = iota + ffj_t_Resource_DiskInfo_Source_Pathno_such_key + + ffj_t_Resource_DiskInfo_Source_Path_Root +) + +var ffj_key_Resource_DiskInfo_Source_Path_Root = []byte("root") + +func (uj *Resource_DiskInfo_Source_Path) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Resource_DiskInfo_Source_Path) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Resource_DiskInfo_Source_Pathbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Resource_DiskInfo_Source_Pathno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'r': + + if bytes.Equal(ffj_key_Resource_DiskInfo_Source_Path_Root, kn) { + currentKey = ffj_t_Resource_DiskInfo_Source_Path_Root + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Resource_DiskInfo_Source_Path_Root, kn) { + currentKey = ffj_t_Resource_DiskInfo_Source_Path_Root + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Resource_DiskInfo_Source_Pathno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Resource_DiskInfo_Source_Path_Root: + goto handle_Root + + case ffj_t_Resource_DiskInfo_Source_Pathno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Root: + + /* handler: uj.Root type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Root = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Root = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Resource_ReservationInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Resource_ReservationInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Type != nil { + if true { + buf.WriteString(`"type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + if mj.Role != nil { + if true { + buf.WriteString(`"role":`) + fflib.WriteJsonString(buf, string(*mj.Role)) + buf.WriteByte(',') + } + } + if mj.Principal != nil { + if true { + buf.WriteString(`"principal":`) + fflib.WriteJsonString(buf, string(*mj.Principal)) + buf.WriteByte(',') + } + } + if mj.Labels != nil { + if true { + buf.WriteString(`"labels":`) + + { + + err = mj.Labels.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Resource_ReservationInfobase = iota + ffj_t_Resource_ReservationInfono_such_key + + ffj_t_Resource_ReservationInfo_Type + + ffj_t_Resource_ReservationInfo_Role + + ffj_t_Resource_ReservationInfo_Principal + + ffj_t_Resource_ReservationInfo_Labels +) + +var ffj_key_Resource_ReservationInfo_Type = []byte("type") + +var ffj_key_Resource_ReservationInfo_Role = []byte("role") + +var ffj_key_Resource_ReservationInfo_Principal = []byte("principal") + +var ffj_key_Resource_ReservationInfo_Labels = []byte("labels") + +func (uj *Resource_ReservationInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Resource_ReservationInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Resource_ReservationInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Resource_ReservationInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'l': + + if bytes.Equal(ffj_key_Resource_ReservationInfo_Labels, kn) { + currentKey = ffj_t_Resource_ReservationInfo_Labels + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_Resource_ReservationInfo_Principal, kn) { + currentKey = ffj_t_Resource_ReservationInfo_Principal + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_Resource_ReservationInfo_Role, kn) { + currentKey = ffj_t_Resource_ReservationInfo_Role + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_Resource_ReservationInfo_Type, kn) { + currentKey = ffj_t_Resource_ReservationInfo_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Resource_ReservationInfo_Labels, kn) { + currentKey = ffj_t_Resource_ReservationInfo_Labels + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Resource_ReservationInfo_Principal, kn) { + currentKey = ffj_t_Resource_ReservationInfo_Principal + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Resource_ReservationInfo_Role, kn) { + currentKey = ffj_t_Resource_ReservationInfo_Role + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Resource_ReservationInfo_Type, kn) { + currentKey = ffj_t_Resource_ReservationInfo_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Resource_ReservationInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Resource_ReservationInfo_Type: + goto handle_Type + + case ffj_t_Resource_ReservationInfo_Role: + goto handle_Role + + case ffj_t_Resource_ReservationInfo_Principal: + goto handle_Principal + + case ffj_t_Resource_ReservationInfo_Labels: + goto handle_Labels + + case ffj_t_Resource_ReservationInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=mesos.Resource_ReservationInfo_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Type = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.Type == nil { + uj.Type = new(Resource_ReservationInfo_Type) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Role: + + /* handler: uj.Role type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Role = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Role = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Principal: + + /* handler: uj.Principal type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Principal = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Principal = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Labels: + + /* handler: uj.Labels type=mesos.Labels kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Labels = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Labels == nil { + uj.Labels = new(Labels) + } + + err = uj.Labels.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Resource_RevocableInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Resource_RevocableInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{}`) + return nil +} + +const ( + ffj_t_Resource_RevocableInfobase = iota + ffj_t_Resource_RevocableInfono_such_key +) + +func (uj *Resource_RevocableInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Resource_RevocableInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Resource_RevocableInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Resource_RevocableInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + } + + currentKey = ffj_t_Resource_RevocableInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Resource_RevocableInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Resource_SharedInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Resource_SharedInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{}`) + return nil +} + +const ( + ffj_t_Resource_SharedInfobase = iota + ffj_t_Resource_SharedInfono_such_key +) + +func (uj *Resource_SharedInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Resource_SharedInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Resource_SharedInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Resource_SharedInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + } + + currentKey = ffj_t_Resource_SharedInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Resource_SharedInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Role) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Role) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"name":`) + fflib.WriteJsonString(buf, string(mj.Name)) + buf.WriteString(`,"weight":`) + fflib.AppendFloat(buf, float64(mj.Weight), 'g', -1, 64) + buf.WriteString(`,"frameworks":`) + if mj.Frameworks != nil { + buf.WriteString(`[`) + for i, v := range mj.Frameworks { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteString(`,"resources":`) + if mj.Resources != nil { + buf.WriteString(`[`) + for i, v := range mj.Resources { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Rolebase = iota + ffj_t_Roleno_such_key + + ffj_t_Role_Name + + ffj_t_Role_Weight + + ffj_t_Role_Frameworks + + ffj_t_Role_Resources +) + +var ffj_key_Role_Name = []byte("name") + +var ffj_key_Role_Weight = []byte("weight") + +var ffj_key_Role_Frameworks = []byte("frameworks") + +var ffj_key_Role_Resources = []byte("resources") + +func (uj *Role) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Role) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Rolebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Roleno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'f': + + if bytes.Equal(ffj_key_Role_Frameworks, kn) { + currentKey = ffj_t_Role_Frameworks + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'n': + + if bytes.Equal(ffj_key_Role_Name, kn) { + currentKey = ffj_t_Role_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_Role_Resources, kn) { + currentKey = ffj_t_Role_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'w': + + if bytes.Equal(ffj_key_Role_Weight, kn) { + currentKey = ffj_t_Role_Weight + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Role_Resources, kn) { + currentKey = ffj_t_Role_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Role_Frameworks, kn) { + currentKey = ffj_t_Role_Frameworks + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Role_Weight, kn) { + currentKey = ffj_t_Role_Weight + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Role_Name, kn) { + currentKey = ffj_t_Role_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Roleno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Role_Name: + goto handle_Name + + case ffj_t_Role_Weight: + goto handle_Weight + + case ffj_t_Role_Frameworks: + goto handle_Frameworks + + case ffj_t_Role_Resources: + goto handle_Resources + + case ffj_t_Roleno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Name: + + /* handler: uj.Name type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Name = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Weight: + + /* handler: uj.Weight type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + uj.Weight = float64(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Frameworks: + + /* handler: uj.Frameworks type=[]mesos.FrameworkID kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Frameworks = nil + } else { + + uj.Frameworks = []FrameworkID{} + + wantVal := true + + for { + + var tmp_uj__Frameworks FrameworkID + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Frameworks type=mesos.FrameworkID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Frameworks.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Frameworks = append(uj.Frameworks, tmp_uj__Frameworks) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Resources: + + /* handler: uj.Resources type=[]mesos.Resource kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Resources = nil + } else { + + uj.Resources = []Resource{} + + wantVal := true + + for { + + var tmp_uj__Resources Resource + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Resources type=mesos.Resource kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Resources.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Resources = append(uj.Resources, tmp_uj__Resources) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *SNMPStatistics) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *SNMPStatistics) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.IPStats != nil { + if true { + buf.WriteString(`"ip_stats":`) + + { + + err = mj.IPStats.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.ICMPStats != nil { + if true { + buf.WriteString(`"icmp_stats":`) + + { + + err = mj.ICMPStats.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.TCPStats != nil { + if true { + buf.WriteString(`"tcp_stats":`) + + { + + err = mj.TCPStats.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.UDPStats != nil { + if true { + buf.WriteString(`"udp_stats":`) + + { + + err = mj.UDPStats.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_SNMPStatisticsbase = iota + ffj_t_SNMPStatisticsno_such_key + + ffj_t_SNMPStatistics_IPStats + + ffj_t_SNMPStatistics_ICMPStats + + ffj_t_SNMPStatistics_TCPStats + + ffj_t_SNMPStatistics_UDPStats +) + +var ffj_key_SNMPStatistics_IPStats = []byte("ip_stats") + +var ffj_key_SNMPStatistics_ICMPStats = []byte("icmp_stats") + +var ffj_key_SNMPStatistics_TCPStats = []byte("tcp_stats") + +var ffj_key_SNMPStatistics_UDPStats = []byte("udp_stats") + +func (uj *SNMPStatistics) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *SNMPStatistics) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_SNMPStatisticsbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_SNMPStatisticsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'i': + + if bytes.Equal(ffj_key_SNMPStatistics_IPStats, kn) { + currentKey = ffj_t_SNMPStatistics_IPStats + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_SNMPStatistics_ICMPStats, kn) { + currentKey = ffj_t_SNMPStatistics_ICMPStats + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_SNMPStatistics_TCPStats, kn) { + currentKey = ffj_t_SNMPStatistics_TCPStats + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'u': + + if bytes.Equal(ffj_key_SNMPStatistics_UDPStats, kn) { + currentKey = ffj_t_SNMPStatistics_UDPStats + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_SNMPStatistics_UDPStats, kn) { + currentKey = ffj_t_SNMPStatistics_UDPStats + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_SNMPStatistics_TCPStats, kn) { + currentKey = ffj_t_SNMPStatistics_TCPStats + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_SNMPStatistics_ICMPStats, kn) { + currentKey = ffj_t_SNMPStatistics_ICMPStats + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_SNMPStatistics_IPStats, kn) { + currentKey = ffj_t_SNMPStatistics_IPStats + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_SNMPStatisticsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_SNMPStatistics_IPStats: + goto handle_IPStats + + case ffj_t_SNMPStatistics_ICMPStats: + goto handle_ICMPStats + + case ffj_t_SNMPStatistics_TCPStats: + goto handle_TCPStats + + case ffj_t_SNMPStatistics_UDPStats: + goto handle_UDPStats + + case ffj_t_SNMPStatisticsno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_IPStats: + + /* handler: uj.IPStats type=mesos.IpStatistics kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.IPStats = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.IPStats == nil { + uj.IPStats = new(IpStatistics) + } + + err = uj.IPStats.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ICMPStats: + + /* handler: uj.ICMPStats type=mesos.IcmpStatistics kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.ICMPStats = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.ICMPStats == nil { + uj.ICMPStats = new(IcmpStatistics) + } + + err = uj.ICMPStats.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_TCPStats: + + /* handler: uj.TCPStats type=mesos.TcpStatistics kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.TCPStats = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.TCPStats == nil { + uj.TCPStats = new(TcpStatistics) + } + + err = uj.TCPStats.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_UDPStats: + + /* handler: uj.UDPStats type=mesos.UdpStatistics kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.UDPStats = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.UDPStats == nil { + uj.UDPStats = new(UdpStatistics) + } + + err = uj.UDPStats.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Secret) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Secret) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + if mj.Reference != nil { + if true { + buf.WriteString(`"reference":`) + + { + + err = mj.Reference.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Value != nil { + if true { + buf.WriteString(`"value":`) + + { + + err = mj.Value.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Secretbase = iota + ffj_t_Secretno_such_key + + ffj_t_Secret_Type + + ffj_t_Secret_Reference + + ffj_t_Secret_Value +) + +var ffj_key_Secret_Type = []byte("type") + +var ffj_key_Secret_Reference = []byte("reference") + +var ffj_key_Secret_Value = []byte("value") + +func (uj *Secret) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Secret) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Secretbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Secretno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'r': + + if bytes.Equal(ffj_key_Secret_Reference, kn) { + currentKey = ffj_t_Secret_Reference + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_Secret_Type, kn) { + currentKey = ffj_t_Secret_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'v': + + if bytes.Equal(ffj_key_Secret_Value, kn) { + currentKey = ffj_t_Secret_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Secret_Value, kn) { + currentKey = ffj_t_Secret_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Secret_Reference, kn) { + currentKey = ffj_t_Secret_Reference + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Secret_Type, kn) { + currentKey = ffj_t_Secret_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Secretno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Secret_Type: + goto handle_Type + + case ffj_t_Secret_Reference: + goto handle_Reference + + case ffj_t_Secret_Value: + goto handle_Value + + case ffj_t_Secretno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=mesos.Secret_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Reference: + + /* handler: uj.Reference type=mesos.Secret_Reference kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Reference = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Reference == nil { + uj.Reference = new(Secret_Reference) + } + + err = uj.Reference.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Value: + + /* handler: uj.Value type=mesos.Secret_Value kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Value = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Value == nil { + uj.Value = new(Secret_Value) + } + + err = uj.Value.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Secret_Reference) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Secret_Reference) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "name":`) + fflib.WriteJsonString(buf, string(mj.Name)) + buf.WriteByte(',') + if mj.Key != nil { + if true { + buf.WriteString(`"key":`) + fflib.WriteJsonString(buf, string(*mj.Key)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Secret_Referencebase = iota + ffj_t_Secret_Referenceno_such_key + + ffj_t_Secret_Reference_Name + + ffj_t_Secret_Reference_Key +) + +var ffj_key_Secret_Reference_Name = []byte("name") + +var ffj_key_Secret_Reference_Key = []byte("key") + +func (uj *Secret_Reference) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Secret_Reference) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Secret_Referencebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Secret_Referenceno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'k': + + if bytes.Equal(ffj_key_Secret_Reference_Key, kn) { + currentKey = ffj_t_Secret_Reference_Key + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'n': + + if bytes.Equal(ffj_key_Secret_Reference_Name, kn) { + currentKey = ffj_t_Secret_Reference_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Secret_Reference_Key, kn) { + currentKey = ffj_t_Secret_Reference_Key + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Secret_Reference_Name, kn) { + currentKey = ffj_t_Secret_Reference_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Secret_Referenceno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Secret_Reference_Name: + goto handle_Name + + case ffj_t_Secret_Reference_Key: + goto handle_Key + + case ffj_t_Secret_Referenceno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Name: + + /* handler: uj.Name type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Name = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Key: + + /* handler: uj.Key type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Key = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Key = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Secret_Value) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Secret_Value) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if len(mj.Data) != 0 { + buf.WriteString(`"data":`) + if mj.Data != nil { + buf.WriteString(`"`) + { + enc := base64.NewEncoder(base64.StdEncoding, buf) + enc.Write(reflect.Indirect(reflect.ValueOf(mj.Data)).Bytes()) + enc.Close() + } + buf.WriteString(`"`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Secret_Valuebase = iota + ffj_t_Secret_Valueno_such_key + + ffj_t_Secret_Value_Data +) + +var ffj_key_Secret_Value_Data = []byte("data") + +func (uj *Secret_Value) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Secret_Value) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Secret_Valuebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Secret_Valueno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'd': + + if bytes.Equal(ffj_key_Secret_Value_Data, kn) { + currentKey = ffj_t_Secret_Value_Data + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Secret_Value_Data, kn) { + currentKey = ffj_t_Secret_Value_Data + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Secret_Valueno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Secret_Value_Data: + goto handle_Data + + case ffj_t_Secret_Valueno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Data: + + /* handler: uj.Data type=[]uint8 kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Data = nil + } else { + b := make([]byte, base64.StdEncoding.DecodedLen(fs.Output.Len())) + n, err := base64.StdEncoding.Decode(b, fs.Output.Bytes()) + if err != nil { + return fs.WrapErr(err) + } + + v := reflect.ValueOf(&uj.Data).Elem() + v.SetBytes(b[0:n]) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *TTYInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *TTYInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.WindowSize != nil { + if true { + buf.WriteString(`"window_size":`) + + { + + err = mj.WindowSize.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_TTYInfobase = iota + ffj_t_TTYInfono_such_key + + ffj_t_TTYInfo_WindowSize +) + +var ffj_key_TTYInfo_WindowSize = []byte("window_size") + +func (uj *TTYInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *TTYInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_TTYInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_TTYInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'w': + + if bytes.Equal(ffj_key_TTYInfo_WindowSize, kn) { + currentKey = ffj_t_TTYInfo_WindowSize + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_TTYInfo_WindowSize, kn) { + currentKey = ffj_t_TTYInfo_WindowSize + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_TTYInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_TTYInfo_WindowSize: + goto handle_WindowSize + + case ffj_t_TTYInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_WindowSize: + + /* handler: uj.WindowSize type=mesos.TTYInfo_WindowSize kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.WindowSize = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.WindowSize == nil { + uj.WindowSize = new(TTYInfo_WindowSize) + } + + err = uj.WindowSize.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *TTYInfo_WindowSize) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *TTYInfo_WindowSize) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"rows":`) + fflib.FormatBits2(buf, uint64(mj.Rows), 10, false) + buf.WriteString(`,"columns":`) + fflib.FormatBits2(buf, uint64(mj.Columns), 10, false) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_TTYInfo_WindowSizebase = iota + ffj_t_TTYInfo_WindowSizeno_such_key + + ffj_t_TTYInfo_WindowSize_Rows + + ffj_t_TTYInfo_WindowSize_Columns +) + +var ffj_key_TTYInfo_WindowSize_Rows = []byte("rows") + +var ffj_key_TTYInfo_WindowSize_Columns = []byte("columns") + +func (uj *TTYInfo_WindowSize) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *TTYInfo_WindowSize) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_TTYInfo_WindowSizebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_TTYInfo_WindowSizeno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_TTYInfo_WindowSize_Columns, kn) { + currentKey = ffj_t_TTYInfo_WindowSize_Columns + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_TTYInfo_WindowSize_Rows, kn) { + currentKey = ffj_t_TTYInfo_WindowSize_Rows + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_TTYInfo_WindowSize_Columns, kn) { + currentKey = ffj_t_TTYInfo_WindowSize_Columns + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TTYInfo_WindowSize_Rows, kn) { + currentKey = ffj_t_TTYInfo_WindowSize_Rows + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_TTYInfo_WindowSizeno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_TTYInfo_WindowSize_Rows: + goto handle_Rows + + case ffj_t_TTYInfo_WindowSize_Columns: + goto handle_Columns + + case ffj_t_TTYInfo_WindowSizeno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Rows: + + /* handler: uj.Rows type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + uj.Rows = uint32(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Columns: + + /* handler: uj.Columns type=uint32 kind=uint32 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint32", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 32) + + if err != nil { + return fs.WrapErr(err) + } + + uj.Columns = uint32(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Task) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Task) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "name":`) + fflib.WriteJsonString(buf, string(mj.Name)) + buf.WriteString(`,"task_id":`) + + { + + err = mj.TaskID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteString(`,"framework_id":`) + + { + + err = mj.FrameworkID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + if mj.ExecutorID != nil { + if true { + buf.WriteString(`"executor_id":`) + + { + + err = mj.ExecutorID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"agent_id":`) + + { + + err = mj.AgentID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + if mj.State != nil { + if true { + buf.WriteString(`"state":`) + + { + + obj, err = mj.State.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"resources":`) + if mj.Resources != nil { + buf.WriteString(`[`) + for i, v := range mj.Resources { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteString(`,"statuses":`) + if mj.Statuses != nil { + buf.WriteString(`[`) + for i, v := range mj.Statuses { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.StatusUpdateState != nil { + if true { + buf.WriteString(`"status_update_state":`) + + { + + obj, err = mj.StatusUpdateState.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + if len(mj.StatusUpdateUUID) != 0 { + buf.WriteString(`"status_update_uuid":`) + if mj.StatusUpdateUUID != nil { + buf.WriteString(`"`) + { + enc := base64.NewEncoder(base64.StdEncoding, buf) + enc.Write(reflect.Indirect(reflect.ValueOf(mj.StatusUpdateUUID)).Bytes()) + enc.Close() + } + buf.WriteString(`"`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + } + if mj.Labels != nil { + if true { + buf.WriteString(`"labels":`) + + { + + err = mj.Labels.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Discovery != nil { + if true { + buf.WriteString(`"discovery":`) + + { + + err = mj.Discovery.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Container != nil { + if true { + buf.WriteString(`"container":`) + + { + + err = mj.Container.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.User != nil { + if true { + buf.WriteString(`"user":`) + fflib.WriteJsonString(buf, string(*mj.User)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Taskbase = iota + ffj_t_Taskno_such_key + + ffj_t_Task_Name + + ffj_t_Task_TaskID + + ffj_t_Task_FrameworkID + + ffj_t_Task_ExecutorID + + ffj_t_Task_AgentID + + ffj_t_Task_State + + ffj_t_Task_Resources + + ffj_t_Task_Statuses + + ffj_t_Task_StatusUpdateState + + ffj_t_Task_StatusUpdateUUID + + ffj_t_Task_Labels + + ffj_t_Task_Discovery + + ffj_t_Task_Container + + ffj_t_Task_User +) + +var ffj_key_Task_Name = []byte("name") + +var ffj_key_Task_TaskID = []byte("task_id") + +var ffj_key_Task_FrameworkID = []byte("framework_id") + +var ffj_key_Task_ExecutorID = []byte("executor_id") + +var ffj_key_Task_AgentID = []byte("agent_id") + +var ffj_key_Task_State = []byte("state") + +var ffj_key_Task_Resources = []byte("resources") + +var ffj_key_Task_Statuses = []byte("statuses") + +var ffj_key_Task_StatusUpdateState = []byte("status_update_state") + +var ffj_key_Task_StatusUpdateUUID = []byte("status_update_uuid") + +var ffj_key_Task_Labels = []byte("labels") + +var ffj_key_Task_Discovery = []byte("discovery") + +var ffj_key_Task_Container = []byte("container") + +var ffj_key_Task_User = []byte("user") + +func (uj *Task) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Task) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Taskbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Taskno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'a': + + if bytes.Equal(ffj_key_Task_AgentID, kn) { + currentKey = ffj_t_Task_AgentID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'c': + + if bytes.Equal(ffj_key_Task_Container, kn) { + currentKey = ffj_t_Task_Container + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'd': + + if bytes.Equal(ffj_key_Task_Discovery, kn) { + currentKey = ffj_t_Task_Discovery + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'e': + + if bytes.Equal(ffj_key_Task_ExecutorID, kn) { + currentKey = ffj_t_Task_ExecutorID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'f': + + if bytes.Equal(ffj_key_Task_FrameworkID, kn) { + currentKey = ffj_t_Task_FrameworkID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'l': + + if bytes.Equal(ffj_key_Task_Labels, kn) { + currentKey = ffj_t_Task_Labels + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'n': + + if bytes.Equal(ffj_key_Task_Name, kn) { + currentKey = ffj_t_Task_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_Task_Resources, kn) { + currentKey = ffj_t_Task_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_Task_State, kn) { + currentKey = ffj_t_Task_State + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Task_Statuses, kn) { + currentKey = ffj_t_Task_Statuses + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Task_StatusUpdateState, kn) { + currentKey = ffj_t_Task_StatusUpdateState + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Task_StatusUpdateUUID, kn) { + currentKey = ffj_t_Task_StatusUpdateUUID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_Task_TaskID, kn) { + currentKey = ffj_t_Task_TaskID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'u': + + if bytes.Equal(ffj_key_Task_User, kn) { + currentKey = ffj_t_Task_User + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Task_User, kn) { + currentKey = ffj_t_Task_User + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Task_Container, kn) { + currentKey = ffj_t_Task_Container + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Task_Discovery, kn) { + currentKey = ffj_t_Task_Discovery + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Task_Labels, kn) { + currentKey = ffj_t_Task_Labels + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Task_StatusUpdateUUID, kn) { + currentKey = ffj_t_Task_StatusUpdateUUID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Task_StatusUpdateState, kn) { + currentKey = ffj_t_Task_StatusUpdateState + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Task_Statuses, kn) { + currentKey = ffj_t_Task_Statuses + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Task_Resources, kn) { + currentKey = ffj_t_Task_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Task_State, kn) { + currentKey = ffj_t_Task_State + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Task_AgentID, kn) { + currentKey = ffj_t_Task_AgentID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Task_ExecutorID, kn) { + currentKey = ffj_t_Task_ExecutorID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Task_FrameworkID, kn) { + currentKey = ffj_t_Task_FrameworkID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Task_TaskID, kn) { + currentKey = ffj_t_Task_TaskID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Task_Name, kn) { + currentKey = ffj_t_Task_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Taskno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Task_Name: + goto handle_Name + + case ffj_t_Task_TaskID: + goto handle_TaskID + + case ffj_t_Task_FrameworkID: + goto handle_FrameworkID + + case ffj_t_Task_ExecutorID: + goto handle_ExecutorID + + case ffj_t_Task_AgentID: + goto handle_AgentID + + case ffj_t_Task_State: + goto handle_State + + case ffj_t_Task_Resources: + goto handle_Resources + + case ffj_t_Task_Statuses: + goto handle_Statuses + + case ffj_t_Task_StatusUpdateState: + goto handle_StatusUpdateState + + case ffj_t_Task_StatusUpdateUUID: + goto handle_StatusUpdateUUID + + case ffj_t_Task_Labels: + goto handle_Labels + + case ffj_t_Task_Discovery: + goto handle_Discovery + + case ffj_t_Task_Container: + goto handle_Container + + case ffj_t_Task_User: + goto handle_User + + case ffj_t_Taskno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Name: + + /* handler: uj.Name type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Name = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_TaskID: + + /* handler: uj.TaskID type=mesos.TaskID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.TaskID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_FrameworkID: + + /* handler: uj.FrameworkID type=mesos.FrameworkID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.FrameworkID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ExecutorID: + + /* handler: uj.ExecutorID type=mesos.ExecutorID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.ExecutorID = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.ExecutorID == nil { + uj.ExecutorID = new(ExecutorID) + } + + err = uj.ExecutorID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_AgentID: + + /* handler: uj.AgentID type=mesos.AgentID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.AgentID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_State: + + /* handler: uj.State type=mesos.TaskState kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.State = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.State == nil { + uj.State = new(TaskState) + } + + err = uj.State.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Resources: + + /* handler: uj.Resources type=[]mesos.Resource kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Resources = nil + } else { + + uj.Resources = []Resource{} + + wantVal := true + + for { + + var tmp_uj__Resources Resource + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Resources type=mesos.Resource kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Resources.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Resources = append(uj.Resources, tmp_uj__Resources) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Statuses: + + /* handler: uj.Statuses type=[]mesos.TaskStatus kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Statuses = nil + } else { + + uj.Statuses = []TaskStatus{} + + wantVal := true + + for { + + var tmp_uj__Statuses TaskStatus + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Statuses type=mesos.TaskStatus kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Statuses.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Statuses = append(uj.Statuses, tmp_uj__Statuses) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_StatusUpdateState: + + /* handler: uj.StatusUpdateState type=mesos.TaskState kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.StatusUpdateState = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.StatusUpdateState == nil { + uj.StatusUpdateState = new(TaskState) + } + + err = uj.StatusUpdateState.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_StatusUpdateUUID: + + /* handler: uj.StatusUpdateUUID type=[]uint8 kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.StatusUpdateUUID = nil + } else { + b := make([]byte, base64.StdEncoding.DecodedLen(fs.Output.Len())) + n, err := base64.StdEncoding.Decode(b, fs.Output.Bytes()) + if err != nil { + return fs.WrapErr(err) + } + + v := reflect.ValueOf(&uj.StatusUpdateUUID).Elem() + v.SetBytes(b[0:n]) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Labels: + + /* handler: uj.Labels type=mesos.Labels kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Labels = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Labels == nil { + uj.Labels = new(Labels) + } + + err = uj.Labels.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Discovery: + + /* handler: uj.Discovery type=mesos.DiscoveryInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Discovery = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Discovery == nil { + uj.Discovery = new(DiscoveryInfo) + } + + err = uj.Discovery.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Container: + + /* handler: uj.Container type=mesos.ContainerInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Container = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Container == nil { + uj.Container = new(ContainerInfo) + } + + err = uj.Container.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_User: + + /* handler: uj.User type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.User = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.User = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *TaskGroupInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *TaskGroupInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"tasks":`) + if mj.Tasks != nil { + buf.WriteString(`[`) + for i, v := range mj.Tasks { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_TaskGroupInfobase = iota + ffj_t_TaskGroupInfono_such_key + + ffj_t_TaskGroupInfo_Tasks +) + +var ffj_key_TaskGroupInfo_Tasks = []byte("tasks") + +func (uj *TaskGroupInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *TaskGroupInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_TaskGroupInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_TaskGroupInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 't': + + if bytes.Equal(ffj_key_TaskGroupInfo_Tasks, kn) { + currentKey = ffj_t_TaskGroupInfo_Tasks + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_TaskGroupInfo_Tasks, kn) { + currentKey = ffj_t_TaskGroupInfo_Tasks + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_TaskGroupInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_TaskGroupInfo_Tasks: + goto handle_Tasks + + case ffj_t_TaskGroupInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Tasks: + + /* handler: uj.Tasks type=[]mesos.TaskInfo kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Tasks = nil + } else { + + uj.Tasks = []TaskInfo{} + + wantVal := true + + for { + + var tmp_uj__Tasks TaskInfo + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Tasks type=mesos.TaskInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Tasks.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Tasks = append(uj.Tasks, tmp_uj__Tasks) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *TaskID) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *TaskID) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"value":`) + fflib.WriteJsonString(buf, string(mj.Value)) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_TaskIDbase = iota + ffj_t_TaskIDno_such_key + + ffj_t_TaskID_Value +) + +var ffj_key_TaskID_Value = []byte("value") + +func (uj *TaskID) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *TaskID) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_TaskIDbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_TaskIDno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'v': + + if bytes.Equal(ffj_key_TaskID_Value, kn) { + currentKey = ffj_t_TaskID_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_TaskID_Value, kn) { + currentKey = ffj_t_TaskID_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_TaskIDno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_TaskID_Value: + goto handle_Value + + case ffj_t_TaskIDno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Value: + + /* handler: uj.Value type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Value = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *TaskInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *TaskInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "name":`) + fflib.WriteJsonString(buf, string(mj.Name)) + buf.WriteString(`,"task_id":`) + + { + + err = mj.TaskID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteString(`,"agent_id":`) + + { + + err = mj.AgentID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteString(`,"resources":`) + if mj.Resources != nil { + buf.WriteString(`[`) + for i, v := range mj.Resources { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.Executor != nil { + if true { + buf.WriteString(`"executor":`) + + { + + err = mj.Executor.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Command != nil { + if true { + buf.WriteString(`"command":`) + + { + + err = mj.Command.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Container != nil { + if true { + buf.WriteString(`"container":`) + + { + + err = mj.Container.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.HealthCheck != nil { + if true { + buf.WriteString(`"health_check":`) + + { + + err = mj.HealthCheck.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Check != nil { + if true { + buf.WriteString(`"check":`) + + { + + err = mj.Check.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.KillPolicy != nil { + if true { + buf.WriteString(`"kill_policy":`) + + { + + err = mj.KillPolicy.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if len(mj.Data) != 0 { + buf.WriteString(`"data":`) + if mj.Data != nil { + buf.WriteString(`"`) + { + enc := base64.NewEncoder(base64.StdEncoding, buf) + enc.Write(reflect.Indirect(reflect.ValueOf(mj.Data)).Bytes()) + enc.Close() + } + buf.WriteString(`"`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + } + if mj.Labels != nil { + if true { + buf.WriteString(`"labels":`) + + { + + err = mj.Labels.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Discovery != nil { + if true { + buf.WriteString(`"discovery":`) + + { + + err = mj.Discovery.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_TaskInfobase = iota + ffj_t_TaskInfono_such_key + + ffj_t_TaskInfo_Name + + ffj_t_TaskInfo_TaskID + + ffj_t_TaskInfo_AgentID + + ffj_t_TaskInfo_Resources + + ffj_t_TaskInfo_Executor + + ffj_t_TaskInfo_Command + + ffj_t_TaskInfo_Container + + ffj_t_TaskInfo_HealthCheck + + ffj_t_TaskInfo_Check + + ffj_t_TaskInfo_KillPolicy + + ffj_t_TaskInfo_Data + + ffj_t_TaskInfo_Labels + + ffj_t_TaskInfo_Discovery +) + +var ffj_key_TaskInfo_Name = []byte("name") + +var ffj_key_TaskInfo_TaskID = []byte("task_id") + +var ffj_key_TaskInfo_AgentID = []byte("agent_id") + +var ffj_key_TaskInfo_Resources = []byte("resources") + +var ffj_key_TaskInfo_Executor = []byte("executor") + +var ffj_key_TaskInfo_Command = []byte("command") + +var ffj_key_TaskInfo_Container = []byte("container") + +var ffj_key_TaskInfo_HealthCheck = []byte("health_check") + +var ffj_key_TaskInfo_Check = []byte("check") + +var ffj_key_TaskInfo_KillPolicy = []byte("kill_policy") + +var ffj_key_TaskInfo_Data = []byte("data") + +var ffj_key_TaskInfo_Labels = []byte("labels") + +var ffj_key_TaskInfo_Discovery = []byte("discovery") + +func (uj *TaskInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *TaskInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_TaskInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_TaskInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'a': + + if bytes.Equal(ffj_key_TaskInfo_AgentID, kn) { + currentKey = ffj_t_TaskInfo_AgentID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'c': + + if bytes.Equal(ffj_key_TaskInfo_Command, kn) { + currentKey = ffj_t_TaskInfo_Command + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_TaskInfo_Container, kn) { + currentKey = ffj_t_TaskInfo_Container + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_TaskInfo_Check, kn) { + currentKey = ffj_t_TaskInfo_Check + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'd': + + if bytes.Equal(ffj_key_TaskInfo_Data, kn) { + currentKey = ffj_t_TaskInfo_Data + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_TaskInfo_Discovery, kn) { + currentKey = ffj_t_TaskInfo_Discovery + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'e': + + if bytes.Equal(ffj_key_TaskInfo_Executor, kn) { + currentKey = ffj_t_TaskInfo_Executor + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'h': + + if bytes.Equal(ffj_key_TaskInfo_HealthCheck, kn) { + currentKey = ffj_t_TaskInfo_HealthCheck + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'k': + + if bytes.Equal(ffj_key_TaskInfo_KillPolicy, kn) { + currentKey = ffj_t_TaskInfo_KillPolicy + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'l': + + if bytes.Equal(ffj_key_TaskInfo_Labels, kn) { + currentKey = ffj_t_TaskInfo_Labels + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'n': + + if bytes.Equal(ffj_key_TaskInfo_Name, kn) { + currentKey = ffj_t_TaskInfo_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_TaskInfo_Resources, kn) { + currentKey = ffj_t_TaskInfo_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_TaskInfo_TaskID, kn) { + currentKey = ffj_t_TaskInfo_TaskID + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_TaskInfo_Discovery, kn) { + currentKey = ffj_t_TaskInfo_Discovery + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TaskInfo_Labels, kn) { + currentKey = ffj_t_TaskInfo_Labels + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_TaskInfo_Data, kn) { + currentKey = ffj_t_TaskInfo_Data + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TaskInfo_KillPolicy, kn) { + currentKey = ffj_t_TaskInfo_KillPolicy + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TaskInfo_Check, kn) { + currentKey = ffj_t_TaskInfo_Check + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TaskInfo_HealthCheck, kn) { + currentKey = ffj_t_TaskInfo_HealthCheck + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_TaskInfo_Container, kn) { + currentKey = ffj_t_TaskInfo_Container + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_TaskInfo_Command, kn) { + currentKey = ffj_t_TaskInfo_Command + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_TaskInfo_Executor, kn) { + currentKey = ffj_t_TaskInfo_Executor + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TaskInfo_Resources, kn) { + currentKey = ffj_t_TaskInfo_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_TaskInfo_AgentID, kn) { + currentKey = ffj_t_TaskInfo_AgentID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TaskInfo_TaskID, kn) { + currentKey = ffj_t_TaskInfo_TaskID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_TaskInfo_Name, kn) { + currentKey = ffj_t_TaskInfo_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_TaskInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_TaskInfo_Name: + goto handle_Name + + case ffj_t_TaskInfo_TaskID: + goto handle_TaskID + + case ffj_t_TaskInfo_AgentID: + goto handle_AgentID + + case ffj_t_TaskInfo_Resources: + goto handle_Resources + + case ffj_t_TaskInfo_Executor: + goto handle_Executor + + case ffj_t_TaskInfo_Command: + goto handle_Command + + case ffj_t_TaskInfo_Container: + goto handle_Container + + case ffj_t_TaskInfo_HealthCheck: + goto handle_HealthCheck + + case ffj_t_TaskInfo_Check: + goto handle_Check + + case ffj_t_TaskInfo_KillPolicy: + goto handle_KillPolicy + + case ffj_t_TaskInfo_Data: + goto handle_Data + + case ffj_t_TaskInfo_Labels: + goto handle_Labels + + case ffj_t_TaskInfo_Discovery: + goto handle_Discovery + + case ffj_t_TaskInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Name: + + /* handler: uj.Name type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Name = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_TaskID: + + /* handler: uj.TaskID type=mesos.TaskID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.TaskID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_AgentID: + + /* handler: uj.AgentID type=mesos.AgentID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.AgentID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Resources: + + /* handler: uj.Resources type=[]mesos.Resource kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Resources = nil + } else { + + uj.Resources = []Resource{} + + wantVal := true + + for { + + var tmp_uj__Resources Resource + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Resources type=mesos.Resource kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Resources.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Resources = append(uj.Resources, tmp_uj__Resources) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Executor: + + /* handler: uj.Executor type=mesos.ExecutorInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Executor = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Executor == nil { + uj.Executor = new(ExecutorInfo) + } + + err = uj.Executor.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Command: + + /* handler: uj.Command type=mesos.CommandInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Command = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Command == nil { + uj.Command = new(CommandInfo) + } + + err = uj.Command.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Container: + + /* handler: uj.Container type=mesos.ContainerInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Container = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Container == nil { + uj.Container = new(ContainerInfo) + } + + err = uj.Container.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_HealthCheck: + + /* handler: uj.HealthCheck type=mesos.HealthCheck kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.HealthCheck = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.HealthCheck == nil { + uj.HealthCheck = new(HealthCheck) + } + + err = uj.HealthCheck.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Check: + + /* handler: uj.Check type=mesos.CheckInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Check = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Check == nil { + uj.Check = new(CheckInfo) + } + + err = uj.Check.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_KillPolicy: + + /* handler: uj.KillPolicy type=mesos.KillPolicy kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.KillPolicy = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.KillPolicy == nil { + uj.KillPolicy = new(KillPolicy) + } + + err = uj.KillPolicy.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Data: + + /* handler: uj.Data type=[]uint8 kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Data = nil + } else { + b := make([]byte, base64.StdEncoding.DecodedLen(fs.Output.Len())) + n, err := base64.StdEncoding.Decode(b, fs.Output.Bytes()) + if err != nil { + return fs.WrapErr(err) + } + + v := reflect.ValueOf(&uj.Data).Elem() + v.SetBytes(b[0:n]) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Labels: + + /* handler: uj.Labels type=mesos.Labels kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Labels = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Labels == nil { + uj.Labels = new(Labels) + } + + err = uj.Labels.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Discovery: + + /* handler: uj.Discovery type=mesos.DiscoveryInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Discovery = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Discovery == nil { + uj.Discovery = new(DiscoveryInfo) + } + + err = uj.Discovery.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *TaskResourceLimitation) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *TaskResourceLimitation) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"resources":`) + if mj.Resources != nil { + buf.WriteString(`[`) + for i, v := range mj.Resources { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_TaskResourceLimitationbase = iota + ffj_t_TaskResourceLimitationno_such_key + + ffj_t_TaskResourceLimitation_Resources +) + +var ffj_key_TaskResourceLimitation_Resources = []byte("resources") + +func (uj *TaskResourceLimitation) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *TaskResourceLimitation) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_TaskResourceLimitationbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_TaskResourceLimitationno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'r': + + if bytes.Equal(ffj_key_TaskResourceLimitation_Resources, kn) { + currentKey = ffj_t_TaskResourceLimitation_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_TaskResourceLimitation_Resources, kn) { + currentKey = ffj_t_TaskResourceLimitation_Resources + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_TaskResourceLimitationno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_TaskResourceLimitation_Resources: + goto handle_Resources + + case ffj_t_TaskResourceLimitationno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Resources: + + /* handler: uj.Resources type=[]mesos.Resource kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Resources = nil + } else { + + uj.Resources = []Resource{} + + wantVal := true + + for { + + var tmp_uj__Resources Resource + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Resources type=mesos.Resource kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Resources.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Resources = append(uj.Resources, tmp_uj__Resources) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *TaskStatus) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *TaskStatus) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "task_id":`) + + { + + err = mj.TaskID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + if mj.State != nil { + if true { + buf.WriteString(`"state":`) + + { + + obj, err = mj.State.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + if mj.Message != nil { + if true { + buf.WriteString(`"message":`) + fflib.WriteJsonString(buf, string(*mj.Message)) + buf.WriteByte(',') + } + } + if mj.Source != nil { + if true { + buf.WriteString(`"source":`) + + { + + obj, err = mj.Source.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + if mj.Reason != nil { + if true { + buf.WriteString(`"reason":`) + + { + + obj, err = mj.Reason.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + if len(mj.Data) != 0 { + buf.WriteString(`"data":`) + if mj.Data != nil { + buf.WriteString(`"`) + { + enc := base64.NewEncoder(base64.StdEncoding, buf) + enc.Write(reflect.Indirect(reflect.ValueOf(mj.Data)).Bytes()) + enc.Close() + } + buf.WriteString(`"`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + } + if mj.AgentID != nil { + if true { + buf.WriteString(`"agent_id":`) + + { + + err = mj.AgentID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.ExecutorID != nil { + if true { + buf.WriteString(`"executor_id":`) + + { + + err = mj.ExecutorID.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Timestamp != nil { + if true { + buf.WriteString(`"timestamp":`) + fflib.AppendFloat(buf, float64(*mj.Timestamp), 'g', -1, 64) + buf.WriteByte(',') + } + } + if len(mj.UUID) != 0 { + buf.WriteString(`"uuid":`) + if mj.UUID != nil { + buf.WriteString(`"`) + { + enc := base64.NewEncoder(base64.StdEncoding, buf) + enc.Write(reflect.Indirect(reflect.ValueOf(mj.UUID)).Bytes()) + enc.Close() + } + buf.WriteString(`"`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + } + if mj.Healthy != nil { + if true { + if *mj.Healthy { + buf.WriteString(`"healthy":true`) + } else { + buf.WriteString(`"healthy":false`) + } + buf.WriteByte(',') + } + } + if mj.CheckStatus != nil { + if true { + buf.WriteString(`"check_status":`) + + { + + err = mj.CheckStatus.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Labels != nil { + if true { + buf.WriteString(`"labels":`) + + { + + err = mj.Labels.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.ContainerStatus != nil { + if true { + buf.WriteString(`"container_status":`) + + { + + err = mj.ContainerStatus.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.UnreachableTime != nil { + if true { + buf.WriteString(`"unreachable_time":`) + + { + + err = mj.UnreachableTime.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Limitation != nil { + if true { + buf.WriteString(`"limitation":`) + + { + + err = mj.Limitation.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_TaskStatusbase = iota + ffj_t_TaskStatusno_such_key + + ffj_t_TaskStatus_TaskID + + ffj_t_TaskStatus_State + + ffj_t_TaskStatus_Message + + ffj_t_TaskStatus_Source + + ffj_t_TaskStatus_Reason + + ffj_t_TaskStatus_Data + + ffj_t_TaskStatus_AgentID + + ffj_t_TaskStatus_ExecutorID + + ffj_t_TaskStatus_Timestamp + + ffj_t_TaskStatus_UUID + + ffj_t_TaskStatus_Healthy + + ffj_t_TaskStatus_CheckStatus + + ffj_t_TaskStatus_Labels + + ffj_t_TaskStatus_ContainerStatus + + ffj_t_TaskStatus_UnreachableTime + + ffj_t_TaskStatus_Limitation +) + +var ffj_key_TaskStatus_TaskID = []byte("task_id") + +var ffj_key_TaskStatus_State = []byte("state") + +var ffj_key_TaskStatus_Message = []byte("message") + +var ffj_key_TaskStatus_Source = []byte("source") + +var ffj_key_TaskStatus_Reason = []byte("reason") + +var ffj_key_TaskStatus_Data = []byte("data") + +var ffj_key_TaskStatus_AgentID = []byte("agent_id") + +var ffj_key_TaskStatus_ExecutorID = []byte("executor_id") + +var ffj_key_TaskStatus_Timestamp = []byte("timestamp") + +var ffj_key_TaskStatus_UUID = []byte("uuid") + +var ffj_key_TaskStatus_Healthy = []byte("healthy") + +var ffj_key_TaskStatus_CheckStatus = []byte("check_status") + +var ffj_key_TaskStatus_Labels = []byte("labels") + +var ffj_key_TaskStatus_ContainerStatus = []byte("container_status") + +var ffj_key_TaskStatus_UnreachableTime = []byte("unreachable_time") + +var ffj_key_TaskStatus_Limitation = []byte("limitation") + +func (uj *TaskStatus) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *TaskStatus) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_TaskStatusbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_TaskStatusno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'a': + + if bytes.Equal(ffj_key_TaskStatus_AgentID, kn) { + currentKey = ffj_t_TaskStatus_AgentID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'c': + + if bytes.Equal(ffj_key_TaskStatus_CheckStatus, kn) { + currentKey = ffj_t_TaskStatus_CheckStatus + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_TaskStatus_ContainerStatus, kn) { + currentKey = ffj_t_TaskStatus_ContainerStatus + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'd': + + if bytes.Equal(ffj_key_TaskStatus_Data, kn) { + currentKey = ffj_t_TaskStatus_Data + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'e': + + if bytes.Equal(ffj_key_TaskStatus_ExecutorID, kn) { + currentKey = ffj_t_TaskStatus_ExecutorID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'h': + + if bytes.Equal(ffj_key_TaskStatus_Healthy, kn) { + currentKey = ffj_t_TaskStatus_Healthy + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'l': + + if bytes.Equal(ffj_key_TaskStatus_Labels, kn) { + currentKey = ffj_t_TaskStatus_Labels + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_TaskStatus_Limitation, kn) { + currentKey = ffj_t_TaskStatus_Limitation + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'm': + + if bytes.Equal(ffj_key_TaskStatus_Message, kn) { + currentKey = ffj_t_TaskStatus_Message + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_TaskStatus_Reason, kn) { + currentKey = ffj_t_TaskStatus_Reason + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_TaskStatus_State, kn) { + currentKey = ffj_t_TaskStatus_State + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_TaskStatus_Source, kn) { + currentKey = ffj_t_TaskStatus_Source + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_TaskStatus_TaskID, kn) { + currentKey = ffj_t_TaskStatus_TaskID + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_TaskStatus_Timestamp, kn) { + currentKey = ffj_t_TaskStatus_Timestamp + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'u': + + if bytes.Equal(ffj_key_TaskStatus_UUID, kn) { + currentKey = ffj_t_TaskStatus_UUID + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_TaskStatus_UnreachableTime, kn) { + currentKey = ffj_t_TaskStatus_UnreachableTime + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_TaskStatus_Limitation, kn) { + currentKey = ffj_t_TaskStatus_Limitation + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_TaskStatus_UnreachableTime, kn) { + currentKey = ffj_t_TaskStatus_UnreachableTime + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TaskStatus_ContainerStatus, kn) { + currentKey = ffj_t_TaskStatus_ContainerStatus + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TaskStatus_Labels, kn) { + currentKey = ffj_t_TaskStatus_Labels + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TaskStatus_CheckStatus, kn) { + currentKey = ffj_t_TaskStatus_CheckStatus + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_TaskStatus_Healthy, kn) { + currentKey = ffj_t_TaskStatus_Healthy + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_TaskStatus_UUID, kn) { + currentKey = ffj_t_TaskStatus_UUID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TaskStatus_Timestamp, kn) { + currentKey = ffj_t_TaskStatus_Timestamp + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_TaskStatus_ExecutorID, kn) { + currentKey = ffj_t_TaskStatus_ExecutorID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_TaskStatus_AgentID, kn) { + currentKey = ffj_t_TaskStatus_AgentID + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_TaskStatus_Data, kn) { + currentKey = ffj_t_TaskStatus_Data + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TaskStatus_Reason, kn) { + currentKey = ffj_t_TaskStatus_Reason + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TaskStatus_Source, kn) { + currentKey = ffj_t_TaskStatus_Source + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TaskStatus_Message, kn) { + currentKey = ffj_t_TaskStatus_Message + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TaskStatus_State, kn) { + currentKey = ffj_t_TaskStatus_State + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TaskStatus_TaskID, kn) { + currentKey = ffj_t_TaskStatus_TaskID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_TaskStatusno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_TaskStatus_TaskID: + goto handle_TaskID + + case ffj_t_TaskStatus_State: + goto handle_State + + case ffj_t_TaskStatus_Message: + goto handle_Message + + case ffj_t_TaskStatus_Source: + goto handle_Source + + case ffj_t_TaskStatus_Reason: + goto handle_Reason + + case ffj_t_TaskStatus_Data: + goto handle_Data + + case ffj_t_TaskStatus_AgentID: + goto handle_AgentID + + case ffj_t_TaskStatus_ExecutorID: + goto handle_ExecutorID + + case ffj_t_TaskStatus_Timestamp: + goto handle_Timestamp + + case ffj_t_TaskStatus_UUID: + goto handle_UUID + + case ffj_t_TaskStatus_Healthy: + goto handle_Healthy + + case ffj_t_TaskStatus_CheckStatus: + goto handle_CheckStatus + + case ffj_t_TaskStatus_Labels: + goto handle_Labels + + case ffj_t_TaskStatus_ContainerStatus: + goto handle_ContainerStatus + + case ffj_t_TaskStatus_UnreachableTime: + goto handle_UnreachableTime + + case ffj_t_TaskStatus_Limitation: + goto handle_Limitation + + case ffj_t_TaskStatusno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_TaskID: + + /* handler: uj.TaskID type=mesos.TaskID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.TaskID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_State: + + /* handler: uj.State type=mesos.TaskState kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.State = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.State == nil { + uj.State = new(TaskState) + } + + err = uj.State.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Message: + + /* handler: uj.Message type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Message = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Message = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Source: + + /* handler: uj.Source type=mesos.TaskStatus_Source kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Source = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.Source == nil { + uj.Source = new(TaskStatus_Source) + } + + err = uj.Source.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Reason: + + /* handler: uj.Reason type=mesos.TaskStatus_Reason kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Reason = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.Reason == nil { + uj.Reason = new(TaskStatus_Reason) + } + + err = uj.Reason.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Data: + + /* handler: uj.Data type=[]uint8 kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Data = nil + } else { + b := make([]byte, base64.StdEncoding.DecodedLen(fs.Output.Len())) + n, err := base64.StdEncoding.Decode(b, fs.Output.Bytes()) + if err != nil { + return fs.WrapErr(err) + } + + v := reflect.ValueOf(&uj.Data).Elem() + v.SetBytes(b[0:n]) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_AgentID: + + /* handler: uj.AgentID type=mesos.AgentID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.AgentID = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.AgentID == nil { + uj.AgentID = new(AgentID) + } + + err = uj.AgentID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ExecutorID: + + /* handler: uj.ExecutorID type=mesos.ExecutorID kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.ExecutorID = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.ExecutorID == nil { + uj.ExecutorID = new(ExecutorID) + } + + err = uj.ExecutorID.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Timestamp: + + /* handler: uj.Timestamp type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Timestamp = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.Timestamp = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_UUID: + + /* handler: uj.UUID type=[]uint8 kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.UUID = nil + } else { + b := make([]byte, base64.StdEncoding.DecodedLen(fs.Output.Len())) + n, err := base64.StdEncoding.Decode(b, fs.Output.Bytes()) + if err != nil { + return fs.WrapErr(err) + } + + v := reflect.ValueOf(&uj.UUID).Elem() + v.SetBytes(b[0:n]) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Healthy: + + /* handler: uj.Healthy type=bool kind=bool quoted=false*/ + + { + if tok != fflib.FFTok_bool && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for bool", tok)) + } + } + + { + if tok == fflib.FFTok_null { + + uj.Healthy = nil + + } else { + tmpb := fs.Output.Bytes() + + var tval bool + + if bytes.Compare([]byte{'t', 'r', 'u', 'e'}, tmpb) == 0 { + + tval = true + + } else if bytes.Compare([]byte{'f', 'a', 'l', 's', 'e'}, tmpb) == 0 { + + tval = false + + } else { + err = errors.New("unexpected bytes for true/false value") + return fs.WrapErr(err) + } + + uj.Healthy = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_CheckStatus: + + /* handler: uj.CheckStatus type=mesos.CheckStatusInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.CheckStatus = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.CheckStatus == nil { + uj.CheckStatus = new(CheckStatusInfo) + } + + err = uj.CheckStatus.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Labels: + + /* handler: uj.Labels type=mesos.Labels kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Labels = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Labels == nil { + uj.Labels = new(Labels) + } + + err = uj.Labels.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ContainerStatus: + + /* handler: uj.ContainerStatus type=mesos.ContainerStatus kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.ContainerStatus = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.ContainerStatus == nil { + uj.ContainerStatus = new(ContainerStatus) + } + + err = uj.ContainerStatus.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_UnreachableTime: + + /* handler: uj.UnreachableTime type=mesos.TimeInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.UnreachableTime = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.UnreachableTime == nil { + uj.UnreachableTime = new(TimeInfo) + } + + err = uj.UnreachableTime.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Limitation: + + /* handler: uj.Limitation type=mesos.TaskResourceLimitation kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Limitation = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Limitation == nil { + uj.Limitation = new(TaskResourceLimitation) + } + + err = uj.Limitation.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *TcpStatistics) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *TcpStatistics) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.RtoAlgorithm != nil { + if true { + buf.WriteString(`"RtoAlgorithm":`) + fflib.FormatBits2(buf, uint64(*mj.RtoAlgorithm), 10, *mj.RtoAlgorithm < 0) + buf.WriteByte(',') + } + } + if mj.RtoMin != nil { + if true { + buf.WriteString(`"RtoMin":`) + fflib.FormatBits2(buf, uint64(*mj.RtoMin), 10, *mj.RtoMin < 0) + buf.WriteByte(',') + } + } + if mj.RtoMax != nil { + if true { + buf.WriteString(`"RtoMax":`) + fflib.FormatBits2(buf, uint64(*mj.RtoMax), 10, *mj.RtoMax < 0) + buf.WriteByte(',') + } + } + if mj.MaxConn != nil { + if true { + buf.WriteString(`"MaxConn":`) + fflib.FormatBits2(buf, uint64(*mj.MaxConn), 10, *mj.MaxConn < 0) + buf.WriteByte(',') + } + } + if mj.ActiveOpens != nil { + if true { + buf.WriteString(`"ActiveOpens":`) + fflib.FormatBits2(buf, uint64(*mj.ActiveOpens), 10, *mj.ActiveOpens < 0) + buf.WriteByte(',') + } + } + if mj.PassiveOpens != nil { + if true { + buf.WriteString(`"PassiveOpens":`) + fflib.FormatBits2(buf, uint64(*mj.PassiveOpens), 10, *mj.PassiveOpens < 0) + buf.WriteByte(',') + } + } + if mj.AttemptFails != nil { + if true { + buf.WriteString(`"AttemptFails":`) + fflib.FormatBits2(buf, uint64(*mj.AttemptFails), 10, *mj.AttemptFails < 0) + buf.WriteByte(',') + } + } + if mj.EstabResets != nil { + if true { + buf.WriteString(`"EstabResets":`) + fflib.FormatBits2(buf, uint64(*mj.EstabResets), 10, *mj.EstabResets < 0) + buf.WriteByte(',') + } + } + if mj.CurrEstab != nil { + if true { + buf.WriteString(`"CurrEstab":`) + fflib.FormatBits2(buf, uint64(*mj.CurrEstab), 10, *mj.CurrEstab < 0) + buf.WriteByte(',') + } + } + if mj.InSegs != nil { + if true { + buf.WriteString(`"InSegs":`) + fflib.FormatBits2(buf, uint64(*mj.InSegs), 10, *mj.InSegs < 0) + buf.WriteByte(',') + } + } + if mj.OutSegs != nil { + if true { + buf.WriteString(`"OutSegs":`) + fflib.FormatBits2(buf, uint64(*mj.OutSegs), 10, *mj.OutSegs < 0) + buf.WriteByte(',') + } + } + if mj.RetransSegs != nil { + if true { + buf.WriteString(`"RetransSegs":`) + fflib.FormatBits2(buf, uint64(*mj.RetransSegs), 10, *mj.RetransSegs < 0) + buf.WriteByte(',') + } + } + if mj.InErrs != nil { + if true { + buf.WriteString(`"InErrs":`) + fflib.FormatBits2(buf, uint64(*mj.InErrs), 10, *mj.InErrs < 0) + buf.WriteByte(',') + } + } + if mj.OutRsts != nil { + if true { + buf.WriteString(`"OutRsts":`) + fflib.FormatBits2(buf, uint64(*mj.OutRsts), 10, *mj.OutRsts < 0) + buf.WriteByte(',') + } + } + if mj.InCsumErrors != nil { + if true { + buf.WriteString(`"InCsumErrors":`) + fflib.FormatBits2(buf, uint64(*mj.InCsumErrors), 10, *mj.InCsumErrors < 0) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_TcpStatisticsbase = iota + ffj_t_TcpStatisticsno_such_key + + ffj_t_TcpStatistics_RtoAlgorithm + + ffj_t_TcpStatistics_RtoMin + + ffj_t_TcpStatistics_RtoMax + + ffj_t_TcpStatistics_MaxConn + + ffj_t_TcpStatistics_ActiveOpens + + ffj_t_TcpStatistics_PassiveOpens + + ffj_t_TcpStatistics_AttemptFails + + ffj_t_TcpStatistics_EstabResets + + ffj_t_TcpStatistics_CurrEstab + + ffj_t_TcpStatistics_InSegs + + ffj_t_TcpStatistics_OutSegs + + ffj_t_TcpStatistics_RetransSegs + + ffj_t_TcpStatistics_InErrs + + ffj_t_TcpStatistics_OutRsts + + ffj_t_TcpStatistics_InCsumErrors +) + +var ffj_key_TcpStatistics_RtoAlgorithm = []byte("RtoAlgorithm") + +var ffj_key_TcpStatistics_RtoMin = []byte("RtoMin") + +var ffj_key_TcpStatistics_RtoMax = []byte("RtoMax") + +var ffj_key_TcpStatistics_MaxConn = []byte("MaxConn") + +var ffj_key_TcpStatistics_ActiveOpens = []byte("ActiveOpens") + +var ffj_key_TcpStatistics_PassiveOpens = []byte("PassiveOpens") + +var ffj_key_TcpStatistics_AttemptFails = []byte("AttemptFails") + +var ffj_key_TcpStatistics_EstabResets = []byte("EstabResets") + +var ffj_key_TcpStatistics_CurrEstab = []byte("CurrEstab") + +var ffj_key_TcpStatistics_InSegs = []byte("InSegs") + +var ffj_key_TcpStatistics_OutSegs = []byte("OutSegs") + +var ffj_key_TcpStatistics_RetransSegs = []byte("RetransSegs") + +var ffj_key_TcpStatistics_InErrs = []byte("InErrs") + +var ffj_key_TcpStatistics_OutRsts = []byte("OutRsts") + +var ffj_key_TcpStatistics_InCsumErrors = []byte("InCsumErrors") + +func (uj *TcpStatistics) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *TcpStatistics) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_TcpStatisticsbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_TcpStatisticsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'A': + + if bytes.Equal(ffj_key_TcpStatistics_ActiveOpens, kn) { + currentKey = ffj_t_TcpStatistics_ActiveOpens + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_TcpStatistics_AttemptFails, kn) { + currentKey = ffj_t_TcpStatistics_AttemptFails + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'C': + + if bytes.Equal(ffj_key_TcpStatistics_CurrEstab, kn) { + currentKey = ffj_t_TcpStatistics_CurrEstab + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'E': + + if bytes.Equal(ffj_key_TcpStatistics_EstabResets, kn) { + currentKey = ffj_t_TcpStatistics_EstabResets + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'I': + + if bytes.Equal(ffj_key_TcpStatistics_InSegs, kn) { + currentKey = ffj_t_TcpStatistics_InSegs + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_TcpStatistics_InErrs, kn) { + currentKey = ffj_t_TcpStatistics_InErrs + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_TcpStatistics_InCsumErrors, kn) { + currentKey = ffj_t_TcpStatistics_InCsumErrors + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'M': + + if bytes.Equal(ffj_key_TcpStatistics_MaxConn, kn) { + currentKey = ffj_t_TcpStatistics_MaxConn + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'O': + + if bytes.Equal(ffj_key_TcpStatistics_OutSegs, kn) { + currentKey = ffj_t_TcpStatistics_OutSegs + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_TcpStatistics_OutRsts, kn) { + currentKey = ffj_t_TcpStatistics_OutRsts + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'P': + + if bytes.Equal(ffj_key_TcpStatistics_PassiveOpens, kn) { + currentKey = ffj_t_TcpStatistics_PassiveOpens + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'R': + + if bytes.Equal(ffj_key_TcpStatistics_RtoAlgorithm, kn) { + currentKey = ffj_t_TcpStatistics_RtoAlgorithm + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_TcpStatistics_RtoMin, kn) { + currentKey = ffj_t_TcpStatistics_RtoMin + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_TcpStatistics_RtoMax, kn) { + currentKey = ffj_t_TcpStatistics_RtoMax + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_TcpStatistics_RetransSegs, kn) { + currentKey = ffj_t_TcpStatistics_RetransSegs + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_TcpStatistics_InCsumErrors, kn) { + currentKey = ffj_t_TcpStatistics_InCsumErrors + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TcpStatistics_OutRsts, kn) { + currentKey = ffj_t_TcpStatistics_OutRsts + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TcpStatistics_InErrs, kn) { + currentKey = ffj_t_TcpStatistics_InErrs + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TcpStatistics_RetransSegs, kn) { + currentKey = ffj_t_TcpStatistics_RetransSegs + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TcpStatistics_OutSegs, kn) { + currentKey = ffj_t_TcpStatistics_OutSegs + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TcpStatistics_InSegs, kn) { + currentKey = ffj_t_TcpStatistics_InSegs + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TcpStatistics_CurrEstab, kn) { + currentKey = ffj_t_TcpStatistics_CurrEstab + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TcpStatistics_EstabResets, kn) { + currentKey = ffj_t_TcpStatistics_EstabResets + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TcpStatistics_AttemptFails, kn) { + currentKey = ffj_t_TcpStatistics_AttemptFails + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TcpStatistics_PassiveOpens, kn) { + currentKey = ffj_t_TcpStatistics_PassiveOpens + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TcpStatistics_ActiveOpens, kn) { + currentKey = ffj_t_TcpStatistics_ActiveOpens + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_TcpStatistics_MaxConn, kn) { + currentKey = ffj_t_TcpStatistics_MaxConn + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_TcpStatistics_RtoMax, kn) { + currentKey = ffj_t_TcpStatistics_RtoMax + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_TcpStatistics_RtoMin, kn) { + currentKey = ffj_t_TcpStatistics_RtoMin + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_TcpStatistics_RtoAlgorithm, kn) { + currentKey = ffj_t_TcpStatistics_RtoAlgorithm + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_TcpStatisticsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_TcpStatistics_RtoAlgorithm: + goto handle_RtoAlgorithm + + case ffj_t_TcpStatistics_RtoMin: + goto handle_RtoMin + + case ffj_t_TcpStatistics_RtoMax: + goto handle_RtoMax + + case ffj_t_TcpStatistics_MaxConn: + goto handle_MaxConn + + case ffj_t_TcpStatistics_ActiveOpens: + goto handle_ActiveOpens + + case ffj_t_TcpStatistics_PassiveOpens: + goto handle_PassiveOpens + + case ffj_t_TcpStatistics_AttemptFails: + goto handle_AttemptFails + + case ffj_t_TcpStatistics_EstabResets: + goto handle_EstabResets + + case ffj_t_TcpStatistics_CurrEstab: + goto handle_CurrEstab + + case ffj_t_TcpStatistics_InSegs: + goto handle_InSegs + + case ffj_t_TcpStatistics_OutSegs: + goto handle_OutSegs + + case ffj_t_TcpStatistics_RetransSegs: + goto handle_RetransSegs + + case ffj_t_TcpStatistics_InErrs: + goto handle_InErrs + + case ffj_t_TcpStatistics_OutRsts: + goto handle_OutRsts + + case ffj_t_TcpStatistics_InCsumErrors: + goto handle_InCsumErrors + + case ffj_t_TcpStatisticsno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_RtoAlgorithm: + + /* handler: uj.RtoAlgorithm type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.RtoAlgorithm = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.RtoAlgorithm = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_RtoMin: + + /* handler: uj.RtoMin type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.RtoMin = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.RtoMin = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_RtoMax: + + /* handler: uj.RtoMax type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.RtoMax = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.RtoMax = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_MaxConn: + + /* handler: uj.MaxConn type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.MaxConn = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.MaxConn = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ActiveOpens: + + /* handler: uj.ActiveOpens type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.ActiveOpens = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.ActiveOpens = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_PassiveOpens: + + /* handler: uj.PassiveOpens type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.PassiveOpens = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.PassiveOpens = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_AttemptFails: + + /* handler: uj.AttemptFails type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.AttemptFails = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.AttemptFails = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_EstabResets: + + /* handler: uj.EstabResets type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.EstabResets = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.EstabResets = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_CurrEstab: + + /* handler: uj.CurrEstab type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.CurrEstab = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.CurrEstab = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_InSegs: + + /* handler: uj.InSegs type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InSegs = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InSegs = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_OutSegs: + + /* handler: uj.OutSegs type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.OutSegs = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.OutSegs = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_RetransSegs: + + /* handler: uj.RetransSegs type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.RetransSegs = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.RetransSegs = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_InErrs: + + /* handler: uj.InErrs type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InErrs = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InErrs = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_OutRsts: + + /* handler: uj.OutRsts type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.OutRsts = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.OutRsts = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_InCsumErrors: + + /* handler: uj.InCsumErrors type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InCsumErrors = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InCsumErrors = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *TimeInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *TimeInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"nanoseconds":`) + fflib.FormatBits2(buf, uint64(mj.Nanoseconds), 10, mj.Nanoseconds < 0) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_TimeInfobase = iota + ffj_t_TimeInfono_such_key + + ffj_t_TimeInfo_Nanoseconds +) + +var ffj_key_TimeInfo_Nanoseconds = []byte("nanoseconds") + +func (uj *TimeInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *TimeInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_TimeInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_TimeInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'n': + + if bytes.Equal(ffj_key_TimeInfo_Nanoseconds, kn) { + currentKey = ffj_t_TimeInfo_Nanoseconds + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_TimeInfo_Nanoseconds, kn) { + currentKey = ffj_t_TimeInfo_Nanoseconds + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_TimeInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_TimeInfo_Nanoseconds: + goto handle_Nanoseconds + + case ffj_t_TimeInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Nanoseconds: + + /* handler: uj.Nanoseconds type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + uj.Nanoseconds = int64(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *TrafficControlStatistics) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *TrafficControlStatistics) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "id":`) + fflib.WriteJsonString(buf, string(mj.ID)) + buf.WriteByte(',') + if mj.Backlog != nil { + if true { + buf.WriteString(`"backlog":`) + fflib.FormatBits2(buf, uint64(*mj.Backlog), 10, false) + buf.WriteByte(',') + } + } + if mj.Bytes != nil { + if true { + buf.WriteString(`"bytes":`) + fflib.FormatBits2(buf, uint64(*mj.Bytes), 10, false) + buf.WriteByte(',') + } + } + if mj.Drops != nil { + if true { + buf.WriteString(`"drops":`) + fflib.FormatBits2(buf, uint64(*mj.Drops), 10, false) + buf.WriteByte(',') + } + } + if mj.Overlimits != nil { + if true { + buf.WriteString(`"overlimits":`) + fflib.FormatBits2(buf, uint64(*mj.Overlimits), 10, false) + buf.WriteByte(',') + } + } + if mj.Packets != nil { + if true { + buf.WriteString(`"packets":`) + fflib.FormatBits2(buf, uint64(*mj.Packets), 10, false) + buf.WriteByte(',') + } + } + if mj.Qlen != nil { + if true { + buf.WriteString(`"qlen":`) + fflib.FormatBits2(buf, uint64(*mj.Qlen), 10, false) + buf.WriteByte(',') + } + } + if mj.RateBPS != nil { + if true { + buf.WriteString(`"ratebps":`) + fflib.FormatBits2(buf, uint64(*mj.RateBPS), 10, false) + buf.WriteByte(',') + } + } + if mj.RatePPS != nil { + if true { + buf.WriteString(`"ratepps":`) + fflib.FormatBits2(buf, uint64(*mj.RatePPS), 10, false) + buf.WriteByte(',') + } + } + if mj.Requeues != nil { + if true { + buf.WriteString(`"requeues":`) + fflib.FormatBits2(buf, uint64(*mj.Requeues), 10, false) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_TrafficControlStatisticsbase = iota + ffj_t_TrafficControlStatisticsno_such_key + + ffj_t_TrafficControlStatistics_ID + + ffj_t_TrafficControlStatistics_Backlog + + ffj_t_TrafficControlStatistics_Bytes + + ffj_t_TrafficControlStatistics_Drops + + ffj_t_TrafficControlStatistics_Overlimits + + ffj_t_TrafficControlStatistics_Packets + + ffj_t_TrafficControlStatistics_Qlen + + ffj_t_TrafficControlStatistics_RateBPS + + ffj_t_TrafficControlStatistics_RatePPS + + ffj_t_TrafficControlStatistics_Requeues +) + +var ffj_key_TrafficControlStatistics_ID = []byte("id") + +var ffj_key_TrafficControlStatistics_Backlog = []byte("backlog") + +var ffj_key_TrafficControlStatistics_Bytes = []byte("bytes") + +var ffj_key_TrafficControlStatistics_Drops = []byte("drops") + +var ffj_key_TrafficControlStatistics_Overlimits = []byte("overlimits") + +var ffj_key_TrafficControlStatistics_Packets = []byte("packets") + +var ffj_key_TrafficControlStatistics_Qlen = []byte("qlen") + +var ffj_key_TrafficControlStatistics_RateBPS = []byte("ratebps") + +var ffj_key_TrafficControlStatistics_RatePPS = []byte("ratepps") + +var ffj_key_TrafficControlStatistics_Requeues = []byte("requeues") + +func (uj *TrafficControlStatistics) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *TrafficControlStatistics) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_TrafficControlStatisticsbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_TrafficControlStatisticsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'b': + + if bytes.Equal(ffj_key_TrafficControlStatistics_Backlog, kn) { + currentKey = ffj_t_TrafficControlStatistics_Backlog + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_TrafficControlStatistics_Bytes, kn) { + currentKey = ffj_t_TrafficControlStatistics_Bytes + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'd': + + if bytes.Equal(ffj_key_TrafficControlStatistics_Drops, kn) { + currentKey = ffj_t_TrafficControlStatistics_Drops + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'i': + + if bytes.Equal(ffj_key_TrafficControlStatistics_ID, kn) { + currentKey = ffj_t_TrafficControlStatistics_ID + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'o': + + if bytes.Equal(ffj_key_TrafficControlStatistics_Overlimits, kn) { + currentKey = ffj_t_TrafficControlStatistics_Overlimits + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_TrafficControlStatistics_Packets, kn) { + currentKey = ffj_t_TrafficControlStatistics_Packets + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'q': + + if bytes.Equal(ffj_key_TrafficControlStatistics_Qlen, kn) { + currentKey = ffj_t_TrafficControlStatistics_Qlen + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'r': + + if bytes.Equal(ffj_key_TrafficControlStatistics_RateBPS, kn) { + currentKey = ffj_t_TrafficControlStatistics_RateBPS + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_TrafficControlStatistics_RatePPS, kn) { + currentKey = ffj_t_TrafficControlStatistics_RatePPS + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_TrafficControlStatistics_Requeues, kn) { + currentKey = ffj_t_TrafficControlStatistics_Requeues + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_TrafficControlStatistics_Requeues, kn) { + currentKey = ffj_t_TrafficControlStatistics_Requeues + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TrafficControlStatistics_RatePPS, kn) { + currentKey = ffj_t_TrafficControlStatistics_RatePPS + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TrafficControlStatistics_RateBPS, kn) { + currentKey = ffj_t_TrafficControlStatistics_RateBPS + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_TrafficControlStatistics_Qlen, kn) { + currentKey = ffj_t_TrafficControlStatistics_Qlen + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TrafficControlStatistics_Packets, kn) { + currentKey = ffj_t_TrafficControlStatistics_Packets + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TrafficControlStatistics_Overlimits, kn) { + currentKey = ffj_t_TrafficControlStatistics_Overlimits + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TrafficControlStatistics_Drops, kn) { + currentKey = ffj_t_TrafficControlStatistics_Drops + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TrafficControlStatistics_Bytes, kn) { + currentKey = ffj_t_TrafficControlStatistics_Bytes + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_TrafficControlStatistics_Backlog, kn) { + currentKey = ffj_t_TrafficControlStatistics_Backlog + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_TrafficControlStatistics_ID, kn) { + currentKey = ffj_t_TrafficControlStatistics_ID + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_TrafficControlStatisticsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_TrafficControlStatistics_ID: + goto handle_ID + + case ffj_t_TrafficControlStatistics_Backlog: + goto handle_Backlog + + case ffj_t_TrafficControlStatistics_Bytes: + goto handle_Bytes + + case ffj_t_TrafficControlStatistics_Drops: + goto handle_Drops + + case ffj_t_TrafficControlStatistics_Overlimits: + goto handle_Overlimits + + case ffj_t_TrafficControlStatistics_Packets: + goto handle_Packets + + case ffj_t_TrafficControlStatistics_Qlen: + goto handle_Qlen + + case ffj_t_TrafficControlStatistics_RateBPS: + goto handle_RateBPS + + case ffj_t_TrafficControlStatistics_RatePPS: + goto handle_RatePPS + + case ffj_t_TrafficControlStatistics_Requeues: + goto handle_Requeues + + case ffj_t_TrafficControlStatisticsno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_ID: + + /* handler: uj.ID type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.ID = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Backlog: + + /* handler: uj.Backlog type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Backlog = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.Backlog = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Bytes: + + /* handler: uj.Bytes type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Bytes = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.Bytes = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Drops: + + /* handler: uj.Drops type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Drops = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.Drops = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Overlimits: + + /* handler: uj.Overlimits type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Overlimits = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.Overlimits = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Packets: + + /* handler: uj.Packets type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Packets = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.Packets = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Qlen: + + /* handler: uj.Qlen type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Qlen = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.Qlen = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_RateBPS: + + /* handler: uj.RateBPS type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.RateBPS = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.RateBPS = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_RatePPS: + + /* handler: uj.RatePPS type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.RatePPS = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.RatePPS = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Requeues: + + /* handler: uj.Requeues type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.Requeues = nil + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := uint64(tval) + uj.Requeues = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *URL) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *URL) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "scheme":`) + fflib.WriteJsonString(buf, string(mj.Scheme)) + buf.WriteString(`,"address":`) + + { + + err = mj.Address.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + if mj.Path != nil { + if true { + buf.WriteString(`"path":`) + fflib.WriteJsonString(buf, string(*mj.Path)) + buf.WriteByte(',') + } + } + buf.WriteString(`"query":`) + if mj.Query != nil { + buf.WriteString(`[`) + for i, v := range mj.Query { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + if mj.Fragment != nil { + if true { + buf.WriteString(`"fragment":`) + fflib.WriteJsonString(buf, string(*mj.Fragment)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_URLbase = iota + ffj_t_URLno_such_key + + ffj_t_URL_Scheme + + ffj_t_URL_Address + + ffj_t_URL_Path + + ffj_t_URL_Query + + ffj_t_URL_Fragment +) + +var ffj_key_URL_Scheme = []byte("scheme") + +var ffj_key_URL_Address = []byte("address") + +var ffj_key_URL_Path = []byte("path") + +var ffj_key_URL_Query = []byte("query") + +var ffj_key_URL_Fragment = []byte("fragment") + +func (uj *URL) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *URL) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_URLbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_URLno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'a': + + if bytes.Equal(ffj_key_URL_Address, kn) { + currentKey = ffj_t_URL_Address + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'f': + + if bytes.Equal(ffj_key_URL_Fragment, kn) { + currentKey = ffj_t_URL_Fragment + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_URL_Path, kn) { + currentKey = ffj_t_URL_Path + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'q': + + if bytes.Equal(ffj_key_URL_Query, kn) { + currentKey = ffj_t_URL_Query + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_URL_Scheme, kn) { + currentKey = ffj_t_URL_Scheme + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_URL_Fragment, kn) { + currentKey = ffj_t_URL_Fragment + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_URL_Query, kn) { + currentKey = ffj_t_URL_Query + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_URL_Path, kn) { + currentKey = ffj_t_URL_Path + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_URL_Address, kn) { + currentKey = ffj_t_URL_Address + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_URL_Scheme, kn) { + currentKey = ffj_t_URL_Scheme + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_URLno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_URL_Scheme: + goto handle_Scheme + + case ffj_t_URL_Address: + goto handle_Address + + case ffj_t_URL_Path: + goto handle_Path + + case ffj_t_URL_Query: + goto handle_Query + + case ffj_t_URL_Fragment: + goto handle_Fragment + + case ffj_t_URLno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Scheme: + + /* handler: uj.Scheme type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Scheme = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Address: + + /* handler: uj.Address type=mesos.Address kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.Address.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Path: + + /* handler: uj.Path type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Path = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Path = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Query: + + /* handler: uj.Query type=[]mesos.Parameter kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Query = nil + } else { + + uj.Query = []Parameter{} + + wantVal := true + + for { + + var tmp_uj__Query Parameter + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Query type=mesos.Parameter kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Query.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Query = append(uj.Query, tmp_uj__Query) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Fragment: + + /* handler: uj.Fragment type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Fragment = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Fragment = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *UUID) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *UUID) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if len(mj.Value) != 0 { + buf.WriteString(`"value":`) + if mj.Value != nil { + buf.WriteString(`"`) + { + enc := base64.NewEncoder(base64.StdEncoding, buf) + enc.Write(reflect.Indirect(reflect.ValueOf(mj.Value)).Bytes()) + enc.Close() + } + buf.WriteString(`"`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_UUIDbase = iota + ffj_t_UUIDno_such_key + + ffj_t_UUID_Value +) + +var ffj_key_UUID_Value = []byte("value") + +func (uj *UUID) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *UUID) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_UUIDbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_UUIDno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'v': + + if bytes.Equal(ffj_key_UUID_Value, kn) { + currentKey = ffj_t_UUID_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_UUID_Value, kn) { + currentKey = ffj_t_UUID_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_UUIDno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_UUID_Value: + goto handle_Value + + case ffj_t_UUIDno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Value: + + /* handler: uj.Value type=[]uint8 kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Value = nil + } else { + b := make([]byte, base64.StdEncoding.DecodedLen(fs.Output.Len())) + n, err := base64.StdEncoding.Decode(b, fs.Output.Bytes()) + if err != nil { + return fs.WrapErr(err) + } + + v := reflect.ValueOf(&uj.Value).Elem() + v.SetBytes(b[0:n]) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *UdpStatistics) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *UdpStatistics) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.InDatagrams != nil { + if true { + buf.WriteString(`"InDatagrams":`) + fflib.FormatBits2(buf, uint64(*mj.InDatagrams), 10, *mj.InDatagrams < 0) + buf.WriteByte(',') + } + } + if mj.NoPorts != nil { + if true { + buf.WriteString(`"NoPorts":`) + fflib.FormatBits2(buf, uint64(*mj.NoPorts), 10, *mj.NoPorts < 0) + buf.WriteByte(',') + } + } + if mj.InErrors != nil { + if true { + buf.WriteString(`"InErrors":`) + fflib.FormatBits2(buf, uint64(*mj.InErrors), 10, *mj.InErrors < 0) + buf.WriteByte(',') + } + } + if mj.OutDatagrams != nil { + if true { + buf.WriteString(`"OutDatagrams":`) + fflib.FormatBits2(buf, uint64(*mj.OutDatagrams), 10, *mj.OutDatagrams < 0) + buf.WriteByte(',') + } + } + if mj.RcvbufErrors != nil { + if true { + buf.WriteString(`"RcvbufErrors":`) + fflib.FormatBits2(buf, uint64(*mj.RcvbufErrors), 10, *mj.RcvbufErrors < 0) + buf.WriteByte(',') + } + } + if mj.SndbufErrors != nil { + if true { + buf.WriteString(`"SndbufErrors":`) + fflib.FormatBits2(buf, uint64(*mj.SndbufErrors), 10, *mj.SndbufErrors < 0) + buf.WriteByte(',') + } + } + if mj.InCsumErrors != nil { + if true { + buf.WriteString(`"InCsumErrors":`) + fflib.FormatBits2(buf, uint64(*mj.InCsumErrors), 10, *mj.InCsumErrors < 0) + buf.WriteByte(',') + } + } + if mj.IgnoredMulti != nil { + if true { + buf.WriteString(`"IgnoredMulti":`) + fflib.FormatBits2(buf, uint64(*mj.IgnoredMulti), 10, *mj.IgnoredMulti < 0) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_UdpStatisticsbase = iota + ffj_t_UdpStatisticsno_such_key + + ffj_t_UdpStatistics_InDatagrams + + ffj_t_UdpStatistics_NoPorts + + ffj_t_UdpStatistics_InErrors + + ffj_t_UdpStatistics_OutDatagrams + + ffj_t_UdpStatistics_RcvbufErrors + + ffj_t_UdpStatistics_SndbufErrors + + ffj_t_UdpStatistics_InCsumErrors + + ffj_t_UdpStatistics_IgnoredMulti +) + +var ffj_key_UdpStatistics_InDatagrams = []byte("InDatagrams") + +var ffj_key_UdpStatistics_NoPorts = []byte("NoPorts") + +var ffj_key_UdpStatistics_InErrors = []byte("InErrors") + +var ffj_key_UdpStatistics_OutDatagrams = []byte("OutDatagrams") + +var ffj_key_UdpStatistics_RcvbufErrors = []byte("RcvbufErrors") + +var ffj_key_UdpStatistics_SndbufErrors = []byte("SndbufErrors") + +var ffj_key_UdpStatistics_InCsumErrors = []byte("InCsumErrors") + +var ffj_key_UdpStatistics_IgnoredMulti = []byte("IgnoredMulti") + +func (uj *UdpStatistics) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *UdpStatistics) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_UdpStatisticsbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_UdpStatisticsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'I': + + if bytes.Equal(ffj_key_UdpStatistics_InDatagrams, kn) { + currentKey = ffj_t_UdpStatistics_InDatagrams + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_UdpStatistics_InErrors, kn) { + currentKey = ffj_t_UdpStatistics_InErrors + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_UdpStatistics_InCsumErrors, kn) { + currentKey = ffj_t_UdpStatistics_InCsumErrors + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_UdpStatistics_IgnoredMulti, kn) { + currentKey = ffj_t_UdpStatistics_IgnoredMulti + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'N': + + if bytes.Equal(ffj_key_UdpStatistics_NoPorts, kn) { + currentKey = ffj_t_UdpStatistics_NoPorts + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'O': + + if bytes.Equal(ffj_key_UdpStatistics_OutDatagrams, kn) { + currentKey = ffj_t_UdpStatistics_OutDatagrams + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'R': + + if bytes.Equal(ffj_key_UdpStatistics_RcvbufErrors, kn) { + currentKey = ffj_t_UdpStatistics_RcvbufErrors + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'S': + + if bytes.Equal(ffj_key_UdpStatistics_SndbufErrors, kn) { + currentKey = ffj_t_UdpStatistics_SndbufErrors + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_UdpStatistics_IgnoredMulti, kn) { + currentKey = ffj_t_UdpStatistics_IgnoredMulti + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_UdpStatistics_InCsumErrors, kn) { + currentKey = ffj_t_UdpStatistics_InCsumErrors + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_UdpStatistics_SndbufErrors, kn) { + currentKey = ffj_t_UdpStatistics_SndbufErrors + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_UdpStatistics_RcvbufErrors, kn) { + currentKey = ffj_t_UdpStatistics_RcvbufErrors + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_UdpStatistics_OutDatagrams, kn) { + currentKey = ffj_t_UdpStatistics_OutDatagrams + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_UdpStatistics_InErrors, kn) { + currentKey = ffj_t_UdpStatistics_InErrors + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_UdpStatistics_NoPorts, kn) { + currentKey = ffj_t_UdpStatistics_NoPorts + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_UdpStatistics_InDatagrams, kn) { + currentKey = ffj_t_UdpStatistics_InDatagrams + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_UdpStatisticsno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_UdpStatistics_InDatagrams: + goto handle_InDatagrams + + case ffj_t_UdpStatistics_NoPorts: + goto handle_NoPorts + + case ffj_t_UdpStatistics_InErrors: + goto handle_InErrors + + case ffj_t_UdpStatistics_OutDatagrams: + goto handle_OutDatagrams + + case ffj_t_UdpStatistics_RcvbufErrors: + goto handle_RcvbufErrors + + case ffj_t_UdpStatistics_SndbufErrors: + goto handle_SndbufErrors + + case ffj_t_UdpStatistics_InCsumErrors: + goto handle_InCsumErrors + + case ffj_t_UdpStatistics_IgnoredMulti: + goto handle_IgnoredMulti + + case ffj_t_UdpStatisticsno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_InDatagrams: + + /* handler: uj.InDatagrams type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InDatagrams = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InDatagrams = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_NoPorts: + + /* handler: uj.NoPorts type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.NoPorts = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.NoPorts = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_InErrors: + + /* handler: uj.InErrors type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InErrors = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InErrors = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_OutDatagrams: + + /* handler: uj.OutDatagrams type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.OutDatagrams = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.OutDatagrams = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_RcvbufErrors: + + /* handler: uj.RcvbufErrors type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.RcvbufErrors = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.RcvbufErrors = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_SndbufErrors: + + /* handler: uj.SndbufErrors type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.SndbufErrors = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.SndbufErrors = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_InCsumErrors: + + /* handler: uj.InCsumErrors type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.InCsumErrors = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.InCsumErrors = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_IgnoredMulti: + + /* handler: uj.IgnoredMulti type=int64 kind=int64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for int64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.IgnoredMulti = nil + + } else { + + tval, err := fflib.ParseInt(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := int64(tval) + uj.IgnoredMulti = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Unavailability) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Unavailability) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "start":`) + + { + + err = mj.Start.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + if mj.Duration != nil { + if true { + buf.WriteString(`"duration":`) + + { + + err = mj.Duration.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Unavailabilitybase = iota + ffj_t_Unavailabilityno_such_key + + ffj_t_Unavailability_Start + + ffj_t_Unavailability_Duration +) + +var ffj_key_Unavailability_Start = []byte("start") + +var ffj_key_Unavailability_Duration = []byte("duration") + +func (uj *Unavailability) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Unavailability) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Unavailabilitybase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Unavailabilityno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'd': + + if bytes.Equal(ffj_key_Unavailability_Duration, kn) { + currentKey = ffj_t_Unavailability_Duration + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_Unavailability_Start, kn) { + currentKey = ffj_t_Unavailability_Start + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Unavailability_Duration, kn) { + currentKey = ffj_t_Unavailability_Duration + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Unavailability_Start, kn) { + currentKey = ffj_t_Unavailability_Start + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Unavailabilityno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Unavailability_Start: + goto handle_Start + + case ffj_t_Unavailability_Duration: + goto handle_Duration + + case ffj_t_Unavailabilityno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Start: + + /* handler: uj.Start type=mesos.TimeInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = uj.Start.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Duration: + + /* handler: uj.Duration type=mesos.DurationInfo kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Duration = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Duration == nil { + uj.Duration = new(DurationInfo) + } + + err = uj.Duration.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Value) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Value) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + if mj.Scalar != nil { + if true { + buf.WriteString(`"scalar":`) + + { + + err = mj.Scalar.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Ranges != nil { + if true { + buf.WriteString(`"ranges":`) + + { + + err = mj.Ranges.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Set != nil { + if true { + buf.WriteString(`"set":`) + + { + + err = mj.Set.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Text != nil { + if true { + buf.WriteString(`"text":`) + + { + + err = mj.Text.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Valuebase = iota + ffj_t_Valueno_such_key + + ffj_t_Value_Type + + ffj_t_Value_Scalar + + ffj_t_Value_Ranges + + ffj_t_Value_Set + + ffj_t_Value_Text +) + +var ffj_key_Value_Type = []byte("type") + +var ffj_key_Value_Scalar = []byte("scalar") + +var ffj_key_Value_Ranges = []byte("ranges") + +var ffj_key_Value_Set = []byte("set") + +var ffj_key_Value_Text = []byte("text") + +func (uj *Value) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Value) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Valuebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Valueno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'r': + + if bytes.Equal(ffj_key_Value_Ranges, kn) { + currentKey = ffj_t_Value_Ranges + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_Value_Scalar, kn) { + currentKey = ffj_t_Value_Scalar + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Value_Set, kn) { + currentKey = ffj_t_Value_Set + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_Value_Type, kn) { + currentKey = ffj_t_Value_Type + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Value_Text, kn) { + currentKey = ffj_t_Value_Text + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Value_Text, kn) { + currentKey = ffj_t_Value_Text + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Value_Set, kn) { + currentKey = ffj_t_Value_Set + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Value_Ranges, kn) { + currentKey = ffj_t_Value_Ranges + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Value_Scalar, kn) { + currentKey = ffj_t_Value_Scalar + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Value_Type, kn) { + currentKey = ffj_t_Value_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Valueno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Value_Type: + goto handle_Type + + case ffj_t_Value_Scalar: + goto handle_Scalar + + case ffj_t_Value_Ranges: + goto handle_Ranges + + case ffj_t_Value_Set: + goto handle_Set + + case ffj_t_Value_Text: + goto handle_Text + + case ffj_t_Valueno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=mesos.Value_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Scalar: + + /* handler: uj.Scalar type=mesos.Value_Scalar kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Scalar = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Scalar == nil { + uj.Scalar = new(Value_Scalar) + } + + err = uj.Scalar.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Ranges: + + /* handler: uj.Ranges type=mesos.Value_Ranges kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Ranges = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Ranges == nil { + uj.Ranges = new(Value_Ranges) + } + + err = uj.Ranges.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Set: + + /* handler: uj.Set type=mesos.Value_Set kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Set = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Set == nil { + uj.Set = new(Value_Set) + } + + err = uj.Set.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Text: + + /* handler: uj.Text type=mesos.Value_Text kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Text = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Text == nil { + uj.Text = new(Value_Text) + } + + err = uj.Text.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Value_Range) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Value_Range) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"begin":`) + fflib.FormatBits2(buf, uint64(mj.Begin), 10, false) + buf.WriteString(`,"end":`) + fflib.FormatBits2(buf, uint64(mj.End), 10, false) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Value_Rangebase = iota + ffj_t_Value_Rangeno_such_key + + ffj_t_Value_Range_Begin + + ffj_t_Value_Range_End +) + +var ffj_key_Value_Range_Begin = []byte("begin") + +var ffj_key_Value_Range_End = []byte("end") + +func (uj *Value_Range) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Value_Range) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Value_Rangebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Value_Rangeno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'b': + + if bytes.Equal(ffj_key_Value_Range_Begin, kn) { + currentKey = ffj_t_Value_Range_Begin + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'e': + + if bytes.Equal(ffj_key_Value_Range_End, kn) { + currentKey = ffj_t_Value_Range_End + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Value_Range_End, kn) { + currentKey = ffj_t_Value_Range_End + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Value_Range_Begin, kn) { + currentKey = ffj_t_Value_Range_Begin + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Value_Rangeno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Value_Range_Begin: + goto handle_Begin + + case ffj_t_Value_Range_End: + goto handle_End + + case ffj_t_Value_Rangeno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Begin: + + /* handler: uj.Begin type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + uj.Begin = uint64(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_End: + + /* handler: uj.End type=uint64 kind=uint64 quoted=false*/ + + { + if tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for uint64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseUint(fs.Output.Bytes(), 10, 64) + + if err != nil { + return fs.WrapErr(err) + } + + uj.End = uint64(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Value_Ranges) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Value_Ranges) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"range":`) + if mj.Range != nil { + buf.WriteString(`[`) + for i, v := range mj.Range { + if i != 0 { + buf.WriteString(`,`) + } + + { + + err = v.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Value_Rangesbase = iota + ffj_t_Value_Rangesno_such_key + + ffj_t_Value_Ranges_Range +) + +var ffj_key_Value_Ranges_Range = []byte("range") + +func (uj *Value_Ranges) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Value_Ranges) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Value_Rangesbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Value_Rangesno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'r': + + if bytes.Equal(ffj_key_Value_Ranges_Range, kn) { + currentKey = ffj_t_Value_Ranges_Range + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Value_Ranges_Range, kn) { + currentKey = ffj_t_Value_Ranges_Range + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Value_Rangesno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Value_Ranges_Range: + goto handle_Range + + case ffj_t_Value_Rangesno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Range: + + /* handler: uj.Range type=[]mesos.Value_Range kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Range = nil + } else { + + uj.Range = []Value_Range{} + + wantVal := true + + for { + + var tmp_uj__Range Value_Range + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Range type=mesos.Value_Range kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + err = tmp_uj__Range.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + uj.Range = append(uj.Range, tmp_uj__Range) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Value_Scalar) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Value_Scalar) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"value":`) + fflib.AppendFloat(buf, float64(mj.Value), 'g', -1, 64) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Value_Scalarbase = iota + ffj_t_Value_Scalarno_such_key + + ffj_t_Value_Scalar_Value +) + +var ffj_key_Value_Scalar_Value = []byte("value") + +func (uj *Value_Scalar) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Value_Scalar) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Value_Scalarbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Value_Scalarno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'v': + + if bytes.Equal(ffj_key_Value_Scalar_Value, kn) { + currentKey = ffj_t_Value_Scalar_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Value_Scalar_Value, kn) { + currentKey = ffj_t_Value_Scalar_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Value_Scalarno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Value_Scalar_Value: + goto handle_Value + + case ffj_t_Value_Scalarno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Value: + + /* handler: uj.Value type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + uj.Value = float64(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Value_Set) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Value_Set) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if len(mj.Item) != 0 { + buf.WriteString(`"item":`) + if mj.Item != nil { + buf.WriteString(`[`) + for i, v := range mj.Item { + if i != 0 { + buf.WriteString(`,`) + } + fflib.WriteJsonString(buf, string(v)) + } + buf.WriteString(`]`) + } else { + buf.WriteString(`null`) + } + buf.WriteByte(',') + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Value_Setbase = iota + ffj_t_Value_Setno_such_key + + ffj_t_Value_Set_Item +) + +var ffj_key_Value_Set_Item = []byte("item") + +func (uj *Value_Set) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Value_Set) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Value_Setbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Value_Setno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'i': + + if bytes.Equal(ffj_key_Value_Set_Item, kn) { + currentKey = ffj_t_Value_Set_Item + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Value_Set_Item, kn) { + currentKey = ffj_t_Value_Set_Item + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Value_Setno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Value_Set_Item: + goto handle_Item + + case ffj_t_Value_Setno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Item: + + /* handler: uj.Item type=[]string kind=slice quoted=false*/ + + { + + { + if tok != fflib.FFTok_left_brace && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for ", tok)) + } + } + + if tok == fflib.FFTok_null { + uj.Item = nil + } else { + + uj.Item = []string{} + + wantVal := true + + for { + + var tmp_uj__Item string + + tok = fs.Scan() + if tok == fflib.FFTok_error { + goto tokerror + } + if tok == fflib.FFTok_right_brace { + break + } + + if tok == fflib.FFTok_comma { + if wantVal == true { + // TODO(pquerna): this isn't an ideal error message, this handles + // things like [,,,] as an array value. + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) + } + continue + } else { + wantVal = true + } + + /* handler: tmp_uj__Item type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + tmp_uj__Item = string(string(outBuf)) + + } + } + + uj.Item = append(uj.Item, tmp_uj__Item) + + wantVal = false + } + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Value_Text) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Value_Text) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"value":`) + fflib.WriteJsonString(buf, string(mj.Value)) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Value_Textbase = iota + ffj_t_Value_Textno_such_key + + ffj_t_Value_Text_Value +) + +var ffj_key_Value_Text_Value = []byte("value") + +func (uj *Value_Text) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Value_Text) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Value_Textbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Value_Textno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'v': + + if bytes.Equal(ffj_key_Value_Text_Value, kn) { + currentKey = ffj_t_Value_Text_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Value_Text_Value, kn) { + currentKey = ffj_t_Value_Text_Value + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Value_Textno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Value_Text_Value: + goto handle_Value + + case ffj_t_Value_Textno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Value: + + /* handler: uj.Value type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Value = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *VersionInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *VersionInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "version":`) + fflib.WriteJsonString(buf, string(mj.Version)) + buf.WriteByte(',') + if mj.BuildDate != nil { + if true { + buf.WriteString(`"build_date":`) + fflib.WriteJsonString(buf, string(*mj.BuildDate)) + buf.WriteByte(',') + } + } + if mj.BuildTime != nil { + if true { + buf.WriteString(`"build_time":`) + fflib.AppendFloat(buf, float64(*mj.BuildTime), 'g', -1, 64) + buf.WriteByte(',') + } + } + if mj.BuildUser != nil { + if true { + buf.WriteString(`"build_user":`) + fflib.WriteJsonString(buf, string(*mj.BuildUser)) + buf.WriteByte(',') + } + } + if mj.GitSHA != nil { + if true { + buf.WriteString(`"git_sha":`) + fflib.WriteJsonString(buf, string(*mj.GitSHA)) + buf.WriteByte(',') + } + } + if mj.GitBranch != nil { + if true { + buf.WriteString(`"git_branch":`) + fflib.WriteJsonString(buf, string(*mj.GitBranch)) + buf.WriteByte(',') + } + } + if mj.GitTag != nil { + if true { + buf.WriteString(`"git_tag":`) + fflib.WriteJsonString(buf, string(*mj.GitTag)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_VersionInfobase = iota + ffj_t_VersionInfono_such_key + + ffj_t_VersionInfo_Version + + ffj_t_VersionInfo_BuildDate + + ffj_t_VersionInfo_BuildTime + + ffj_t_VersionInfo_BuildUser + + ffj_t_VersionInfo_GitSHA + + ffj_t_VersionInfo_GitBranch + + ffj_t_VersionInfo_GitTag +) + +var ffj_key_VersionInfo_Version = []byte("version") + +var ffj_key_VersionInfo_BuildDate = []byte("build_date") + +var ffj_key_VersionInfo_BuildTime = []byte("build_time") + +var ffj_key_VersionInfo_BuildUser = []byte("build_user") + +var ffj_key_VersionInfo_GitSHA = []byte("git_sha") + +var ffj_key_VersionInfo_GitBranch = []byte("git_branch") + +var ffj_key_VersionInfo_GitTag = []byte("git_tag") + +func (uj *VersionInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *VersionInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_VersionInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_VersionInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'b': + + if bytes.Equal(ffj_key_VersionInfo_BuildDate, kn) { + currentKey = ffj_t_VersionInfo_BuildDate + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_VersionInfo_BuildTime, kn) { + currentKey = ffj_t_VersionInfo_BuildTime + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_VersionInfo_BuildUser, kn) { + currentKey = ffj_t_VersionInfo_BuildUser + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'g': + + if bytes.Equal(ffj_key_VersionInfo_GitSHA, kn) { + currentKey = ffj_t_VersionInfo_GitSHA + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_VersionInfo_GitBranch, kn) { + currentKey = ffj_t_VersionInfo_GitBranch + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_VersionInfo_GitTag, kn) { + currentKey = ffj_t_VersionInfo_GitTag + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'v': + + if bytes.Equal(ffj_key_VersionInfo_Version, kn) { + currentKey = ffj_t_VersionInfo_Version + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_VersionInfo_GitTag, kn) { + currentKey = ffj_t_VersionInfo_GitTag + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_VersionInfo_GitBranch, kn) { + currentKey = ffj_t_VersionInfo_GitBranch + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_VersionInfo_GitSHA, kn) { + currentKey = ffj_t_VersionInfo_GitSHA + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_VersionInfo_BuildUser, kn) { + currentKey = ffj_t_VersionInfo_BuildUser + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_VersionInfo_BuildTime, kn) { + currentKey = ffj_t_VersionInfo_BuildTime + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_VersionInfo_BuildDate, kn) { + currentKey = ffj_t_VersionInfo_BuildDate + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_VersionInfo_Version, kn) { + currentKey = ffj_t_VersionInfo_Version + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_VersionInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_VersionInfo_Version: + goto handle_Version + + case ffj_t_VersionInfo_BuildDate: + goto handle_BuildDate + + case ffj_t_VersionInfo_BuildTime: + goto handle_BuildTime + + case ffj_t_VersionInfo_BuildUser: + goto handle_BuildUser + + case ffj_t_VersionInfo_GitSHA: + goto handle_GitSHA + + case ffj_t_VersionInfo_GitBranch: + goto handle_GitBranch + + case ffj_t_VersionInfo_GitTag: + goto handle_GitTag + + case ffj_t_VersionInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Version: + + /* handler: uj.Version type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Version = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_BuildDate: + + /* handler: uj.BuildDate type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.BuildDate = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.BuildDate = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_BuildTime: + + /* handler: uj.BuildTime type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + uj.BuildTime = nil + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + ttypval := float64(tval) + uj.BuildTime = &ttypval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_BuildUser: + + /* handler: uj.BuildUser type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.BuildUser = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.BuildUser = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_GitSHA: + + /* handler: uj.GitSHA type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.GitSHA = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.GitSHA = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_GitBranch: + + /* handler: uj.GitBranch type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.GitBranch = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.GitBranch = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_GitTag: + + /* handler: uj.GitTag type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.GitTag = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.GitTag = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Volume) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Volume) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Mode != nil { + if true { + buf.WriteString(`"mode":`) + + { + + obj, err = mj.Mode.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + } + } + buf.WriteString(`"container_path":`) + fflib.WriteJsonString(buf, string(mj.ContainerPath)) + buf.WriteByte(',') + if mj.HostPath != nil { + if true { + buf.WriteString(`"host_path":`) + fflib.WriteJsonString(buf, string(*mj.HostPath)) + buf.WriteByte(',') + } + } + if mj.Image != nil { + if true { + buf.WriteString(`"image":`) + + { + + err = mj.Image.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Source != nil { + if true { + buf.WriteString(`"source":`) + + { + + err = mj.Source.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Volumebase = iota + ffj_t_Volumeno_such_key + + ffj_t_Volume_Mode + + ffj_t_Volume_ContainerPath + + ffj_t_Volume_HostPath + + ffj_t_Volume_Image + + ffj_t_Volume_Source +) + +var ffj_key_Volume_Mode = []byte("mode") + +var ffj_key_Volume_ContainerPath = []byte("container_path") + +var ffj_key_Volume_HostPath = []byte("host_path") + +var ffj_key_Volume_Image = []byte("image") + +var ffj_key_Volume_Source = []byte("source") + +func (uj *Volume) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Volume) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Volumebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Volumeno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'c': + + if bytes.Equal(ffj_key_Volume_ContainerPath, kn) { + currentKey = ffj_t_Volume_ContainerPath + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'h': + + if bytes.Equal(ffj_key_Volume_HostPath, kn) { + currentKey = ffj_t_Volume_HostPath + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'i': + + if bytes.Equal(ffj_key_Volume_Image, kn) { + currentKey = ffj_t_Volume_Image + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'm': + + if bytes.Equal(ffj_key_Volume_Mode, kn) { + currentKey = ffj_t_Volume_Mode + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_Volume_Source, kn) { + currentKey = ffj_t_Volume_Source + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Volume_Source, kn) { + currentKey = ffj_t_Volume_Source + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Volume_Image, kn) { + currentKey = ffj_t_Volume_Image + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Volume_HostPath, kn) { + currentKey = ffj_t_Volume_HostPath + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.AsciiEqualFold(ffj_key_Volume_ContainerPath, kn) { + currentKey = ffj_t_Volume_ContainerPath + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Volume_Mode, kn) { + currentKey = ffj_t_Volume_Mode + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Volumeno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Volume_Mode: + goto handle_Mode + + case ffj_t_Volume_ContainerPath: + goto handle_ContainerPath + + case ffj_t_Volume_HostPath: + goto handle_HostPath + + case ffj_t_Volume_Image: + goto handle_Image + + case ffj_t_Volume_Source: + goto handle_Source + + case ffj_t_Volumeno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Mode: + + /* handler: uj.Mode type=mesos.Volume_Mode kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Mode = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + if uj.Mode == nil { + uj.Mode = new(Volume_Mode) + } + + err = uj.Mode.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_ContainerPath: + + /* handler: uj.ContainerPath type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.ContainerPath = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_HostPath: + + /* handler: uj.HostPath type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.HostPath = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.HostPath = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Image: + + /* handler: uj.Image type=mesos.Image kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Image = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Image == nil { + uj.Image = new(Image) + } + + err = uj.Image.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Source: + + /* handler: uj.Source type=mesos.Volume_Source kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Source = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Source == nil { + uj.Source = new(Volume_Source) + } + + err = uj.Source.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Volume_Source) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Volume_Source) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteByte(',') + if mj.DockerVolume != nil { + if true { + buf.WriteString(`"docker_volume":`) + + { + + err = mj.DockerVolume.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.HostPath != nil { + if true { + buf.WriteString(`"host_path":`) + + { + + err = mj.HostPath.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.SandboxPath != nil { + if true { + buf.WriteString(`"sandbox_path":`) + + { + + err = mj.SandboxPath.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + if mj.Secret != nil { + if true { + buf.WriteString(`"secret":`) + + { + + err = mj.Secret.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Volume_Sourcebase = iota + ffj_t_Volume_Sourceno_such_key + + ffj_t_Volume_Source_Type + + ffj_t_Volume_Source_DockerVolume + + ffj_t_Volume_Source_HostPath + + ffj_t_Volume_Source_SandboxPath + + ffj_t_Volume_Source_Secret +) + +var ffj_key_Volume_Source_Type = []byte("type") + +var ffj_key_Volume_Source_DockerVolume = []byte("docker_volume") + +var ffj_key_Volume_Source_HostPath = []byte("host_path") + +var ffj_key_Volume_Source_SandboxPath = []byte("sandbox_path") + +var ffj_key_Volume_Source_Secret = []byte("secret") + +func (uj *Volume_Source) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Volume_Source) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Volume_Sourcebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Volume_Sourceno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'd': + + if bytes.Equal(ffj_key_Volume_Source_DockerVolume, kn) { + currentKey = ffj_t_Volume_Source_DockerVolume + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'h': + + if bytes.Equal(ffj_key_Volume_Source_HostPath, kn) { + currentKey = ffj_t_Volume_Source_HostPath + state = fflib.FFParse_want_colon + goto mainparse + } + + case 's': + + if bytes.Equal(ffj_key_Volume_Source_SandboxPath, kn) { + currentKey = ffj_t_Volume_Source_SandboxPath + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Volume_Source_Secret, kn) { + currentKey = ffj_t_Volume_Source_Secret + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_Volume_Source_Type, kn) { + currentKey = ffj_t_Volume_Source_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Volume_Source_Secret, kn) { + currentKey = ffj_t_Volume_Source_Secret + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Volume_Source_SandboxPath, kn) { + currentKey = ffj_t_Volume_Source_SandboxPath + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Volume_Source_HostPath, kn) { + currentKey = ffj_t_Volume_Source_HostPath + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.EqualFoldRight(ffj_key_Volume_Source_DockerVolume, kn) { + currentKey = ffj_t_Volume_Source_DockerVolume + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Volume_Source_Type, kn) { + currentKey = ffj_t_Volume_Source_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Volume_Sourceno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Volume_Source_Type: + goto handle_Type + + case ffj_t_Volume_Source_DockerVolume: + goto handle_DockerVolume + + case ffj_t_Volume_Source_HostPath: + goto handle_HostPath + + case ffj_t_Volume_Source_SandboxPath: + goto handle_SandboxPath + + case ffj_t_Volume_Source_Secret: + goto handle_Secret + + case ffj_t_Volume_Sourceno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=mesos.Volume_Source_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_DockerVolume: + + /* handler: uj.DockerVolume type=mesos.Volume_Source_DockerVolume kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.DockerVolume = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.DockerVolume == nil { + uj.DockerVolume = new(Volume_Source_DockerVolume) + } + + err = uj.DockerVolume.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_HostPath: + + /* handler: uj.HostPath type=mesos.Volume_Source_HostPath kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.HostPath = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.HostPath == nil { + uj.HostPath = new(Volume_Source_HostPath) + } + + err = uj.HostPath.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_SandboxPath: + + /* handler: uj.SandboxPath type=mesos.Volume_Source_SandboxPath kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.SandboxPath = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.SandboxPath == nil { + uj.SandboxPath = new(Volume_Source_SandboxPath) + } + + err = uj.SandboxPath.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Secret: + + /* handler: uj.Secret type=mesos.Secret kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.Secret = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.Secret == nil { + uj.Secret = new(Secret) + } + + err = uj.Secret.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Volume_Source_DockerVolume) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Volume_Source_DockerVolume) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ `) + if mj.Driver != nil { + if true { + buf.WriteString(`"driver":`) + fflib.WriteJsonString(buf, string(*mj.Driver)) + buf.WriteByte(',') + } + } + buf.WriteString(`"name":`) + fflib.WriteJsonString(buf, string(mj.Name)) + buf.WriteByte(',') + if mj.DriverOptions != nil { + if true { + buf.WriteString(`"driver_options":`) + + { + + err = mj.DriverOptions.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Volume_Source_DockerVolumebase = iota + ffj_t_Volume_Source_DockerVolumeno_such_key + + ffj_t_Volume_Source_DockerVolume_Driver + + ffj_t_Volume_Source_DockerVolume_Name + + ffj_t_Volume_Source_DockerVolume_DriverOptions +) + +var ffj_key_Volume_Source_DockerVolume_Driver = []byte("driver") + +var ffj_key_Volume_Source_DockerVolume_Name = []byte("name") + +var ffj_key_Volume_Source_DockerVolume_DriverOptions = []byte("driver_options") + +func (uj *Volume_Source_DockerVolume) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Volume_Source_DockerVolume) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Volume_Source_DockerVolumebase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Volume_Source_DockerVolumeno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'd': + + if bytes.Equal(ffj_key_Volume_Source_DockerVolume_Driver, kn) { + currentKey = ffj_t_Volume_Source_DockerVolume_Driver + state = fflib.FFParse_want_colon + goto mainparse + + } else if bytes.Equal(ffj_key_Volume_Source_DockerVolume_DriverOptions, kn) { + currentKey = ffj_t_Volume_Source_DockerVolume_DriverOptions + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'n': + + if bytes.Equal(ffj_key_Volume_Source_DockerVolume_Name, kn) { + currentKey = ffj_t_Volume_Source_DockerVolume_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.EqualFoldRight(ffj_key_Volume_Source_DockerVolume_DriverOptions, kn) { + currentKey = ffj_t_Volume_Source_DockerVolume_DriverOptions + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Volume_Source_DockerVolume_Name, kn) { + currentKey = ffj_t_Volume_Source_DockerVolume_Name + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Volume_Source_DockerVolume_Driver, kn) { + currentKey = ffj_t_Volume_Source_DockerVolume_Driver + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Volume_Source_DockerVolumeno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Volume_Source_DockerVolume_Driver: + goto handle_Driver + + case ffj_t_Volume_Source_DockerVolume_Name: + goto handle_Name + + case ffj_t_Volume_Source_DockerVolume_DriverOptions: + goto handle_DriverOptions + + case ffj_t_Volume_Source_DockerVolumeno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Driver: + + /* handler: uj.Driver type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Driver = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Driver = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Name: + + /* handler: uj.Name type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Name = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_DriverOptions: + + /* handler: uj.DriverOptions type=mesos.Parameters kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.DriverOptions = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.DriverOptions == nil { + uj.DriverOptions = new(Parameters) + } + + err = uj.DriverOptions.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Volume_Source_HostPath) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Volume_Source_HostPath) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "path":`) + fflib.WriteJsonString(buf, string(mj.Path)) + buf.WriteByte(',') + if mj.MountPropagation != nil { + if true { + buf.WriteString(`"mount_propagation":`) + + { + + err = mj.MountPropagation.MarshalJSONBuf(buf) + if err != nil { + return err + } + + } + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Volume_Source_HostPathbase = iota + ffj_t_Volume_Source_HostPathno_such_key + + ffj_t_Volume_Source_HostPath_Path + + ffj_t_Volume_Source_HostPath_MountPropagation +) + +var ffj_key_Volume_Source_HostPath_Path = []byte("path") + +var ffj_key_Volume_Source_HostPath_MountPropagation = []byte("mount_propagation") + +func (uj *Volume_Source_HostPath) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Volume_Source_HostPath) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Volume_Source_HostPathbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Volume_Source_HostPathno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'm': + + if bytes.Equal(ffj_key_Volume_Source_HostPath_MountPropagation, kn) { + currentKey = ffj_t_Volume_Source_HostPath_MountPropagation + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'p': + + if bytes.Equal(ffj_key_Volume_Source_HostPath_Path, kn) { + currentKey = ffj_t_Volume_Source_HostPath_Path + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.AsciiEqualFold(ffj_key_Volume_Source_HostPath_MountPropagation, kn) { + currentKey = ffj_t_Volume_Source_HostPath_MountPropagation + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Volume_Source_HostPath_Path, kn) { + currentKey = ffj_t_Volume_Source_HostPath_Path + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Volume_Source_HostPathno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Volume_Source_HostPath_Path: + goto handle_Path + + case ffj_t_Volume_Source_HostPath_MountPropagation: + goto handle_MountPropagation + + case ffj_t_Volume_Source_HostPathno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Path: + + /* handler: uj.Path type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Path = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_MountPropagation: + + /* handler: uj.MountPropagation type=mesos.MountPropagation kind=struct quoted=false*/ + + { + if tok == fflib.FFTok_null { + + uj.MountPropagation = nil + + state = fflib.FFParse_after_value + goto mainparse + } + + if uj.MountPropagation == nil { + uj.MountPropagation = new(MountPropagation) + } + + err = uj.MountPropagation.UnmarshalJSONFFLexer(fs, fflib.FFParse_want_key) + if err != nil { + return err + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *Volume_Source_SandboxPath) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *Volume_Source_SandboxPath) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{"type":`) + + { + + obj, err = mj.Type.MarshalJSON() + if err != nil { + return err + } + buf.Write(obj) + + } + buf.WriteString(`,"path":`) + fflib.WriteJsonString(buf, string(mj.Path)) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_Volume_Source_SandboxPathbase = iota + ffj_t_Volume_Source_SandboxPathno_such_key + + ffj_t_Volume_Source_SandboxPath_Type + + ffj_t_Volume_Source_SandboxPath_Path +) + +var ffj_key_Volume_Source_SandboxPath_Type = []byte("type") + +var ffj_key_Volume_Source_SandboxPath_Path = []byte("path") + +func (uj *Volume_Source_SandboxPath) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *Volume_Source_SandboxPath) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_Volume_Source_SandboxPathbase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_Volume_Source_SandboxPathno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'p': + + if bytes.Equal(ffj_key_Volume_Source_SandboxPath_Path, kn) { + currentKey = ffj_t_Volume_Source_SandboxPath_Path + state = fflib.FFParse_want_colon + goto mainparse + } + + case 't': + + if bytes.Equal(ffj_key_Volume_Source_SandboxPath_Type, kn) { + currentKey = ffj_t_Volume_Source_SandboxPath_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_Volume_Source_SandboxPath_Path, kn) { + currentKey = ffj_t_Volume_Source_SandboxPath_Path + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_Volume_Source_SandboxPath_Type, kn) { + currentKey = ffj_t_Volume_Source_SandboxPath_Type + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_Volume_Source_SandboxPathno_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_Volume_Source_SandboxPath_Type: + goto handle_Type + + case ffj_t_Volume_Source_SandboxPath_Path: + goto handle_Path + + case ffj_t_Volume_Source_SandboxPathno_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Type: + + /* handler: uj.Type type=mesos.Volume_Source_SandboxPath_Type kind=int32 quoted=false*/ + + { + if tok == fflib.FFTok_null { + + state = fflib.FFParse_after_value + goto mainparse + } + + tbuf, err := fs.CaptureField(tok) + if err != nil { + return fs.WrapErr(err) + } + + err = uj.Type.UnmarshalJSON(tbuf) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Path: + + /* handler: uj.Path type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + } else { + + outBuf := fs.Output.Bytes() + + uj.Path = string(string(outBuf)) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} + +func (mj *WeightInfo) MarshalJSON() ([]byte, error) { + var buf fflib.Buffer + if mj == nil { + buf.WriteString("null") + return buf.Bytes(), nil + } + err := mj.MarshalJSONBuf(&buf) + if err != nil { + return nil, err + } + return buf.Bytes(), nil +} +func (mj *WeightInfo) MarshalJSONBuf(buf fflib.EncodingBuffer) error { + if mj == nil { + buf.WriteString("null") + return nil + } + var err error + var obj []byte + _ = obj + _ = err + buf.WriteString(`{ "weight":`) + fflib.AppendFloat(buf, float64(mj.Weight), 'g', -1, 64) + buf.WriteByte(',') + if mj.Role != nil { + if true { + buf.WriteString(`"role":`) + fflib.WriteJsonString(buf, string(*mj.Role)) + buf.WriteByte(',') + } + } + buf.Rewind(1) + buf.WriteByte('}') + return nil +} + +const ( + ffj_t_WeightInfobase = iota + ffj_t_WeightInfono_such_key + + ffj_t_WeightInfo_Weight + + ffj_t_WeightInfo_Role +) + +var ffj_key_WeightInfo_Weight = []byte("weight") + +var ffj_key_WeightInfo_Role = []byte("role") + +func (uj *WeightInfo) UnmarshalJSON(input []byte) error { + fs := fflib.NewFFLexer(input) + return uj.UnmarshalJSONFFLexer(fs, fflib.FFParse_map_start) +} + +func (uj *WeightInfo) UnmarshalJSONFFLexer(fs *fflib.FFLexer, state fflib.FFParseState) error { + var err error = nil + currentKey := ffj_t_WeightInfobase + _ = currentKey + tok := fflib.FFTok_init + wantedTok := fflib.FFTok_init + +mainparse: + for { + tok = fs.Scan() + // println(fmt.Sprintf("debug: tok: %v state: %v", tok, state)) + if tok == fflib.FFTok_error { + goto tokerror + } + + switch state { + + case fflib.FFParse_map_start: + if tok != fflib.FFTok_left_bracket { + wantedTok = fflib.FFTok_left_bracket + goto wrongtokenerror + } + state = fflib.FFParse_want_key + continue + + case fflib.FFParse_after_value: + if tok == fflib.FFTok_comma { + state = fflib.FFParse_want_key + } else if tok == fflib.FFTok_right_bracket { + goto done + } else { + wantedTok = fflib.FFTok_comma + goto wrongtokenerror + } + + case fflib.FFParse_want_key: + // json {} ended. goto exit. woo. + if tok == fflib.FFTok_right_bracket { + goto done + } + if tok != fflib.FFTok_string { + wantedTok = fflib.FFTok_string + goto wrongtokenerror + } + + kn := fs.Output.Bytes() + if len(kn) <= 0 { + // "" case. hrm. + currentKey = ffj_t_WeightInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } else { + switch kn[0] { + + case 'r': + + if bytes.Equal(ffj_key_WeightInfo_Role, kn) { + currentKey = ffj_t_WeightInfo_Role + state = fflib.FFParse_want_colon + goto mainparse + } + + case 'w': + + if bytes.Equal(ffj_key_WeightInfo_Weight, kn) { + currentKey = ffj_t_WeightInfo_Weight + state = fflib.FFParse_want_colon + goto mainparse + } + + } + + if fflib.SimpleLetterEqualFold(ffj_key_WeightInfo_Role, kn) { + currentKey = ffj_t_WeightInfo_Role + state = fflib.FFParse_want_colon + goto mainparse + } + + if fflib.SimpleLetterEqualFold(ffj_key_WeightInfo_Weight, kn) { + currentKey = ffj_t_WeightInfo_Weight + state = fflib.FFParse_want_colon + goto mainparse + } + + currentKey = ffj_t_WeightInfono_such_key + state = fflib.FFParse_want_colon + goto mainparse + } + + case fflib.FFParse_want_colon: + if tok != fflib.FFTok_colon { + wantedTok = fflib.FFTok_colon + goto wrongtokenerror + } + state = fflib.FFParse_want_value + continue + case fflib.FFParse_want_value: + + if tok == fflib.FFTok_left_brace || tok == fflib.FFTok_left_bracket || tok == fflib.FFTok_integer || tok == fflib.FFTok_double || tok == fflib.FFTok_string || tok == fflib.FFTok_bool || tok == fflib.FFTok_null { + switch currentKey { + + case ffj_t_WeightInfo_Weight: + goto handle_Weight + + case ffj_t_WeightInfo_Role: + goto handle_Role + + case ffj_t_WeightInfono_such_key: + err = fs.SkipField(tok) + if err != nil { + return fs.WrapErr(err) + } + state = fflib.FFParse_after_value + goto mainparse + } + } else { + goto wantedvalue + } + } + } + +handle_Weight: + + /* handler: uj.Weight type=float64 kind=float64 quoted=false*/ + + { + if tok != fflib.FFTok_double && tok != fflib.FFTok_integer && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for float64", tok)) + } + } + + { + + if tok == fflib.FFTok_null { + + } else { + + tval, err := fflib.ParseFloat(fs.Output.Bytes(), 64) + + if err != nil { + return fs.WrapErr(err) + } + + uj.Weight = float64(tval) + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +handle_Role: + + /* handler: uj.Role type=string kind=string quoted=false*/ + + { + + { + if tok != fflib.FFTok_string && tok != fflib.FFTok_null { + return fs.WrapErr(fmt.Errorf("cannot unmarshal %s into Go value for string", tok)) + } + } + + if tok == fflib.FFTok_null { + + uj.Role = nil + + } else { + + var tval string + outBuf := fs.Output.Bytes() + + tval = string(string(outBuf)) + uj.Role = &tval + + } + } + + state = fflib.FFParse_after_value + goto mainparse + +wantedvalue: + return fs.WrapErr(fmt.Errorf("wanted value token, but got token: %v", tok)) +wrongtokenerror: + return fs.WrapErr(fmt.Errorf("ffjson: wanted token: %v, but got token: %v output=%s", wantedTok, tok, fs.Output.String())) +tokerror: + if fs.BigError != nil { + return fs.WrapErr(fs.BigError) + } + err = fs.Error.ToError() + if err != nil { + return fs.WrapErr(err) + } + panic("ffjson-generated: unreachable, please report bug.") +done: + + return nil +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/mesos.proto b/vendor/github.com/mesos/mesos-go/api/v1/lib/mesos.proto new file mode 100644 index 00000000..74629465 --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/mesos.proto @@ -0,0 +1,3520 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto2"; + +package mesos; + +import "github.com/gogo/protobuf/gogoproto/gogo.proto"; + +option go_package = "mesos"; +option (gogoproto.benchgen_all) = true; +option (gogoproto.enum_stringer_all) = true; +option (gogoproto.equal_all) = true; +option (gogoproto.goproto_enum_prefix_all) = false; +option (gogoproto.goproto_enum_stringer_all) = false; +option (gogoproto.goproto_stringer_all) = false; +option (gogoproto.goproto_unrecognized_all) = false; +option (gogoproto.gostring_all) = true; +option (gogoproto.marshaler_all) = true; +option (gogoproto.populate_all) = true; +option (gogoproto.protosizer_all) = true; +option (gogoproto.stringer_all) = true; +option (gogoproto.testgen_all) = true; +option (gogoproto.unmarshaler_all) = true; +option (gogoproto.verbose_equal_all) = true; + +// NOTES: (gogogo protobuf for idiomatic Golang) +// - enum fields may be nullable if the default enum value is 0, otherwise the Golang zero-value of the enum isn't valid. +// - enums that declare UNKNOWN or other commonly used tokens should specify the goproto_enum_prefix option. +// - required fields are generally marked nullable +// - arrays of non-native types are generally marked nullable +// - fields w/ acronyms are generally renamed (via customname) to be idiomatic w/ respect to Golang +// - fields w/ glued acronyms are also renamed at the author's discretion w/ respect to legibility + +/** + * Status is used to indicate the state of the scheduler and executor + * driver after function calls. + */ +enum Status { + DRIVER_NOT_STARTED = 1; + DRIVER_RUNNING = 2; + DRIVER_ABORTED = 3; + DRIVER_STOPPED = 4; +} + + +/** + * A unique ID assigned to a framework. A framework can reuse this ID + * in order to do failover (see MesosSchedulerDriver). + */ +message FrameworkID { + required string value = 1 [(gogoproto.nullable) = false]; +} + + +/** + * A unique ID assigned to an offer. + */ +message OfferID { + required string value = 1 [(gogoproto.nullable) = false]; +} + + +/** + * A unique ID assigned to an agent. Currently, an agent gets a new ID + * whenever it (re)registers with Mesos. Framework writers shouldn't + * assume any binding between an agent ID and and a hostname. + */ +message AgentID { + required string value = 1 [(gogoproto.nullable) = false]; +} + + +/** + * A framework-generated ID to distinguish a task. The ID must remain + * unique while the task is active. A framework can reuse an ID _only_ + * if the previous task with the same ID has reached a terminal state + * (e.g., TASK_FINISHED, TASK_KILLED, etc.). However, reusing task IDs + * is strongly discouraged (MESOS-2198). + */ +message TaskID { + required string value = 1 [(gogoproto.nullable) = false]; +} + + +/** + * A framework-generated ID to distinguish an executor. Only one + * executor with the same ID can be active on the same agent at a + * time. However, reusing executor IDs is discouraged. + */ +message ExecutorID { + required string value = 1 [(gogoproto.nullable) = false]; +} + + +/** + * ID used to uniquely identify a container. If the `parent` is not + * specified, the ID is a UUID generated by the agent to uniquely + * identify the container of an executor run. If the `parent` field is + * specified, it represents a nested container. + */ +message ContainerID { + required string value = 1 [(gogoproto.nullable) = false]; + optional ContainerID parent = 2; +} + + +/** + * A unique ID assigned to a resource provider. Currently, a resource + * provider gets a new ID whenever it (re)registers with Mesos. + */ +message ResourceProviderID { + required string value = 1 [(gogoproto.nullable) = false]; +} + + +/** + * A framework-generated ID to distinguish an operation. The ID + * must be unique within the framework. + */ +message OperationID { + required string value = 1 [(gogoproto.nullable) = false]; +} + + +/** + * Represents time since the epoch, in nanoseconds. + */ +message TimeInfo { + required int64 nanoseconds = 1 [(gogoproto.nullable) = false]; +} + + +/** + * Represents duration in nanoseconds. + */ +message DurationInfo { + required int64 nanoseconds = 1 [(gogoproto.nullable) = false]; +} + + +/** + * A network address. + * + * TODO(bmahler): Use this more widely. + */ +message Address { + // May contain a hostname, IP address, or both. + optional string hostname = 1; + optional string ip = 2 [(gogoproto.customname) = "IP"]; + + required int32 port = 3 [(gogoproto.nullable) = false]; +} + + +/** + * Represents a URL. + */ +message URL { + required string scheme = 1 [(gogoproto.nullable) = false]; + required Address address = 2 [(gogoproto.nullable) = false]; + optional string path = 3; + repeated Parameter query = 4 [(gogoproto.nullable) = false]; + optional string fragment = 5; +} + + +/** + * Represents an interval, from a given start time over a given duration. + * This interval pertains to an unavailability event, such as maintenance, + * and is not a generic interval. + */ +message Unavailability { + required TimeInfo start = 1 [(gogoproto.nullable) = false]; + + // When added to `start`, this represents the end of the interval. + // If unspecified, the duration is assumed to be infinite. + optional DurationInfo duration = 2; + + // TODO(josephw): Add additional fields for expressing the purpose and + // urgency of the unavailability event. +} + + +/** + * Represents a single machine, which may hold one or more agents. + * + * NOTE: In order to match an agent to a machine, both the `hostname` and + * `ip` must match the values advertised by the agent to the master. + * Hostname is not case-sensitive. + */ +message MachineID { + optional string hostname = 1; + optional string ip = 2 [(gogoproto.customname) = "IP"]; +} + + +/** + * Holds information about a single machine, its `mode`, and any other + * relevant information which may affect the behavior of the machine. + */ +message MachineInfo { + // Describes the several states that a machine can be in. A `Mode` + // applies to a machine and to all associated agents on the machine. + enum Mode { + // In this mode, a machine is behaving normally; + // offering resources, executing tasks, etc. + UP = 1; + + // In this mode, all agents on the machine are expected to cooperate with + // frameworks to drain resources. In general, draining is done ahead of + // a pending `unavailability`. The resources should be drained so as to + // maximize utilization prior to the maintenance but without knowingly + // violating the frameworks' requirements. + DRAINING = 2; + + // In this mode, a machine is not running any tasks and will not offer + // any of its resources. Agents on the machine will not be allowed to + // register with the master. + DOWN = 3; + } + + required MachineID id = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "ID"]; + optional Mode mode = 2; + + // Signifies that the machine may be unavailable during the given interval. + // See comments in `Unavailability` and for the `unavailability` fields + // in `Offer` and `InverseOffer` for more information. + optional Unavailability unavailability = 3; +} + + +/** + * Describes a framework. + */ +message FrameworkInfo { + // Used to determine the Unix user that an executor or task should be + // launched as. + // + // When using the MesosSchedulerDriver, if the field is set to an + // empty string, it will automagically set it to the current user. + // + // When using the HTTP Scheduler API, the user has to be set + // explicitly. + required string user = 1 [(gogoproto.nullable) = false]; + + // Name of the framework that shows up in the Mesos Web UI. + required string name = 2 [(gogoproto.nullable) = false]; + + // Note that 'id' is only available after a framework has + // registered, however, it is included here in order to facilitate + // scheduler failover (i.e., if it is set then the + // MesosSchedulerDriver expects the scheduler is performing + // failover). + optional FrameworkID id = 3 [(gogoproto.customname) = "ID"]; + + // The amount of time (in seconds) that the master will wait for the + // scheduler to failover before it tears down the framework by + // killing all its tasks/executors. This should be non-zero if a + // framework expects to reconnect after a failure and not lose its + // tasks/executors. + // + // NOTE: To avoid accidental destruction of tasks, production + // frameworks typically set this to a large value (e.g., 1 week). + optional double failover_timeout = 4 [default = 0.0]; + + // If set, agents running tasks started by this framework will write + // the framework pid, executor pids and status updates to disk. If + // the agent exits (e.g., due to a crash or as part of upgrading + // Mesos), this checkpointed data allows the restarted agent to + // reconnect to executors that were started by the old instance of + // the agent. Enabling checkpointing improves fault tolerance, at + // the cost of a (usually small) increase in disk I/O. + optional bool checkpoint = 5 [default = false]; + + // Roles are the entities to which allocations are made. + // The framework must have at least one role in order to + // be offered resources. Note that `role` is deprecated + // in favor of `roles` and only one of these fields must + // be used. Since we cannot distinguish between empty + // `roles` and the default unset `role`, we require that + // frameworks set the `MULTI_ROLE` capability if + // setting the `roles` field. + optional string role = 6 [default = "*", deprecated=true]; + repeated string roles = 12; + + // Used to indicate the current host from which the scheduler is + // registered in the Mesos Web UI. If set to an empty string Mesos + // will automagically set it to the current hostname if one is + // available. + optional string hostname = 7; + + // This field should match the credential's principal the framework + // uses for authentication. This field is used for framework API + // rate limiting and dynamic reservations. It should be set even + // if authentication is not enabled if these features are desired. + optional string principal = 8; + + // This field allows a framework to advertise its web UI, so that + // the Mesos web UI can link to it. It is expected to be a full URL, + // for example http://my-scheduler.example.com:8080/. + optional string webui_url = 9 [(gogoproto.customname) = "WebUiURL"]; + + message Capability { + enum Type { + // This must be the first enum value in this list, to + // ensure that if 'type' is not set, the default value + // is UNKNOWN. This enables enum values to be added + // in a backwards-compatible way. See: MESOS-4997. + UNKNOWN = 0; + + // Receive offers with revocable resources. See 'Resource' + // message for details. + REVOCABLE_RESOURCES = 1; + + // Receive the TASK_KILLING TaskState when a task is being + // killed by an executor. The executor will examine this + // capability to determine whether it can send TASK_KILLING. + TASK_KILLING_STATE = 2; + + // Indicates whether the framework is aware of GPU resources. + // Frameworks that are aware of GPU resources are expected to + // avoid placing non-GPU workloads on GPU agents, in order + // to avoid occupying a GPU agent and preventing GPU workloads + // from running! Currently, if a framework is unaware of GPU + // resources, it will not be offered *any* of the resources on + // an agent with GPUs. This restriction is in place because we + // do not have a revocation mechanism that ensures GPU workloads + // can evict GPU agent occupants if necessary. + // + // TODO(bmahler): As we add revocation we can relax the + // restriction here. See MESOS-5634 for more information. + GPU_RESOURCES = 3; + + // Receive offers with resources that are shared. + SHARED_RESOURCES = 4; + + // Indicates that (1) the framework is prepared to handle the + // following TaskStates: TASK_UNREACHABLE, TASK_DROPPED, + // TASK_GONE, TASK_GONE_BY_OPERATOR, and TASK_UNKNOWN, and (2) + // the framework will assume responsibility for managing + // partitioned tasks that reregister with the master. + // + // Frameworks that enable this capability can define how they + // would like to handle partitioned tasks. Frameworks will + // receive TASK_UNREACHABLE for tasks on agents that are + // partitioned from the master. + // + // Without this capability, frameworks will receive TASK_LOST + // for tasks on partitioned agents. + // NOTE: Prior to Mesos 1.5, such tasks will be killed by Mesos + // when the agent reregisters (unless the master has failed over). + // However due to the lack of benefit in maintaining different + // behaviors depending on whether the master has failed over + // (see MESOS-7215), as of 1.5, Mesos will not kill these + // tasks in either case. + PARTITION_AWARE = 5; + + // This expresses the ability for the framework to be + // "multi-tenant" via using the newly introduced `roles` + // field, and examining `Offer.allocation_info` to determine + // which role the offers are being made to. We also + // expect that "single-tenant" schedulers eventually + // provide this and move away from the deprecated + // `role` field. + MULTI_ROLE = 6; + + // This capability has two effects for a framework. + // + // (1) The framework is offered resources in a new format. + // + // The offered resources have the `Resource.reservations` field set + // rather than `Resource.role` and `Resource.reservation`. In short, + // an empty `reservations` field denotes unreserved resources, and + // each `ReservationInfo` in the `reservations` field denotes a + // reservation that refines the previous one. + // + // See the 'Resource Format' section for more details. + // + // (2) The framework can create refined reservations. + // + // A framework can refine an existing reservation via the + // `Resource.reservations` field. For example, a reservation for role + // `eng` can be refined to `eng/front_end`. + // + // See `ReservationInfo.reservations` for more details. + // + // NOTE: Without this capability, a framework is not offered resources + // that have refined reservations. A resource is said to have refined + // reservations if it uses the `Resource.reservations` field, and + // `Resource.reservations_size() > 1`. + RESERVATION_REFINEMENT = 7; // EXPERIMENTAL. + + // Indicates that the framework is prepared to receive offers + // for agents whose region is different from the master's + // region. Network links between hosts in different regions + // typically have higher latency and lower bandwidth than + // network links within a region, so frameworks should be + // careful to only place suitable workloads in remote regions. + // Frameworks that are not region-aware will never receive + // offers for remote agents; region-aware frameworks are assumed + // to implement their own logic to decide which workloads (if + // any) are suitable for placement on remote agents. + REGION_AWARE = 8; + + option (gogoproto.goproto_enum_prefix) = true; + } + + // Enum fields should be optional, see: MESOS-4997. + optional Type type = 1 [(gogoproto.nullable) = false]; + } + + // This field allows a framework to advertise its set of + // capabilities (e.g., ability to receive offers for revocable + // resources). + repeated Capability capabilities = 10 [(gogoproto.nullable) = false]; + + // Labels are free-form key value pairs supplied by the framework + // scheduler (e.g., to describe additional functionality offered by + // the framework). These labels are not interpreted by Mesos itself. + // Labels should not contain duplicate key-value pairs. + optional Labels labels = 11; +} + + +/** + * Describes a general non-interpreting non-killing check for a task or + * executor (or any arbitrary process/command). A type is picked by + * specifying one of the optional fields. Specifying more than one type + * is an error. + * + * NOTE: This API is unstable and the related feature is experimental. + */ +message CheckInfo { + enum Type { + UNKNOWN = 0; + COMMAND = 1; + HTTP = 2; + TCP = 3; + + // TODO(alexr): Consider supporting custom user checks. They should + // probably be paired with a `data` field and complemented by a + // `data` response in `CheckStatusInfo`. + + option (gogoproto.goproto_enum_prefix) = true; + } + + // Describes a command check. If applicable, enters mount and/or network + // namespaces of the task. + message Command { + required CommandInfo command = 1 [(gogoproto.nullable) = false]; + } + + // Describes an HTTP check. Sends a GET request to + // http://:port/path. Note that is not configurable and is + // resolved automatically to 127.0.0.1. + message Http { + // Port to send the HTTP request. + required uint32 port = 1 [(gogoproto.nullable) = false]; + + // HTTP request path. + optional string path = 2; + + // TODO(alexr): Add support for HTTP method. While adding POST + // and PUT is simple, supporting payload is more involved. + + // TODO(alexr): Add support for custom HTTP headers. + + // TODO(alexr): Consider adding an optional message to describe TLS + // options and thus enabling https. Such message might contain certificate + // validation, TLS version. + } + + // Describes a TCP check, i.e. based on establishing a TCP connection to + // the specified port. Note that is not configurable and is resolved + // automatically to 127.0.0.1. + message Tcp { + required uint32 port = 1 [(gogoproto.nullable) = false]; + } + + // The type of the check. + optional Type type = 1 [(gogoproto.nullable) = false]; + + // Command check. + optional Command command = 2; + + // HTTP check. + optional Http http = 3 [(gogoproto.customname) = "HTTP"]; + + // TCP check. + optional Tcp tcp = 7 [(gogoproto.customname) = "TCP"]; + + // Amount of time to wait to start checking the task after it + // transitions to `TASK_RUNNING` or `TASK_STARTING` if the latter + // is used by the executor. + optional double delay_seconds = 4 [default = 15.0]; + + // Interval between check attempts, i.e., amount of time to wait after + // the previous check finished or timed out to start the next check. + optional double interval_seconds = 5 [default = 10.0]; + + // Amount of time to wait for the check to complete. Zero means infinite + // timeout. + // + // After this timeout, the check attempt is aborted and no result is + // reported. Note that this may be considered a state change and hence + // may trigger a check status change delivery to the corresponding + // scheduler. See `CheckStatusInfo` for more details. + optional double timeout_seconds = 6 [default = 20.0]; +} + + +/** + * Describes a health check for a task or executor (or any arbitrary + * process/command). A type is picked by specifying one of the + * optional fields. Specifying more than one type is an error. + */ +message HealthCheck { + enum Type { + UNKNOWN = 0; + COMMAND = 1; + HTTP = 2; + TCP = 3; + + option (gogoproto.goproto_enum_prefix) = true; + } + + // Describes an HTTP health check. Sends a GET request to + // scheme://:port/path. Note that is not configurable and is + // resolved automatically, in most cases to 127.0.0.1. Default executors + // treat return codes between 200 and 399 as success; custom executors + // may employ a different strategy, e.g. leveraging the `statuses` field. + message HTTPCheckInfo { + optional NetworkInfo.Protocol protocol = 5 [default = IPv4]; + + // Currently "http" and "https" are supported. + optional string scheme = 3; + + // Port to send the HTTP request. + required uint32 port = 1 [(gogoproto.nullable) = false]; + + // HTTP request path. + optional string path = 2; + + // TODO(alexr): Add support for HTTP method. While adding POST + // and PUT is simple, supporting payload is more involved. + + // TODO(alexr): Add support for custom HTTP headers. + + // TODO(alexr): Add support for success and possibly failure + // statuses. + + // NOTE: It is up to the custom executor to interpret and act on this + // field. Setting this field has no effect on the default executors. + // + // TODO(haosdent): Deprecate this field when we add better support for + // success and possibly failure statuses, e.g. ranges of success and + // failure statuses. + repeated uint32 statuses = 4; + + // TODO(haosdent): Consider adding a flag to enable task's certificate + // validation for HTTPS health checks, see MESOS-5997. + + // TODO(benh): Include an 'optional bytes data' field for checking + // for specific data in the response. + } + + // Describes a TCP health check, i.e. based on establishing + // a TCP connection to the specified port. + message TCPCheckInfo { + optional NetworkInfo.Protocol protocol = 2 [default = IPv4]; + + // Port expected to be open. + required uint32 port = 1 [(gogoproto.nullable) = false]; + } + + // TODO(benh): Consider adding a URL health check strategy which + // allows doing something similar to the HTTP strategy but + // encapsulates all the details in a single string field. + + // Amount of time to wait to start health checking the task after it + // transitions to `TASK_RUNNING` or `TASK_STATING` if the latter is + // used by the executor. + optional double delay_seconds = 2 [default = 15.0]; + + // Interval between health checks, i.e., amount of time to wait after + // the previous health check finished or timed out to start the next + // health check. + optional double interval_seconds = 3 [default = 10.0]; + + // Amount of time to wait for the health check to complete. After this + // timeout, the health check is aborted and treated as a failure. Zero + // means infinite timeout. + optional double timeout_seconds = 4 [default = 20.0]; + + // Number of consecutive failures until the task is killed by the executor. + optional uint32 consecutive_failures = 5 [default = 3]; + + // Amount of time after the task is launched during which health check + // failures are ignored. Once a check succeeds for the first time, + // the grace period does not apply anymore. Note that it includes + // `delay_seconds`, i.e., setting `grace_period_seconds` < `delay_seconds` + // has no effect. + optional double grace_period_seconds = 6 [default = 10.0]; + + // TODO(alexr): Add an optional `KillPolicy` that should be used + // if the task is killed because of a health check failure. + + // The type of health check. + optional Type type = 8 [(gogoproto.nullable) = false]; + + // Command health check. + optional CommandInfo command = 7; + + // HTTP health check. + optional HTTPCheckInfo http = 1 [(gogoproto.customname) = "HTTP"]; + + // TCP health check. + optional TCPCheckInfo tcp = 9 [(gogoproto.customname) = "TCP"]; +} + + +/** + * Describes a kill policy for a task. Currently does not express + * different policies (e.g. hitting HTTP endpoints), only controls + * how long to wait between graceful and forcible task kill: + * + * graceful kill --------------> forcible kill + * grace_period + * + * Kill policies are best-effort, because machine failures / forcible + * terminations may occur. + * + * NOTE: For executor-less command-based tasks, the kill is performed + * via sending a signal to the task process: SIGTERM for the graceful + * kill and SIGKILL for the forcible kill. For the docker executor-less + * tasks the grace period is passed to 'docker stop --time'. + */ +message KillPolicy { + // The grace period specifies how long to wait before forcibly + // killing the task. It is recommended to attempt to gracefully + // kill the task (and send TASK_KILLING) to indicate that the + // graceful kill is in progress. Once the grace period elapses, + // if the task has not terminated, a forcible kill should occur. + // The task should not assume that it will always be allotted + // the full grace period. For example, the executor may be + // shutdown more quickly by the agent, or failures / forcible + // terminations may occur. + optional DurationInfo grace_period = 1; +} + + +/** + * Describes a command, executed via: '/bin/sh -c value'. Any URIs specified + * are fetched before executing the command. If the executable field for an + * uri is set, executable file permission is set on the downloaded file. + * Otherwise, if the downloaded file has a recognized archive extension + * (currently [compressed] tar and zip) it is extracted into the executor's + * working directory. This extraction can be disabled by setting `extract` to + * false. In addition, any environment variables are set before executing + * the command (so they can be used to "parameterize" your command). + */ +message CommandInfo { + message URI { + required string value = 1 [(gogoproto.nullable) = false]; + optional bool executable = 2; + + // In case the fetched file is recognized as an archive, extract + // its contents into the sandbox. Note that a cached archive is + // not copied from the cache to the sandbox in case extraction + // originates from an archive in the cache. + optional bool extract = 3 [default = true]; + + // If this field is "true", the fetcher cache will be used. If not, + // fetching bypasses the cache and downloads directly into the + // sandbox directory, no matter whether a suitable cache file is + // available or not. The former directs the fetcher to download to + // the file cache, then copy from there to the sandbox. Subsequent + // fetch attempts with the same URI will omit downloading and copy + // from the cache as long as the file is resident there. Cache files + // may get evicted at any time, which then leads to renewed + // downloading. See also "docs/fetcher.md" and + // "docs/fetcher-cache-internals.md". + optional bool cache = 4; + + // The fetcher's default behavior is to use the URI string's basename to + // name the local copy. If this field is provided, the local copy will be + // named with its value instead. If there is a directory component (which + // must be a relative path), the local copy will be stored in that + // subdirectory inside the sandbox. + optional string output_file = 5; + } + + repeated URI uris = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "URIs"]; + + optional Environment environment = 2; + + // There are two ways to specify the command: + // 1) If 'shell == true', the command will be launched via shell + // (i.e., /bin/sh -c 'value'). The 'value' specified will be + // treated as the shell command. The 'arguments' will be ignored. + // 2) If 'shell == false', the command will be launched by passing + // arguments to an executable. The 'value' specified will be + // treated as the filename of the executable. The 'arguments' + // will be treated as the arguments to the executable. This is + // similar to how POSIX exec families launch processes (i.e., + // execlp(value, arguments(0), arguments(1), ...)). + // NOTE: The field 'value' is changed from 'required' to 'optional' + // in 0.20.0. It will only cause issues if a new framework is + // connecting to an old master. + optional bool shell = 6 [default = true]; + optional string value = 3; + repeated string arguments = 7; + + // Enables executor and tasks to run as a specific user. If the user + // field is present both in FrameworkInfo and here, the CommandInfo + // user value takes precedence. + optional string user = 5; +} + + +/** + * Describes information about an executor. + */ +message ExecutorInfo { + enum Type { + UNKNOWN = 0; + + // Mesos provides a simple built-in default executor that frameworks can + // leverage to run shell commands and containers. + // + // NOTES: + // + // 1) `command` must not be set when using a default executor. + // + // 2) Default executor only accepts a *single* `LAUNCH` or `LAUNCH_GROUP` + // operation. + // + // 3) If `container` is set, `container.type` must be `MESOS` + // and `container.mesos.image` must not be set. + DEFAULT = 1; + + // For frameworks that need custom functionality to run tasks, a `CUSTOM` + // executor can be used. Note that `command` must be set when using a + // `CUSTOM` executor. + CUSTOM = 2; + + option (gogoproto.goproto_enum_prefix) = true; + } + + // For backwards compatibility, if this field is not set when using `LAUNCH` + // operation, Mesos will infer the type by checking if `command` is set + // (`CUSTOM`) or unset (`DEFAULT`). `type` must be set when using + // `LAUNCH_GROUP` operation. + // + // TODO(vinod): Add support for explicitly setting `type` to `DEFAULT` in + // `LAUNCH` operation. + optional Type type = 15 [(gogoproto.nullable) = false]; + + required ExecutorID executor_id = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "ExecutorID"]; + optional FrameworkID framework_id = 8 [(gogoproto.customname) = "FrameworkID"]; // TODO(benh): Make this required. + optional CommandInfo command = 7; + + // Executor provided with a container will launch the container + // with the executor's CommandInfo and we expect the container to + // act as a Mesos executor. + optional ContainerInfo container = 11; + + repeated Resource resources = 5 [(gogoproto.nullable) = false]; + optional string name = 9; + + // 'source' is an identifier style string used by frameworks to + // track the source of an executor. This is useful when it's + // possible for different executor ids to be related semantically. + // + // NOTE: 'source' is exposed alongside the resource usage of the + // executor via JSON on the agent. This allows users to import usage + // information into a time series database for monitoring. + // + // This field is deprecated since 1.0. Please use labels for + // free-form metadata instead. + optional string source = 10 [deprecated = true]; // Since 1.0. + + // This field can be used to pass arbitrary bytes to an executor. + optional bytes data = 4; + + // Service discovery information for the executor. It is not + // interpreted or acted upon by Mesos. It is up to a service + // discovery system to use this information as needed and to handle + // executors without service discovery information. + optional DiscoveryInfo discovery = 12; + + // When shutting down an executor the agent will wait in a + // best-effort manner for the grace period specified here + // before forcibly destroying the container. The executor + // must not assume that it will always be allotted the full + // grace period, as the agent may decide to allot a shorter + // period and failures / forcible terminations may occur. + optional DurationInfo shutdown_grace_period = 13; + + // Labels are free-form key value pairs which are exposed through + // master and agent endpoints. Labels will not be interpreted or + // acted upon by Mesos itself. As opposed to the data field, labels + // will be kept in memory on master and agent processes. Therefore, + // labels should be used to tag executors with lightweight metadata. + // Labels should not contain duplicate key-value pairs. + optional Labels labels = 14; +} + + +/** + * Describes a domain. A domain is a collection of hosts that have + * similar characteristics. Mesos currently only supports "fault + * domains", which identify groups of hosts with similar failure + * characteristics. + * + * Frameworks can generally assume that network links between hosts in + * the same fault domain have lower latency, higher bandwidth, and better + * availability than network links between hosts in different domains. + * Schedulers may prefer to place network-intensive workloads in the + * same domain, as this may improve performance. Conversely, a single + * failure that affects a host in a domain may be more likely to + * affect other hosts in the same domain; hence, schedulers may prefer + * to place workloads that require high availability in multiple + * domains. (For example, all the hosts in a single rack might lose + * power or network connectivity simultaneously.) + * + * There are two kinds of fault domains: regions and zones. Regions + * offer the highest degree of fault isolation, but network latency + * between regions is typically high (typically >50 ms). Zones offer a + * modest degree of fault isolation along with reasonably low network + * latency (typically <10 ms). + * + * The mapping from fault domains to physical infrastructure is up to + * the operator to configure. In cloud environments, regions and zones + * can be mapped to the "region" and "availability zone" concepts + * exposed by most cloud providers, respectively. In on-premise + * deployments, regions and zones can be mapped to data centers and + * racks, respectively. + * + * Both masters and agents can be configured with domains. Frameworks + * can compare the domains of two hosts to determine if the hosts are + * in the same zone, in different zones in the same region, or in + * different regions. Note that all masters in a given Mesos cluster + * must be in the same region. + */ +message DomainInfo { + message FaultDomain { + message RegionInfo { + required string name = 1 [(gogoproto.nullable) = false]; + } + + message ZoneInfo { + required string name = 1 [(gogoproto.nullable) = false]; + } + + required RegionInfo region = 1 [(gogoproto.nullable) = false]; + required ZoneInfo zone = 2 [(gogoproto.nullable) = false]; + } + + optional FaultDomain fault_domain = 1; +} + + +/** + * Describes a master. This will probably have more fields in the + * future which might be used, for example, to link a framework webui + * to a master webui. + */ +message MasterInfo { + required string id = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "ID"]; + + // The IP address (only IPv4) as a packed 4-bytes integer, + // stored in network order. Deprecated, use `address.ip` instead. + required uint32 ip = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "IP"]; + + // The TCP port the Master is listening on for incoming + // HTTP requests; deprecated, use `address.port` instead. + required uint32 port = 3 [default = 5050]; + + // In the default implementation, this will contain information + // about both the IP address, port and Master name; it should really + // not be relied upon by external tooling/frameworks and be + // considered an "internal" implementation field. + optional string pid = 4 [(gogoproto.customname) = "PID"]; + + // The server's hostname, if available; it may be unreliable + // in environments where the DNS configuration does not resolve + // internal hostnames (eg, some public cloud providers). + // Deprecated, use `address.hostname` instead. + optional string hostname = 5; + + // The running Master version, as a string; taken from the + // generated "master/version.hpp". + optional string version = 6; + + // The full IP address (supports both IPv4 and IPv6 formats) + // and supersedes the use of `ip`, `port` and `hostname`. + // Since Mesos 0.24. + optional Address address = 7; + + // The domain that this master belongs to. All masters in a Mesos + // cluster should belong to the same region. + optional DomainInfo domain = 8; + + message Capability { + enum Type { + UNKNOWN = 0; + + // The master can handle slaves whose state + // changes after re-registering. + AGENT_UPDATE = 1; + + option (gogoproto.goproto_enum_prefix) = true; + } + optional Type type = 1 [(gogoproto.nullable) = false]; + } + + repeated Capability capabilities = 9 [(gogoproto.nullable) = false]; +} + + +/** + * Describes an agent. Note that the 'id' field is only available + * after an agent is registered with the master, and is made available + * here to facilitate re-registration. + */ +message AgentInfo { + required string hostname = 1 [(gogoproto.nullable) = false]; + optional int32 port = 8 [default = 5051]; + + // The configured resources at the agent. This does not include any + // dynamic reservations or persistent volumes that may currently + // exist at the agent. + repeated Resource resources = 3 [(gogoproto.nullable) = false]; + + repeated Attribute attributes = 5 [(gogoproto.nullable) = false]; + optional AgentID id = 6 [(gogoproto.customname) = "ID"]; + + // The domain that this agent belongs to. If the agent's region + // differs from the master's region, it will not appear in resource + // offers to frameworks that have not enabled the REGION_AWARE + // capability. + optional DomainInfo domain = 10; + + message Capability { + enum Type { + // This must be the first enum value in this list, to + // ensure that if 'type' is not set, the default value + // is UNKNOWN. This enables enum values to be added + // in a backwards-compatible way. See: MESOS-4997. + UNKNOWN = 0; + + // This expresses the ability for the agent to be able + // to launch tasks of a 'multi-role' framework. + MULTI_ROLE = 1; + + // This expresses the ability for the agent to be able to launch + // tasks, reserve resources, and create volumes using resources + // allocated to a 'hierarchical-role'. + // NOTE: This capability is required specifically for creating + // volumes because a hierchical role includes '/' (slashes) in them. + // Agents with this capability know to transform the '/' (slashes) + // into ' ' (spaces). + HIERARCHICAL_ROLE = 2; + + // This capability has three effects for an agent. + // + // (1) The format of the checkpointed resources, and + // the resources reported to master. + // + // These resources are reported in the "pre-reservation-refinement" + // format if none of the resources have refined reservations. If any + // of the resources have refined reservations, they are reported in + // the "post-reservation-refinement" format. The purpose is to allow + // downgrading of an agent as well as communication with a pre-1.4.0 + // master until the reservation refinement feature is actually used. + // + // See the 'Resource Format' section for more details. + // + // (2) The format of the resources reported by the HTTP endpoints. + // + // For resources reported by agent endpoints, the + // "pre-reservation-refinement" format is "injected" if possible. + // That is, resources without refined reservations will have the + // `Resource.role` and `Resource.reservation` set, whereas + // resources with refined reservations will not. + // + // See the 'Resource Format' section for more details. + // + // (3) The ability for the agent to launch tasks, reserve resources, and + // create volumes using resources that have refined reservations. + // + // See `ReservationInfo.reservations` section for more details. + // + // NOTE: Resources are said to have refined reservations if it uses the + // `Resource.reservations` field, and `Resource.reservations_size() > 1`. + RESERVATION_REFINEMENT = 3; + + // This expresses the ability for the agent to handle resource + // provider related operations. This includes the following: + // + // (1) The ability to report resources that are provided by some + // local resource providers through the resource provider API. + // + // (2) The ability to provide operation feedback. + RESOURCE_PROVIDER = 4; + option (gogoproto.goproto_enum_prefix) = true; + } + + // Enum fields should be optional, see: MESOS-4997. + optional Type type = 1 [(gogoproto.nullable) = false]; + } +} + + +/** + * Describes the container configuration to run a CSI plugin component. + */ +message CSIPluginContainerInfo { + enum Service { + UNKNOWN = 0; + CONTROLLER_SERVICE = 1; + NODE_SERVICE = 2; + + option (gogoproto.goproto_enum_prefix) = true; + } + + repeated Service services = 1; + optional CommandInfo command = 2; + repeated Resource resources = 3 [(gogoproto.nullable) = false]; + optional ContainerInfo container = 4; +} + + +/** + * Describes a CSI plugin. + */ +message CSIPluginInfo { + // The type of the CSI service. This uniquely identifies a CSI + // implementation. For instance: + // org.apache.mesos.csi.test + // + // Please follow to Java package naming convention + // (https://en.wikipedia.org/wiki/Java_package#Package_naming_conventions) + // to avoid conflicts on type names. + required string type = 1 [(gogoproto.nullable) = false]; + + // The name of the CSI service. There could be mutliple instances of a + // type of CSI service. The name field is used to distinguish these + // instances. It should be a legal Java identifier + // (https://docs.oracle.com/javase/tutorial/java/nutsandbolts/variables.html) + // to avoid conflicts on concatenation of type and name. + required string name = 2 [(gogoproto.nullable) = false]; + + // A list of container configurations to run CSI plugin components. + // The controller service will be served by the first configuration + // that contains `CONTROLLER_SERVICE`, and the node service will be + // served by the first configuration that contains `NODE_SERVICE`. + repeated CSIPluginContainerInfo containers = 3 [(gogoproto.nullable) = false]; +} + + +/** + * Describes a resource provider. Note that the 'id' field is only available + * after a resource provider is registered with the master, and is made + * available here to facilitate re-registration. + */ +message ResourceProviderInfo { + optional ResourceProviderID id = 1 [(gogoproto.customname) = "ID"]; + repeated Attribute attributes = 2 [(gogoproto.nullable) = false]; + + // The type of the resource provider. This uniquely identifies a + // resource provider implementation. For instance: + // org.apache.mesos.rp.local.storage + // + // Please follow to Java package naming convention + // (https://en.wikipedia.org/wiki/Java_package#Package_naming_conventions) + // to avoid conflicts on type names. + required string type = 3 [(gogoproto.nullable) = false]; + + // The name of the resource provider. There could be multiple + // instances of a type of resource provider. The name field is used + // to distinguish these instances. It should be a legal Java identifier + // (https://docs.oracle.com/javase/tutorial/java/nutsandbolts/variables.html) + // to avoid conflicts on concatenation of type and name. + required string name = 4 [(gogoproto.nullable) = false]; + + // The stack of default reservations. If this field is not empty, it + // indicates that resources from this resource provider are reserved + // by default, except for the resources that have been reserved or + // unreserved through operations. The first `ReservationInfo` + // may have type `STATIC` or `DYNAMIC`, but the rest must have + // `DYNAMIC`. One can create a new reservation on top of an existing + // one by pushing a new `ReservationInfo` to the back. The last + // `ReservationInfo` in this stack is the "current" reservation. The + // new reservation's role must be a child of the current one. + repeated Resource.ReservationInfo default_reservations = 5 [(gogoproto.nullable) = false]; // EXPERIMENTAL. + + // Storage resource provider related information. + message Storage { + required CSIPluginInfo plugin = 1 [(gogoproto.nullable) = false]; + } + + optional Storage storage = 6; // EXPERIMENTAL. +} + + +/** + * Describes an Attribute or Resource "value". A value is described + * using the standard protocol buffer "union" trick. + */ +message Value { + enum Type { + SCALAR = 0; + RANGES = 1; + SET = 2; + TEXT = 3; + } + + message Scalar { + // Scalar values are represented using floating point. To reduce + // the chance of unpredictable floating point behavior due to + // roundoff error, Mesos only supports three decimal digits of + // precision for scalar resource values. That is, floating point + // values are converted to a fixed point format that supports + // three decimal digits of precision, and then converted back to + // floating point on output. Any additional precision in scalar + // resource values is discarded (via rounding). + required double value = 1 [(gogoproto.nullable) = false]; + } + + message Range { + required uint64 begin = 1 [(gogoproto.nullable) = false]; + required uint64 end = 2 [(gogoproto.nullable) = false]; + } + + message Ranges { + repeated Range range = 1 [(gogoproto.nullable) = false]; + } + + message Set { + repeated string item = 1; + } + + message Text { + required string value = 1 [(gogoproto.nullable) = false]; + } + + required Type type = 1 [(gogoproto.nullable) = false]; + optional Scalar scalar = 2; + optional Ranges ranges = 3; + optional Set set = 4; + optional Text text = 5; +} + + +/** + * Describes an attribute that can be set on a machine. For now, + * attributes and resources share the same "value" type, but this may + * change in the future and attributes may only be string based. + */ +message Attribute { + required string name = 1 [(gogoproto.nullable) = false]; + required Value.Type type = 2 [(gogoproto.nullable) = false]; + optional Value.Scalar scalar = 3; + optional Value.Ranges ranges = 4; + optional Value.Set set = 6; + optional Value.Text text = 5; +} + + +/** + * Describes a resource from a resource provider. The `name` field is + * a string like "cpus" or "mem" that indicates which kind of resource + * this is; the rest of the fields describe the properties of the + * resource. A resource can take on one of three types: scalar + * (double), a list of finite and discrete ranges (e.g., [1-10, + * 20-30]), or a set of items. A resource is described using the + * standard protocol buffer "union" trick. + * + * Note that "disk" and "mem" resources are scalar values expressed in + * megabytes. Fractional "cpus" values are allowed (e.g., "0.5"), + * which correspond to partial shares of a CPU. + */ +message Resource { + optional ResourceProviderID provider_id = 12 [(gogoproto.customname) = "ProviderID"]; + + required string name = 1 [(gogoproto.nullable) = false]; + required Value.Type type = 2; + optional Value.Scalar scalar = 3; + optional Value.Ranges ranges = 4; + optional Value.Set set = 5; + + // The role that this resource is reserved for. If "*", this indicates + // that the resource is unreserved. Otherwise, the resource will only + // be offered to frameworks that belong to this role. + // + // NOTE: Frameworks must not set this field if `reservations` is set. + // See the 'Resource Format' section for more details. + // + // TODO(mpark): Deprecate once `reservations` is no longer experimental. + optional string role = 6 [default = "*", deprecated=true]; + + // This was initially introduced to support MULTI_ROLE capable + // frameworks. Frameworks that are not MULTI_ROLE capable can + // continue to assume that the offered resources are allocated + // to their role. + message AllocationInfo { + // If set, this resource is allocated to a role. Note that in the + // future, this may be unset and the scheduler may be responsible + // for allocating to one of its roles. + optional string role = 1; + + // In the future, we may add additional fields here, e.g. priority + // tier, type of allocation (quota / fair share). + } + + optional AllocationInfo allocation_info = 11; + + // Resource Format: + // + // Frameworks receive resource offers in one of two formats, depending on + // whether the RESERVATION_REFINEMENT capability is enabled. + // + // __WITHOUT__ the RESERVATION_REFINEMENT capability, the framework is offered + // resources in the "pre-reservation-refinement" format. In this format, the + // `Resource.role` and `Resource.reservation` fields are used in conjunction + // to describe the reservation state of a `Resource` message. + // + // The following is an overview of the possible reservation states: + // + // +------------+------------------------------------------------------------+ + // | unreserved | { | + // | | role: "*", | + // | | reservation: , | + // | | reservations: | + // | | } | + // +------------+------------------------------------------------------------+ + // | static | { | + // | | role: "eng", | + // | | reservation: , | + // | | reservations: | + // | | } | + // +------------+------------------------------------------------------------+ + // | dynamic | { | + // | | role: "eng", | + // | | reservation: { | + // | | type: , | + // | | role: , | + // | | principal: , | + // | | labels: | + // | | }, | + // | | reservations: | + // | | } | + // +------------+------------------------------------------------------------+ + // + // __WITH__ the RESERVATION_REFINEMENT capability, the framework is offered + // resources in the "post-reservation-refinement" format. In this format, the + // reservation state of a `Resource` message is expressed solely in + // `Resource.reservations` field. + // + // The following is an overview of the possible reservation states: + // + // +------------+------------------------------------------------------------+ + // | unreserved | { | + // | | role: , | + // | | reservation: , | + // | | reservations: [] | + // | | } | + // +------------+------------------------------------------------------------+ + // | static | { | + // | | role: , | + // | | reservation: , | + // | | reservations: [ | + // | | { | + // | | type: STATIC, | + // | | role: "eng", | + // | | principal: , | + // | | labels: | + // | | } | + // | | ] | + // | | } | + // +------------+------------------------------------------------------------+ + // | dynamic | { | + // | | role: , | + // | | reservation: , | + // | | reservations: [ | + // | | { | + // | | type: DYNAMIC, | + // | | role: "eng", | + // | | principal: , | + // | | labels: | + // | | } | + // | | ] | + // | | } | + // +------------+------------------------------------------------------------+ + // + // We can also __refine__ reservations with this capability like so: + // + // +------------+------------------------------------------------------------+ + // | refined | { | + // | | role: , | + // | | reservation: , | + // | | reservations: [ | + // | | { | + // | | type: STATIC or DYNAMIC, | + // | | role: "eng", | + // | | principal: , | + // | | labels: | + // | | }, | + // | | { | + // | | type: DYNAMIC, | + // | | role: "eng/front_end", | + // | | principal: , | + // | | labels: | + // | | } | + // | | ] | + // | | } | + // +------------+------------------------------------------------------------+ + // + // NOTE: Each `ReservationInfo` in the `reservations` field denotes + // a reservation that refines the previous `ReservationInfo`. + + message ReservationInfo { + // Describes a reservation. A static reservation is set by the operator on + // the command-line and they are immutable without agent restart. A dynamic + // reservation is made by an operator via the '/reserve' HTTP endpoint + // or by a framework via the offer cycle by sending back an + // 'Offer::Operation::Reserve' message. + // + // NOTE: We currently do not allow frameworks with role "*" to make dynamic + // reservations. + + enum Type { + UNKNOWN = 0; + STATIC = 1; + DYNAMIC = 2; + + option (gogoproto.goproto_enum_prefix) = true; + } + + // The type of this reservation. + // + // NOTE: This field must not be set for `Resource.reservation`. + // See the 'Resource Format' section for more details. + optional Type type = 4; + + // The role to which this reservation is made for. + // + // NOTE: This field must not be set for `Resource.reservation`. + // See the 'Resource Format' section for more details. + optional string role = 3; + + // Indicates the principal, if any, of the framework or operator + // that reserved this resource. If reserved by a framework, the + // field should match the `FrameworkInfo.principal`. It is used in + // conjunction with the `UnreserveResources` ACL to determine + // whether the entity attempting to unreserve this resource is + // permitted to do so. + optional string principal = 1; + + // Labels are free-form key value pairs that can be used to + // associate arbitrary metadata with a reserved resource. For + // example, frameworks can use labels to identify the intended + // purpose for a portion of the resources the framework has + // reserved at a given agent. Labels should not contain duplicate + // key-value pairs. + optional Labels labels = 2; + } + + // If this is set, this resource was dynamically reserved by an + // operator or a framework. Otherwise, this resource is either unreserved + // or statically reserved by an operator via the --resources flag. + // + // NOTE: Frameworks must not set this field if `reservations` is set. + // See the 'Resource Format' section for more details. + // + // TODO(mpark): Deprecate once `reservations` is no longer experimental. + optional ReservationInfo reservation = 8; + + // The stack of reservations. If this field is empty, it indicates that this + // resource is unreserved. Otherwise, the resource is reserved. The first + // `ReservationInfo` may have type `STATIC` or `DYNAMIC`, but the rest must + // have `DYNAMIC`. One can create a new reservation on top of an existing + // one by pushing a new `ReservationInfo` to the back. The last + // `ReservationInfo` in this stack is the "current" reservation. The new + // reservation's role must be a child of the current reservation's role. + // + // NOTE: Frameworks must not set this field if `reservation` is set. + // See the 'Resource Format' section for more details. + // + // TODO(mpark): Deprecate `role` and `reservation` once this is stable. + repeated ReservationInfo reservations = 13 [(gogoproto.nullable) = false]; // EXPERIMENTAL. + + message DiskInfo { + // Describes a persistent disk volume. + // + // A persistent disk volume will not be automatically garbage + // collected if the task/executor/agent terminates, but will be + // re-offered to the framework(s) belonging to the 'role'. + // + // NOTE: Currently, we do not allow persistent disk volumes + // without a reservation (i.e., 'role' cannot be '*'). + message Persistence { + // A unique ID for the persistent disk volume. This ID must be + // unique per role on each agent. Although it is possible to use + // the same ID on different agents in the cluster and to reuse + // IDs after a volume with that ID has been destroyed, both + // practices are discouraged. + required string id = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "ID"]; + + // This field indicates the principal of the operator or + // framework that created this volume. It is used in conjunction + // with the "destroy" ACL to determine whether an entity + // attempting to destroy the volume is permitted to do so. + // + // NOTE: This field should match the FrameworkInfo.principal of + // the framework that created the volume. + optional string principal = 2; + } + + optional Persistence persistence = 1; + + // Describes how this disk resource will be mounted in the + // container. If not set, the disk resource will be used as the + // sandbox. Otherwise, it will be mounted according to the + // 'container_path' inside 'volume'. The 'host_path' inside + // 'volume' is ignored. + // NOTE: If 'volume' is set but 'persistence' is not set, the + // volume will be automatically garbage collected after + // task/executor terminates. Currently, if 'persistence' is set, + // 'volume' must be set. + optional Volume volume = 2; + + // Describes where a disk originates from. + // TODO(jmlvanre): Add support for BLOCK devices. + message Source { + enum Type { + UNKNOWN = 0; + PATH = 1; + MOUNT = 2; + BLOCK = 3; + RAW = 4; + + option (gogoproto.goproto_enum_prefix) = true; + } + + // A folder that can be located on a separate disk device. This + // can be shared and carved up as necessary between frameworks. + message Path { + // Path to the folder (e.g., /mnt/raid/disk0). If the path is a + // relative path, it is relative to the agent work directory. + optional string root = 1; + } + + // A mounted file-system set up by the Agent administrator. This + // can only be used exclusively: a framework cannot accept a + // partial amount of this disk. + message Mount { + // Path to mount point (e.g., /mnt/raid/disk0). If the path is a + // relative path, it is relative to the agent work directory. + optional string root = 1; + } + + required Type type = 1 [(gogoproto.nullable) = false]; + optional Path path = 2; + optional Mount mount = 3; + + // An identifier for this source. This field maps onto CSI + // volume IDs and is not expected to be set by frameworks. + optional string id = 4 [(gogoproto.customname) = "ID"]; // EXPERIMENTAL. + + // Additional metadata for this source. This field maps onto CSI + // volume metadata and is not expected to be set by frameworks. + optional Labels metadata = 5; // EXPERIMENTAL. + + // This field serves as an indirection to a set of storage + // vendor specific disk parameters which describe the properties + // of the disk. The operator will setup mappings between a + // profile name to a set of vendor specific disk parameters. And + // the framework will do disk selection based on profile names, + // instead of vendor specific disk parameters. + // + // Also see the DiskProfile module. + optional string profile = 6; // EXPERIMENTAL. + } + + optional Source source = 3; + } + + optional DiskInfo disk = 7; + + message RevocableInfo {} + + // If this is set, the resources are revocable, i.e., any tasks or + // executors launched using these resources could get preempted or + // throttled at any time. This could be used by frameworks to run + // best effort tasks that do not need strict uptime or performance + // guarantees. Note that if this is set, 'disk' or 'reservation' + // cannot be set. + optional RevocableInfo revocable = 9; + + // Allow the resource to be shared across tasks. + message SharedInfo {} + + // If this is set, the resources are shared, i.e. multiple tasks + // can be launched using this resource and all of them shall refer + // to the same physical resource on the cluster. Note that only + // persistent volumes can be shared currently. + optional SharedInfo shared = 10; +} + + +/** + * When the network bandwidth caps are enabled and the container + * is over its limit, outbound packets may be either delayed or + * dropped completely either because it exceeds the maximum bandwidth + * allocation for a single container (the cap) or because the combined + * network traffic of multiple containers on the host exceeds the + * transmit capacity of the host (the share). We can report the + * following statistics for each of these conditions exported directly + * from the Linux Traffic Control Queueing Discipline. + * + * id : name of the limiter, e.g. 'tx_bw_cap' + * backlog : number of packets currently delayed + * bytes : total bytes seen + * drops : number of packets dropped in total + * overlimits : number of packets which exceeded allocation + * packets : total packets seen + * qlen : number of packets currently queued + * rate_bps : throughput in bytes/sec + * rate_pps : throughput in packets/sec + * requeues : number of times a packet has been delayed due to + * locking or device contention issues + * + * More information on the operation of Linux Traffic Control can be + * found at http://www.lartc.org/lartc.html. + */ +message TrafficControlStatistics { + required string id = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "ID"]; + optional uint64 backlog = 2; + optional uint64 bytes = 3; + optional uint64 drops = 4; + optional uint64 overlimits = 5; + optional uint64 packets = 6; + optional uint64 qlen = 7; + optional uint64 ratebps = 8 [(gogoproto.customname) = "RateBPS"]; + optional uint64 ratepps = 9 [(gogoproto.customname) = "RatePPS"]; + optional uint64 requeues = 10; +} + + +message IpStatistics { + optional int64 Forwarding = 1; + optional int64 DefaultTTL = 2; + optional int64 InReceives = 3; + optional int64 InHdrErrors = 4; + optional int64 InAddrErrors = 5; + optional int64 ForwDatagrams = 6; + optional int64 InUnknownProtos = 7; + optional int64 InDiscards = 8; + optional int64 InDelivers = 9; + optional int64 OutRequests = 10; + optional int64 OutDiscards = 11; + optional int64 OutNoRoutes = 12; + optional int64 ReasmTimeout = 13; + optional int64 ReasmReqds = 14; + optional int64 ReasmOKs = 15; + optional int64 ReasmFails = 16; + optional int64 FragOKs = 17; + optional int64 FragFails = 18; + optional int64 FragCreates = 19; +} + + +message IcmpStatistics { + optional int64 InMsgs = 1; + optional int64 InErrors = 2; + optional int64 InCsumErrors = 3; + optional int64 InDestUnreachs = 4; + optional int64 InTimeExcds = 5; + optional int64 InParmProbs = 6; + optional int64 InSrcQuenchs = 7; + optional int64 InRedirects = 8; + optional int64 InEchos = 9; + optional int64 InEchoReps = 10; + optional int64 InTimestamps = 11; + optional int64 InTimestampReps = 12; + optional int64 InAddrMasks = 13; + optional int64 InAddrMaskReps = 14; + optional int64 OutMsgs = 15; + optional int64 OutErrors = 16; + optional int64 OutDestUnreachs = 17; + optional int64 OutTimeExcds = 18; + optional int64 OutParmProbs = 19; + optional int64 OutSrcQuenchs = 20; + optional int64 OutRedirects = 21; + optional int64 OutEchos = 22; + optional int64 OutEchoReps = 23; + optional int64 OutTimestamps = 24; + optional int64 OutTimestampReps = 25; + optional int64 OutAddrMasks = 26; + optional int64 OutAddrMaskReps = 27; +} + + +message TcpStatistics { + optional int64 RtoAlgorithm = 1; + optional int64 RtoMin = 2; + optional int64 RtoMax = 3; + optional int64 MaxConn = 4; + optional int64 ActiveOpens = 5; + optional int64 PassiveOpens = 6; + optional int64 AttemptFails = 7; + optional int64 EstabResets = 8; + optional int64 CurrEstab = 9; + optional int64 InSegs = 10; + optional int64 OutSegs = 11; + optional int64 RetransSegs = 12; + optional int64 InErrs = 13; + optional int64 OutRsts = 14; + optional int64 InCsumErrors = 15; +} + + +message UdpStatistics { + optional int64 InDatagrams = 1; + optional int64 NoPorts = 2; + optional int64 InErrors = 3; + optional int64 OutDatagrams = 4; + optional int64 RcvbufErrors = 5; + optional int64 SndbufErrors = 6; + optional int64 InCsumErrors = 7; + optional int64 IgnoredMulti = 8; +} + + +message SNMPStatistics { + optional IpStatistics ip_stats = 1 [(gogoproto.customname) = "IPStats"]; + optional IcmpStatistics icmp_stats = 2 [(gogoproto.customname) = "ICMPStats"]; + optional TcpStatistics tcp_stats = 3 [(gogoproto.customname) = "TCPStats"]; + optional UdpStatistics udp_stats = 4 [(gogoproto.customname) = "UDPStats"]; +} + + +message DiskStatistics { + optional Resource.DiskInfo.Source source = 1; + optional Resource.DiskInfo.Persistence persistence = 2; + optional uint64 limit_bytes = 3; + optional uint64 used_bytes = 4; +} + + +/** + * A snapshot of resource usage statistics. + */ +message ResourceStatistics { + required double timestamp = 1 [(gogoproto.nullable) = false]; // Snapshot time, in seconds since the Epoch. + + optional uint32 processes = 30; + optional uint32 threads = 31; + + // CPU Usage Information: + // Total CPU time spent in user mode, and kernel mode. + optional double cpus_user_time_secs = 2 [(gogoproto.customname) = "CPUsUserTimeSecs"]; + optional double cpus_system_time_secs = 3 [(gogoproto.customname) = "CPUsSystemTimeSecs"]; + + // Number of CPUs allocated. + optional double cpus_limit = 4 [(gogoproto.customname) = "CPUsLimit"]; + + // cpu.stat on process throttling (for contention issues). + optional uint32 cpus_nr_periods = 7 [(gogoproto.customname) = "CPUsNrPeriods"]; + optional uint32 cpus_nr_throttled = 8 [(gogoproto.customname) = "CPUsNrThrottled"]; + optional double cpus_throttled_time_secs = 9 [(gogoproto.customname) = "CPUsThrottledTimeSecs"]; + + // Memory Usage Information: + + // mem_total_bytes was added in 0.23.0 to represent the total memory + // of a process in RAM (as opposed to in Swap). This was previously + // reported as mem_rss_bytes, which was also changed in 0.23.0 to + // represent only the anonymous memory usage, to keep in sync with + // Linux kernel's (arguably erroneous) use of terminology. + optional uint64 mem_total_bytes = 36; + + // Total memory + swap usage. This is set if swap is enabled. + optional uint64 mem_total_memsw_bytes = 37; + + // Hard memory limit for a container. + optional uint64 mem_limit_bytes = 6; + + // Soft memory limit for a container. + optional uint64 mem_soft_limit_bytes = 38; + + // Broken out memory usage information: pagecache, rss (anonymous), + // mmaped files and swap. + + // TODO(chzhcn) mem_file_bytes and mem_anon_bytes are deprecated in + // 0.23.0 and will be removed in 0.24.0. + optional uint64 mem_file_bytes = 10; + optional uint64 mem_anon_bytes = 11; + + // mem_cache_bytes is added in 0.23.0 to represent page cache usage. + optional uint64 mem_cache_bytes = 39; + + // Since 0.23.0, mem_rss_bytes is changed to represent only + // anonymous memory usage. Note that neither its requiredness, type, + // name nor numeric tag has been changed. + optional uint64 mem_rss_bytes = 5 [(gogoproto.customname) = "MemRSSBytes"]; + + optional uint64 mem_mapped_file_bytes = 12; + // This is only set if swap is enabled. + optional uint64 mem_swap_bytes = 40; + optional uint64 mem_unevictable_bytes = 41; + + // Number of occurrences of different levels of memory pressure + // events reported by memory cgroup. Pressure listening (re)starts + // with these values set to 0 when agent (re)starts. See + // https://www.kernel.org/doc/Documentation/cgroups/memory.txt for + // more details. + optional uint64 mem_low_pressure_counter = 32; + optional uint64 mem_medium_pressure_counter = 33; + optional uint64 mem_critical_pressure_counter = 34; + + // Disk Usage Information for executor working directory. + optional uint64 disk_limit_bytes = 26; + optional uint64 disk_used_bytes = 27; + + // Per disk (resource) statistics. + repeated DiskStatistics disk_statistics = 43 [(gogoproto.nullable) = false]; + + // Cgroups blkio statistics. + optional CgroupInfo.Blkio.Statistics blkio_statistics = 44; + + // Perf statistics. + optional PerfStatistics perf = 13; + + // Network Usage Information: + optional uint64 net_rx_packets = 14; + optional uint64 net_rx_bytes = 15; + optional uint64 net_rx_errors = 16; + optional uint64 net_rx_dropped = 17; + optional uint64 net_tx_packets = 18; + optional uint64 net_tx_bytes = 19; + optional uint64 net_tx_errors = 20; + optional uint64 net_tx_dropped = 21; + + // The kernel keeps track of RTT (round-trip time) for its TCP + // sockets. RTT is a way to tell the latency of a container. + optional double net_tcp_rtt_microsecs_p50 = 22 [(gogoproto.customname) = "NetTCPRttMicrosecsP50"]; + optional double net_tcp_rtt_microsecs_p90 = 23 [(gogoproto.customname) = "NetTCPRttMicrosecsP90"]; + optional double net_tcp_rtt_microsecs_p95 = 24 [(gogoproto.customname) = "NetTCPRttMicrosecsP95"]; + optional double net_tcp_rtt_microsecs_p99 = 25 [(gogoproto.customname) = "NetTCPRttMicrosecsP99"]; + + optional double net_tcp_active_connections = 28 [(gogoproto.customname) = "NetTCPActiveConnections"]; + optional double net_tcp_time_wait_connections = 29 [(gogoproto.customname) = "NetTCPTimeWaitConnections"]; + + // Network traffic flowing into or out of a container can be delayed + // or dropped due to congestion or policy inside and outside the + // container. + repeated TrafficControlStatistics net_traffic_control_statistics = 35 [(gogoproto.nullable) = false]; + + // Network SNMP statistics for each container. + optional SNMPStatistics net_snmp_statistics = 42 [(gogoproto.customname) = "NetSNMPStatistics"]; +} + + +/** + * Describes a snapshot of the resource usage for executors. + */ +message ResourceUsage { + message Executor { + required ExecutorInfo executor_info = 1 [(gogoproto.nullable) = false]; + + // This includes resources used by the executor itself + // as well as its active tasks. + repeated Resource allocated = 2 [(gogoproto.nullable) = false]; + + // Current resource usage. If absent, the containerizer + // cannot provide resource usage. + optional ResourceStatistics statistics = 3; + + // The container id for the executor specified in the executor_info field. + required ContainerID container_id = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "ContainerID"]; + + message Task { + required string name = 1 [(gogoproto.nullable) = false]; + required TaskID id = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "ID"]; + repeated Resource resources = 3 [(gogoproto.nullable) = false]; + optional Labels labels = 4; + } + + // Non-terminal tasks. + repeated Task tasks = 5 [(gogoproto.nullable) = false]; + } + + repeated Executor executors = 1 [(gogoproto.nullable) = false]; + + // Agent's total resources including checkpointed dynamic + // reservations and persistent volumes. + repeated Resource total = 2 [(gogoproto.nullable) = false]; +} + + +/** + * Describes a sample of events from "perf stat". Only available on + * Linux. + * + * NOTE: Each optional field matches the name of a perf event (see + * "perf list") with the following changes: + * 1. Names are downcased. + * 2. Hyphens ('-') are replaced with underscores ('_'). + * 3. Events with alternate names use the name "perf stat" returns, + * e.g., for the event "cycles OR cpu-cycles" perf always returns + * cycles. + */ +message PerfStatistics { + required double timestamp = 1 [(gogoproto.nullable) = false]; // Start of sample interval, in seconds since the Epoch. + required double duration = 2 [(gogoproto.nullable) = false]; // Duration of sample interval, in seconds. + + // Hardware event. + optional uint64 cycles = 3; + optional uint64 stalled_cycles_frontend = 4; + optional uint64 stalled_cycles_backend = 5; + optional uint64 instructions = 6; + optional uint64 cache_references = 7; + optional uint64 cache_misses = 8; + optional uint64 branches = 9; + optional uint64 branch_misses = 10; + optional uint64 bus_cycles = 11; + optional uint64 ref_cycles = 12; + + // Software event. + optional double cpu_clock = 13 [(gogoproto.customname) = "CPUClock"]; + optional double task_clock = 14; + optional uint64 page_faults = 15; + optional uint64 minor_faults = 16; + optional uint64 major_faults = 17; + optional uint64 context_switches = 18; + optional uint64 cpu_migrations = 19 [(gogoproto.customname) = "CPUMigrations"]; + optional uint64 alignment_faults = 20; + optional uint64 emulation_faults = 21; + + // Hardware cache event. + optional uint64 l1_dcache_loads = 22; + optional uint64 l1_dcache_load_misses = 23; + optional uint64 l1_dcache_stores = 24; + optional uint64 l1_dcache_store_misses = 25; + optional uint64 l1_dcache_prefetches = 26; + optional uint64 l1_dcache_prefetch_misses = 27; + optional uint64 l1_icache_loads = 28; + optional uint64 l1_icache_load_misses = 29; + optional uint64 l1_icache_prefetches = 30; + optional uint64 l1_icache_prefetch_misses = 31; + optional uint64 llc_loads = 32 [(gogoproto.customname) = "LLCLoads"]; + optional uint64 llc_load_misses = 33 [(gogoproto.customname) = "LLCLoadMisses"]; + optional uint64 llc_stores = 34 [(gogoproto.customname) = "LLCStores"]; + optional uint64 llc_store_misses = 35 [(gogoproto.customname) = "LLCStoreMisses"]; + optional uint64 llc_prefetches = 36 [(gogoproto.customname) = "LLCPrefetches"]; + optional uint64 llc_prefetch_misses = 37 [(gogoproto.customname) = "LLCPrefetchMisses"]; + optional uint64 dtlb_loads = 38 [(gogoproto.customname) = "DTLBLoads"]; + optional uint64 dtlb_load_misses = 39 [(gogoproto.customname) = "DTLBLoadMisses"]; + optional uint64 dtlb_stores = 40 [(gogoproto.customname) = "DTLBStores"]; + optional uint64 dtlb_store_misses = 41 [(gogoproto.customname) = "DTLBStoreMisses"]; + optional uint64 dtlb_prefetches = 42 [(gogoproto.customname) = "DTLBPrefetches"]; + optional uint64 dtlb_prefetch_misses = 43 [(gogoproto.customname) = "DTLBPrefetchMisses"]; + optional uint64 itlb_loads = 44 [(gogoproto.customname) = "ITLBLoads"]; + optional uint64 itlb_load_misses = 45 [(gogoproto.customname) = "ITLBLoadMisses"]; + optional uint64 branch_loads = 46; + optional uint64 branch_load_misses = 47; + optional uint64 node_loads = 48; + optional uint64 node_load_misses = 49; + optional uint64 node_stores = 50; + optional uint64 node_store_misses = 51; + optional uint64 node_prefetches = 52; + optional uint64 node_prefetch_misses = 53; +} + + +/** + * Describes a request for resources that can be used by a framework + * to proactively influence the allocator. If 'agent_id' is provided + * then this request is assumed to only apply to resources on that + * agent. + */ +message Request { + optional AgentID agent_id = 1 [(gogoproto.customname) = "AgentID"]; + repeated Resource resources = 2 [(gogoproto.nullable) = false]; +} + + +/** + * Describes some resources available on an agent. An offer only + * contains resources from a single agent. + */ +message Offer { + required OfferID id = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "ID"]; + required FrameworkID framework_id = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "FrameworkID"]; + required AgentID agent_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "AgentID"]; + required string hostname = 4 [(gogoproto.nullable) = false]; + + // URL for reaching the agent running on the host. + optional URL url = 8 [(gogoproto.customname) = "URL"]; + + // The domain of the agent. + optional DomainInfo domain = 11; + + repeated Resource resources = 5 [(gogoproto.nullable) = false]; + repeated Attribute attributes = 7 [(gogoproto.nullable) = false]; + repeated ExecutorID executor_ids = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "ExecutorIDs"]; + + // Signifies that the resources in this Offer may be unavailable during + // the given interval. Any tasks launched using these resources may be + // killed when the interval arrives. For example, these resources may be + // part of a planned maintenance schedule. + // + // This field only provides information about a planned unavailability. + // The unavailability interval may not necessarily start at exactly this + // interval, nor last for exactly the duration of this interval. + // The unavailability may also be forever! See comments in + // `Unavailability` for more details. + optional Unavailability unavailability = 9; + + // An offer represents resources allocated to *one* of the + // roles managed by the scheduler. (Therefore, each + // `Offer.resources[i].allocation_info` will match the + // top level `Offer.allocation_info`). + optional Resource.AllocationInfo allocation_info = 10; + + // Defines an operation that can be performed against offers. + message Operation { + enum Type { + UNKNOWN = 0; + LAUNCH = 1; + LAUNCH_GROUP = 6; + RESERVE = 2; + UNRESERVE = 3; + CREATE = 4; + DESTROY = 5; + CREATE_VOLUME = 7; + DESTROY_VOLUME = 8; + CREATE_BLOCK = 9; + DESTROY_BLOCK = 10; + option (gogoproto.goproto_enum_prefix) = true; + } + + // TODO(vinod): Deprecate this in favor of `LaunchGroup` below. + message Launch { + repeated TaskInfo task_infos = 1 [(gogoproto.nullable) = false]; + } + + // Unlike `Launch` above, all the tasks in a `task_group` are + // atomically delivered to an executor. + // + // `NetworkInfo` set on executor will be shared by all tasks in + // the task group. + // + // TODO(vinod): Any volumes set on executor could be used by a + // task by explicitly setting `Volume.source` in its resources. + message LaunchGroup { + required ExecutorInfo executor = 1 [(gogoproto.nullable) = false]; + required TaskGroupInfo task_group = 2 [(gogoproto.nullable) = false]; + } + + message Reserve { + repeated Resource resources = 1 [(gogoproto.nullable) = false]; + } + + message Unreserve { + repeated Resource resources = 1 [(gogoproto.nullable) = false]; + } + + message Create { + repeated Resource volumes = 1 [(gogoproto.nullable) = false]; + } + + message Destroy { + repeated Resource volumes = 1 [(gogoproto.nullable) = false]; + } + + message CreateVolume { + required Resource source = 1 [(gogoproto.nullable) = false]; + required Resource.DiskInfo.Source.Type target_type = 2 [(gogoproto.nullable) = false]; + } + + message DestroyVolume { + required Resource volume = 1 [(gogoproto.nullable) = false]; + } + + message CreateBlock { + required Resource source = 1 [(gogoproto.nullable) = false]; + } + + message DestroyBlock { + required Resource block = 1 [(gogoproto.nullable) = false]; + } + + optional Type type = 1 [(gogoproto.nullable) = false]; + + // NOTE: The `id` field will allow frameworks to indicate that they wish to + // receive feedback about an operation. Since this feature is not yet + // implemented, the `id` field should NOT be set at present. See MESOS-8054. + optional OperationID id = 12 [(gogoproto.customname) = "ID"]; // Experimental. + + optional Launch launch = 2; + optional LaunchGroup launch_group = 7; + optional Reserve reserve = 3; + optional Unreserve unreserve = 4; + optional Create create = 5; + optional Destroy destroy = 6; + optional CreateVolume create_volume = 8; + optional DestroyVolume destroy_volume = 9; + optional CreateBlock create_block = 10; + optional DestroyBlock destroy_block = 11; + } +} + + +/** + * A request to return some resources occupied by a framework. + */ +message InverseOffer { + // This is the same OfferID as found in normal offers, which allows + // re-use of some of the OfferID-only messages. + required OfferID id = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "OfferID"]; + + // URL for reaching the agent running on the host. This enables some + // optimizations as described in MESOS-3012, such as allowing the + // scheduler driver to bypass the master and talk directly with an agent. + optional URL url = 2 [(gogoproto.customname) = "URL"]; + + // The framework that should release its resources. + // If no specifics are provided (i.e. which agent), all the framework's + // resources are requested back. + required FrameworkID framework_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FrameworkID"]; + + // Specified if the resources need to be released from a particular agent. + // All the framework's resources on this agent are requested back, + // unless further qualified by the `resources` field. + optional AgentID agent_id = 4 [(gogoproto.customname) = "AgentID"]; + + // This InverseOffer represents a planned unavailability event in the + // specified interval. Any tasks running on the given framework or agent + // may be killed when the interval arrives. Therefore, frameworks should + // aim to gracefully terminate tasks prior to the arrival of the interval. + // + // For reserved resources, the resources are expected to be returned to the + // framework after the unavailability interval. This is an expectation, + // not a guarantee. For example, if the unavailability duration is not set, + // the resources may be removed permanently. + // + // For other resources, there is no guarantee that requested resources will + // be returned after the unavailability interval. The allocator has no + // obligation to re-offer these resources to the prior framework after + // the unavailability. + required Unavailability unavailability = 5 [(gogoproto.nullable) = false]; + + // A list of resources being requested back from the framework, + // on the agent identified by `agent_id`. If no resources are specified + // then all resources are being requested back. For the purpose of + // maintenance, this field is always empty (maintenance always requests + // all resources back). + repeated Resource resources = 6 [(gogoproto.nullable) = false]; + + // TODO(josephw): Add additional options for narrowing down the resources + // being requested back. Such as specific executors, tasks, etc. +} + + +/** + * Describes a task. Passed from the scheduler all the way to an + * executor (see SchedulerDriver::launchTasks and + * Executor::launchTask). Either ExecutorInfo or CommandInfo should be set. + * A different executor can be used to launch this task, and subsequent tasks + * meant for the same executor can reuse the same ExecutorInfo struct. + */ +message TaskInfo { + required string name = 1 [(gogoproto.nullable) = false]; + required TaskID task_id = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "TaskID"]; + required AgentID agent_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "AgentID"]; + repeated Resource resources = 4 [(gogoproto.nullable) = false]; + optional ExecutorInfo executor = 5; + optional CommandInfo command = 7; + + // Task provided with a container will launch the container as part + // of this task paired with the task's CommandInfo. + optional ContainerInfo container = 9; + + // A health check for the task. Implemented for executor-less + // command-based tasks. For tasks that specify an executor, it is + // the executor's responsibility to implement the health checking. + optional HealthCheck health_check = 8; + + // A general check for the task. Implemented for all built-in executors. + // For tasks that specify an executor, it is the executor's responsibility + // to implement checking support. Executors should (all built-in executors + // will) neither interpret nor act on the check's result. + // + // NOTE: Check support in built-in executors is experimental. + // + // TODO(alexr): Consider supporting multiple checks per task. + optional CheckInfo check = 13; + + // A kill policy for the task. Implemented for executor-less + // command-based and docker tasks. For tasks that specify an + // executor, it is the executor's responsibility to implement + // the kill policy. + optional KillPolicy kill_policy = 12; + + optional bytes data = 6; + + // Labels are free-form key value pairs which are exposed through + // master and agent endpoints. Labels will not be interpreted or + // acted upon by Mesos itself. As opposed to the data field, labels + // will be kept in memory on master and agent processes. Therefore, + // labels should be used to tag tasks with light-weight meta-data. + // Labels should not contain duplicate key-value pairs. + optional Labels labels = 10; + + // Service discovery information for the task. It is not interpreted + // or acted upon by Mesos. It is up to a service discovery system + // to use this information as needed and to handle tasks without + // service discovery information. + optional DiscoveryInfo discovery = 11; +} + + +/** + * Describes a group of tasks that belong to an executor. The + * executor will receive the task group in a single message to + * allow the group to be launched "atomically". + * + * NOTES: + * 1) `NetworkInfo` must not be set inside task's `ContainerInfo`. + * 2) `TaskInfo.executor` doesn't need to set. If set, it should match + * `LaunchGroup.executor`. + */ +message TaskGroupInfo { + repeated TaskInfo tasks = 1 [(gogoproto.nullable) = false]; +} + + +// TODO(bmahler): Add executor_uuid here, and send it to the master. This will +// allow us to expose executor work directories for tasks in the webui when +// looking from the master level. Currently only the agent knows which run the +// task belongs to. +/** + * Describes a task, similar to `TaskInfo`. + * + * `Task` is used in some of the Mesos messages found below. + * `Task` is used instead of `TaskInfo` if: + * 1) we need additional IDs, such as a specific + * framework, executor, or agent; or + * 2) we do not need the additional data, such as the command run by the + * task or the health checks. These additional fields may be large and + * unnecessary for some Mesos messages. + * + * `Task` is generally constructed from a `TaskInfo`. See protobuf::createTask. + */ +message Task { + required string name = 1 [(gogoproto.nullable) = false]; + required TaskID task_id = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "TaskID"]; + required FrameworkID framework_id = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FrameworkID"]; + optional ExecutorID executor_id = 4 [(gogoproto.customname) = "ExecutorID"]; + required AgentID agent_id = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "AgentID"]; + required TaskState state = 6; // Latest state of the task. + repeated Resource resources = 7 [(gogoproto.nullable) = false]; + repeated TaskStatus statuses = 8 [(gogoproto.nullable) = false]; + + // These fields correspond to the state and uuid of the latest + // status update forwarded to the master. + // NOTE: Either both the fields must be set or both must be unset. + optional TaskState status_update_state = 9; + optional bytes status_update_uuid = 10 [(gogoproto.customname) = "StatusUpdateUUID"]; + + optional Labels labels = 11; + + // Service discovery information for the task. It is not interpreted + // or acted upon by Mesos. It is up to a service discovery system + // to use this information as needed and to handle tasks without + // service discovery information. + optional DiscoveryInfo discovery = 12; + + // Container information for the task. + optional ContainerInfo container = 13; + + // Specific user under which task is running. + optional string user = 14; +} + + +/** + * Describes possible task states. IMPORTANT: Mesos assumes tasks that + * enter terminal states (see below) imply the task is no longer + * running and thus clean up any thing associated with the task + * (ultimately offering any resources being consumed by that task to + * another task). + */ +enum TaskState { + TASK_STAGING = 6; // Initial state. Framework status updates should not use. + TASK_STARTING = 0; // The task is being launched by the executor. + TASK_RUNNING = 1; + + // NOTE: This should only be sent when the framework has + // the TASK_KILLING_STATE capability. + TASK_KILLING = 8; // The task is being killed by the executor. + + // The task finished successfully on its own without external interference. + TASK_FINISHED = 2; // TERMINAL. + + TASK_FAILED = 3; // TERMINAL: The task failed to finish successfully. + TASK_KILLED = 4; // TERMINAL: The task was killed by the executor. + TASK_ERROR = 7; // TERMINAL: The task description contains an error. + + // In Mesos 1.3, this will only be sent when the framework does NOT + // opt-in to the PARTITION_AWARE capability. + // + // NOTE: This state is not always terminal. For example, tasks might + // transition from TASK_LOST to TASK_RUNNING or other states when a + // partitioned agent re-registers. + TASK_LOST = 5; // The task failed but can be rescheduled. + + // The following task states are only sent when the framework + // opts-in to the PARTITION_AWARE capability. + + // The task failed to launch because of a transient error. The + // task's executor never started running. Unlike TASK_ERROR, the + // task description is valid -- attempting to launch the task again + // may be successful. + TASK_DROPPED = 9; // TERMINAL. + + // The task was running on an agent that has lost contact with the + // master, typically due to a network failure or partition. The task + // may or may not still be running. + TASK_UNREACHABLE = 10; + + // The task is no longer running. This can occur if the agent has + // been terminated along with all of its tasks (e.g., the host that + // was running the agent was rebooted). It might also occur if the + // task was terminated due to an agent or containerizer error, or if + // the task was preempted by the QoS controller in an + // oversubscription scenario. + TASK_GONE = 11; // TERMINAL. + + // The task was running on an agent that the master cannot contact; + // the operator has asserted that the agent has been shutdown, but + // this has not been directly confirmed by the master. If the + // operator is correct, the task is not running and this is a + // terminal state; if the operator is mistaken, the task may still + // be running and might return to RUNNING in the future. + TASK_GONE_BY_OPERATOR = 12; + + // The master has no knowledge of the task. This is typically + // because either (a) the master never had knowledge of the task, or + // (b) the master forgot about the task because it garbage collected + // its metadata about the task. The task may or may not still be + // running. + TASK_UNKNOWN = 13; +} + + +/** + * Describes a resource limitation that caused a task failure. + */ +message TaskResourceLimitation { + // This field contains the resource whose limits were violated. + // + // NOTE: 'Resources' is used here because the resource may span + // multiple roles (e.g. `"mem(*):1;mem(role):2"`). + repeated Resource resources = 1 [(gogoproto.nullable) = false]; +} + + +/** + * Describes a UUID. + */ +message UUID { + required bytes value = 1; +} + + +/** + * Describes an operation, similar to `Offer.Operation`, with + * some additional information. + */ +message Operation { + optional FrameworkID framework_id = 1 [(gogoproto.customname) = "FrameworkID"]; + optional AgentID agent_id = 2 [(gogoproto.customname) = "AgentID"]; + required Offer.Operation info = 3 [(gogoproto.nullable) = false]; + required OperationStatus latest_status = 4 [(gogoproto.nullable) = false]; + + // All the statuses known to this operation. Some of the statuses in this + // list might not have been acknowledged yet. The statuses are ordered. + repeated OperationStatus statuses = 5 [(gogoproto.nullable) = false]; + + // This is the internal UUID for the operation, which is kept independently + // from the framework-specified operation ID, which is optional. + required UUID uuid = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "UUID"]; +} + + +/** + * Describes possible operation states. + */ +enum OperationState { + // Default value if the enum is not set. See MESOS-4997. + OPERATION_UNSUPPORTED = 0; + + // Initial state. + OPERATION_PENDING = 1; + + // TERMINAL: The operation was successfully applied. + OPERATION_FINISHED = 2; + + // TERMINAL: The operation failed to apply. + OPERATION_FAILED = 3; + + // TERMINAL: The operation description contains an error. + OPERATION_ERROR = 4; + + // TERMINAL: The operation was dropped due to a transient error. + OPERATION_DROPPED = 5; +} + + +/** + * Describes the current status of an operation. + */ +message OperationStatus { + optional OperationID operation_id = 1 [(gogoproto.customname) = "OperationID"]; + required OperationState state = 2 [(gogoproto.nullable) = false]; + optional string message = 3; + + // Converted resources after applying the operation. This only + // applies if the `state` is `OPERATION_FINISHED`. + repeated Resource converted_resources = 4 [(gogoproto.nullable) = false]; + + // Statuses that are delivered reliably to the scheduler will + // include a `uuid`. The status is considered delivered once + // it is acknowledged by the scheduler. + optional UUID uuid = 5 [(gogoproto.customname) = "UUID"]; +} + + +/** +* Describes the status of a check. Type and the corresponding field, i.e., +* `command` or `http` must be set. If the result of the check is not available +* (e.g., the check timed out), these fields must contain empty messages, i.e., +* `exit_code` or `status_code` will be unset. +* +* NOTE: This API is unstable and the related feature is experimental. +*/ +message CheckStatusInfo { + message Command { + // Exit code of a command check. It is the result of calling + // `WEXITSTATUS()` on `waitpid()` termination information on + // Posix and calling `GetExitCodeProcess()` on Windows. + optional int32 exit_code = 1; + } + + message Http { + // HTTP status code of an HTTP check. + optional uint32 status_code = 1; + } + + message Tcp { + // Whether a TCP connection succeeded. + optional bool succeeded = 1; + } + + // TODO(alexr): Consider adding a `data` field, which can contain, e.g., + // truncated stdout/stderr output for command checks or HTTP response body + // for HTTP checks. Alternatively, it can be an even shorter `message` field + // containing the last line of stdout or Reason-Phrase of the status line of + // the HTTP response. + + // The type of the check this status corresponds to. + optional CheckInfo.Type type = 1; + + // Status of a command check. + optional Command command = 2; + + // Status of an HTTP check. + optional Http http = 3 [(gogoproto.customname) = "HTTP"]; + + // Status of a TCP check. + optional Tcp tcp = 4 [(gogoproto.customname) = "TCP"]; + + // TODO(alexr): Consider introducing a "last changed at" timestamp, since + // task status update's timestamp may not correspond to the last check's + // state, e.g., for reconciliation. + + // TODO(alexr): Consider introducing a `reason` enum here to explicitly + // distinguish between completed, delayed, and timed out checks. +} + + +/** + * Describes the current status of a task. + */ +message TaskStatus { + // Describes the source of the task status update. + enum Source { + SOURCE_MASTER = 0; + SOURCE_AGENT = 1; + SOURCE_EXECUTOR = 2; + } + + // Detailed reason for the task status update. + // Refer to docs/task-state-reasons.md for additional explanation. + enum Reason { + // TODO(jieyu): The default value when a caller doesn't check for + // presence is 0 and so ideally the 0 reason is not a valid one. + // Since this is not used anywhere, consider removing this reason. + REASON_COMMAND_EXECUTOR_FAILED = 0; + + REASON_CONTAINER_LAUNCH_FAILED = 21; + REASON_CONTAINER_LIMITATION = 19; + REASON_CONTAINER_LIMITATION_DISK = 20; + REASON_CONTAINER_LIMITATION_MEMORY = 8; + REASON_CONTAINER_PREEMPTED = 17; + REASON_CONTAINER_UPDATE_FAILED = 22; + REASON_EXECUTOR_REGISTRATION_TIMEOUT = 23; + REASON_EXECUTOR_REREGISTRATION_TIMEOUT = 24; + REASON_EXECUTOR_TERMINATED = 1; + REASON_EXECUTOR_UNREGISTERED = 2; // No longer used. + REASON_FRAMEWORK_REMOVED = 3; + REASON_GC_ERROR = 4; + REASON_INVALID_FRAMEWORKID = 5; + REASON_INVALID_OFFERS = 6; + REASON_IO_SWITCHBOARD_EXITED = 27; + REASON_MASTER_DISCONNECTED = 7; + REASON_RECONCILIATION = 9; + REASON_RESOURCES_UNKNOWN = 18; + REASON_AGENT_DISCONNECTED = 10; + REASON_AGENT_REMOVED = 11; + REASON_AGENT_REMOVED_BY_OPERATOR = 31; + REASON_AGENT_REREGISTERED = 32; + REASON_AGENT_RESTARTED = 12; + REASON_AGENT_UNKNOWN = 13; + REASON_TASK_KILLED_DURING_LAUNCH = 30; + REASON_TASK_CHECK_STATUS_UPDATED = 28; + REASON_TASK_HEALTH_CHECK_STATUS_UPDATED = 29; + REASON_TASK_GROUP_INVALID = 25; + REASON_TASK_GROUP_UNAUTHORIZED = 26; + REASON_TASK_INVALID = 14; + REASON_TASK_UNAUTHORIZED = 15; + REASON_TASK_UNKNOWN = 16; + } + + required TaskID task_id = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "TaskID"]; + required TaskState state = 2; + optional string message = 4; // Possible message explaining state. + optional Source source = 9; + optional Reason reason = 10; + optional bytes data = 3; + optional AgentID agent_id = 5 [(gogoproto.customname) = "AgentID"]; + optional ExecutorID executor_id = 7 [(gogoproto.customname) = "ExecutorID"]; // TODO(benh): Use in master/agent. + optional double timestamp = 6; + + // Statuses that are delivered reliably to the scheduler will + // include a 'uuid'. The status is considered delivered once + // it is acknowledged by the scheduler. Schedulers can choose + // to either explicitly acknowledge statuses or let the scheduler + // driver implicitly acknowledge (default). + // + // TODO(bmahler): This is currently overwritten in the scheduler + // driver and executor driver, but executors will need to set this + // to a valid RFC-4122 UUID if using the HTTP API. + optional bytes uuid = 11 [(gogoproto.customname) = "UUID"]; + + // Describes whether the task has been determined to be healthy (true) or + // unhealthy (false) according to the `health_check` field in `TaskInfo`. + optional bool healthy = 8; + + // Contains check status for the check specified in the corresponding + // `TaskInfo`. If no check has been specified, this field must be + // absent, otherwise it must be present even if the check status is + // not available yet. If the status update is triggered for a different + // reason than `REASON_TASK_CHECK_STATUS_UPDATED`, this field will contain + // the last known value. + // + // NOTE: A check-related task status update is triggered if and only if + // the value or presence of any field in `CheckStatusInfo` changes. + // + // NOTE: Check support in built-in executors is experimental. + optional CheckStatusInfo check_status = 15; + + // Labels are free-form key value pairs which are exposed through + // master and agent endpoints. Labels will not be interpreted or + // acted upon by Mesos itself. As opposed to the data field, labels + // will be kept in memory on master and agent processes. Therefore, + // labels should be used to tag TaskStatus message with light-weight + // meta-data. Labels should not contain duplicate key-value pairs. + optional Labels labels = 12; + + // Container related information that is resolved dynamically such as + // network address. + optional ContainerStatus container_status = 13; + + // The time (according to the master's clock) when the agent where + // this task was running became unreachable. This is only set on + // status updates for tasks running on agents that are unreachable + // (e.g., partitioned away from the master). + optional TimeInfo unreachable_time = 14; + + // If the reason field indicates a container resource limitation, + // this field optionally contains additional information. + optional TaskResourceLimitation limitation = 16; +} + + +/** + * Describes possible filters that can be applied to unused resources + * (see SchedulerDriver::launchTasks) to influence the allocator. + */ +message Filters { + // Time to consider unused resources refused. Note that all unused + // resources will be considered refused and use the default value + // (below) regardless of whether Filters was passed to + // SchedulerDriver::launchTasks. You MUST pass Filters with this + // field set to change this behavior (i.e., get another offer which + // includes unused resources sooner or later than the default). + // + // If this field is set to a number of seconds greater than 31536000 + // (365 days), then the resources will be considered refused for 365 + // days. If it is set to a negative number, then the default value + // will be used. + optional double refuse_seconds = 1 [default = 5.0]; +} + + +/** +* Describes a collection of environment variables. This is used with +* CommandInfo in order to set environment variables before running a +* command. The contents of each variable may be specified as a string +* or a Secret; only one of `value` and `secret` must be set. +*/ +message Environment { + message Variable { + required string name = 1 [(gogoproto.nullable) = false]; + + enum Type { + UNKNOWN = 0; + VALUE = 1; + SECRET = 2; + option (gogoproto.goproto_enum_prefix) = true; + } + + // In Mesos 1.2, the `Environment.variables.value` message was made + // optional. The default type for `Environment.variables.type` is now VALUE, + // which requires `value` to be set, maintaining backward compatibility. + // + // TODO(greggomann): The default can be removed in Mesos 2.1 (MESOS-7134). + optional Type type = 3 [default = VALUE]; + + // Only one of `value` and `secret` must be set. + optional string value = 2; + optional Secret secret = 4; + } + + repeated Variable variables = 1 [(gogoproto.nullable) = false]; +} + + +/** + * A generic (key, value) pair used in various places for parameters. + */ +message Parameter { + required string key = 1 [(gogoproto.nullable) = false]; + required string value = 2 [(gogoproto.nullable) = false]; +} + + +/** + * Collection of Parameter. + */ +message Parameters { + repeated Parameter parameter = 1 [(gogoproto.nullable) = false]; +} + + +/** + * Credential used in various places for authentication and + * authorization. + * + * NOTE: A 'principal' is different from 'FrameworkInfo.user'. The + * former is used for authentication and authorization while the + * latter is used to determine the default user under which the + * framework's executors/tasks are run. + */ +message Credential { + required string principal = 1 [(gogoproto.nullable) = false]; + optional string secret = 2; +} + + +/** + * Credentials used for framework authentication, HTTP authentication + * (where the common 'username' and 'password' are captured as + * 'principal' and 'secret' respectively), etc. + */ +message Credentials { + repeated Credential credentials = 1 [(gogoproto.nullable) = false]; +} + + +/** + * Secret used to pass privileged information. It is designed to provide + * pass-by-value or pass-by-reference semantics, where the REFERENCE type can be + * used by custom modules which interact with a secure back-end. + */ +message Secret +{ + enum Type { + UNKNOWN = 0; + REFERENCE = 1; + VALUE = 2; + option (gogoproto.goproto_enum_prefix) = true; + } + + // Can be used by modules to refer to a secret stored in a secure back-end. + // The `key` field is provided to permit reference to a single value within a + // secret containing arbitrary key-value pairs. + // + // For example, given a back-end secret store with a secret named + // "my-secret" containing the following key-value pairs: + // + // { + // "username": "my-user", + // "password": "my-password + // } + // + // the username could be referred to in a `Secret` by specifying + // "my-secret" for the `name` and "username" for the `key`. + message Reference + { + required string name = 1 [(gogoproto.nullable) = false]; + optional string key = 2; + } + + // Used to pass the value of a secret. + message Value + { + required bytes data = 1; + } + + optional Type type = 1 [(gogoproto.nullable) = false]; + + // Only one of `reference` and `value` must be set. + optional Reference reference = 2; + optional Value value = 3; +} + + +/** + * Rate (queries per second, QPS) limit for messages from a framework to master. + * Strictly speaking they are the combined rate from all frameworks of the same + * principal. + */ +message RateLimit { + // Leaving QPS unset gives it unlimited rate (i.e., not throttled), + // which also implies unlimited capacity. + optional double qps = 1 [(gogoproto.customname) = "QPS"]; + + // Principal of framework(s) to be throttled. Should match + // FrameworkInfo.principal and Credential.principal (if using authentication). + required string principal = 2 [(gogoproto.nullable) = false]; + + // Max number of outstanding messages from frameworks of this principal + // allowed by master before the next message is dropped and an error is sent + // back to the sender. Messages received before the capacity is reached are + // still going to be processed after the error is sent. + // If unspecified, this principal is assigned unlimited capacity. + // NOTE: This value is ignored if 'qps' is not set. + optional uint64 capacity = 3; +} + + +/** + * Collection of RateLimit. + * Frameworks without rate limits defined here are not throttled unless + * 'aggregate_default_qps' is specified. + */ +message RateLimits { + // Items should have unique principals. + repeated RateLimit limits = 1 [(gogoproto.nullable) = false]; + + // All the frameworks not specified in 'limits' get this default rate. + // This rate is an aggregate rate for all of them, i.e., their combined + // traffic is throttled together at this rate. + optional double aggregate_default_qps = 2 [(gogoproto.customname) = "AggregateDefaultQPS"]; + + // All the frameworks not specified in 'limits' get this default capacity. + // This is an aggregate value similar to 'aggregate_default_qps'. + optional uint64 aggregate_default_capacity = 3; +} + + +/** + * Describe an image used by tasks or executors. Note that it's only + * for tasks or executors launched by MesosContainerizer currently. + */ +message Image { + enum Type { + APPC = 1; + DOCKER = 2; + option (gogoproto.goproto_enum_prefix) = true; + } + + // Protobuf for specifying an Appc container image. See: + // https://github.com/appc/spec/blob/master/spec/aci.md + message Appc { + // The name of the image. + required string name = 1 [(gogoproto.nullable) = false]; + + // An image ID is a string of the format "hash-value", where + // "hash" is the hash algorithm used and "value" is the hex + // encoded string of the digest. Currently the only permitted + // hash algorithm is sha512. + optional string id = 2 [(gogoproto.customname) = "ID"]; + + // Optional labels. Suggested labels: "version", "os", and "arch". + optional Labels labels = 3; + } + + message Docker { + // The name of the image. Expected format: + // [REGISTRY_HOST[:REGISTRY_PORT]/]REPOSITORY[:TAG|@TYPE:DIGEST] + // + // See: https://docs.docker.com/reference/commandline/pull/ + required string name = 1 [(gogoproto.nullable) = false]; + + // Credential to authenticate with docker registry. + // NOTE: This is not encrypted, therefore framework and operators + // should enable SSL when passing this information. + // + // This field has never been used in Mesos before and is + // deprecated since Mesos 1.3. Please use `config` below + // (see MESOS-7088 for details). + optional Credential credential = 2 [deprecated = true]; // Since 1.3. + + // Docker config containing credentails to authenticate with + // docker registry. The secret is expected to be a docker + // config file in JSON format with UTF-8 character encoding. + optional Secret config = 3; + } + + required Type type = 1; + + // Only one of the following image messages should be set to match + // the type. + optional Appc appc = 2; + optional Docker docker = 3; + + // With this flag set to false, the mesos containerizer will pull + // the docker/appc image from the registry even if the image is + // already downloaded on the agent. + optional bool cached = 4 [default = true]; +} + + +/** + * Describes how the mount will be propagated for a volume. See the + * following doc for more details about mount propagation: + * https://www.kernel.org/doc/Documentation/filesystems/sharedsubtree.txt + */ +message MountPropagation { + enum Mode { + UNKNOWN = 0; + + // The volume in a container will receive new mounts from the host + // or other containers, but filesystems mounted inside the + // container won't be propagated to the host or other containers. + // This is currently the default behavior for all volumes. + HOST_TO_CONTAINER = 1; + + // The volume in a container will receive new mounts from the host + // or other containers, and its own mounts will be propagated from + // the container to the host or other containers. + BIDIRECTIONAL = 2; + + option (gogoproto.goproto_enum_prefix) = true; + } + + optional Mode mode = 1; +} + + +/** + * Describes a volume mapping either from host to container or vice + * versa. Both paths can either refer to a directory or a file. + */ +message Volume { + enum Mode { + RW = 1; // read-write. + RO = 2; // read-only. + } + + // TODO(gyliu513): Make this as `optional` after deprecation cycle of 1.0. + required Mode mode = 3; + + // Path pointing to a directory or file in the container. If the + // path is a relative path, it is relative to the container work + // directory. If the path is an absolute path, that path must + // already exist. + required string container_path = 1 [(gogoproto.nullable) = false]; + + // The following specifies the source of this volume. At most one of + // the following should be set. + + // Absolute path pointing to a directory or file on the host or a + // path relative to the container work directory. + optional string host_path = 2; + + // The source of the volume is an Image which describes a root + // filesystem which will be provisioned by Mesos. + optional Image image = 4; + + // Describes where a volume originates from. + message Source { + enum Type { + // This must be the first enum value in this list, to + // ensure that if 'type' is not set, the default value + // is UNKNOWN. This enables enum values to be added + // in a backwards-compatible way. See: MESOS-4997. + UNKNOWN = 0; + + // TODO(gyliu513): Add IMAGE as volume source type. + DOCKER_VOLUME = 1; + HOST_PATH = 4; + SANDBOX_PATH = 2; + SECRET = 3; + + option (gogoproto.goproto_enum_prefix) = true; + } + + message DockerVolume { + // Driver of the volume, it can be flocker, convoy, raxrey etc. + optional string driver = 1; + + // Name of the volume. + required string name = 2 [(gogoproto.nullable) = false]; + + // Volume driver specific options. + optional Parameters driver_options = 3; + } + + // Absolute path pointing to a directory or file on the host. + message HostPath { + required string path = 1 [(gogoproto.nullable) = false]; + optional MountPropagation mount_propagation = 2; + } + + // Describe a path from a container's sandbox. The container can + // be the current container (SELF), or its parent container + // (PARENT). PARENT allows all child containers to share a volume + // from their parent container's sandbox. It'll be an error if + // the current container is a top level container. + message SandboxPath { + enum Type { + UNKNOWN = 0; + SELF = 1; + PARENT = 2; + option (gogoproto.goproto_enum_prefix) = true; + } + + optional Type type = 1 [(gogoproto.nullable) = false]; + + // A path relative to the corresponding container's sandbox. + // Note that upwards traversal (i.e. ../../abc) is not allowed. + required string path = 2 [(gogoproto.nullable) = false]; + } + + // Enum fields should be optional, see: MESOS-4997. + optional Type type = 1 [(gogoproto.nullable) = false]; + + // The following specifies the source of this volume. At most one of + // the following should be set. + + // The source of the volume created by docker volume driver. + optional DockerVolume docker_volume = 2; + + optional HostPath host_path = 5; + optional SandboxPath sandbox_path = 3; + + // The volume/secret isolator uses the secret-fetcher module (third-party or + // internal) downloads the secret and makes it available at container_path. + optional Secret secret = 4; + } + + optional Source source = 5; +} + + +/** + * Describes a network request from a framework as well as network resolution + * provided by Mesos. + * + * A framework may request the network isolator on the Agent to isolate the + * container in a network namespace and create a virtual network interface. + * The `NetworkInfo` message describes the properties of that virtual + * interface, including the IP addresses and network isolation policy + * (network group membership). + * + * The NetworkInfo message is not interpreted by the Master or Agent and is + * intended to be used by Agent and Master modules implementing network + * isolation. If the modules are missing, the message is simply ignored. In + * future, the task launch will fail if there is no module providing the + * network isolation capabilities (MESOS-3390). + * + * An executor, Agent, or an Agent module may append NetworkInfos inside + * TaskStatus::container_status to provide information such as the container IP + * address and isolation groups. + */ +message NetworkInfo { + enum Protocol { + IPv4 = 1; + IPv6 = 2; + } + + // Specifies a request for an IP address, or reports the assigned container + // IP address. + // + // Users can request an automatically assigned IP (for example, via an + // IPAM service) or a specific IP by adding a NetworkInfo to the + // ContainerInfo for a task. On a request, specifying neither `protocol` + // nor `ip_address` means that any available address may be assigned. + message IPAddress { + // Specify IP address requirement. Set protocol to the desired value to + // request the network isolator on the Agent to assign an IP address to the + // container being launched. If a specific IP address is specified in + // ip_address, this field should not be set. + optional Protocol protocol = 1 [default = IPv4]; + + // Statically assigned IP provided by the Framework. This IP will be + // assigned to the container by the network isolator module on the Agent. + // This field should not be used with the protocol field above. + // + // If an explicit address is requested but is unavailable, the network + // isolator should fail the task. + optional string ip_address = 2 [(gogoproto.customname) = "IPAddress"]; + } + + // When included in a ContainerInfo, each of these represent a + // request for an IP address. Each request can specify an explicit address + // or the IP protocol to use. + // + // When included in a TaskStatus message, these inform the framework + // scheduler about the IP addresses that are bound to the container + // interface. When there are no custom network isolator modules installed, + // this field is filled in automatically with the Agent IP address. + repeated IPAddress ip_addresses = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "IPAddresses"]; + + // Name of the network which will be used by network isolator to determine + // the network that the container joins. It's up to the network isolator + // to decide how to interpret this field. + optional string name = 6; + + // A group is the name given to a set of logically-related interfaces that + // are allowed to communicate among themselves. Network traffic is allowed + // between two container interfaces that share at least one network group. + // For example, one might want to create separate groups for isolating dev, + // testing, qa and prod deployment environments. + repeated string groups = 3; + + // To tag certain metadata to be used by Isolator/IPAM, e.g., rack, etc. + optional Labels labels = 4; + + // Specifies a port mapping request for the task on this network. + message PortMapping { + required uint32 host_port = 1 [(gogoproto.nullable) = false]; + required uint32 container_port = 2 [(gogoproto.nullable) = false]; + // Protocol to expose as (ie: tcp, udp). + optional string protocol = 3; + } + + repeated PortMapping port_mappings = 7 [(gogoproto.nullable) = false]; +}; + + +/** + * Encapsulation of `Capabilities` supported by Linux. + * Reference: http://linux.die.net/man/7/capabilities. + */ +message CapabilityInfo { + // We start the actual values at an offset(1000) because Protobuf 2 + // uses the first value as the default one. Separating the default + // value from the real first value helps to disambiguate them. This + // is especially valuable for backward compatibility. + // See: MESOS-4997. + enum Capability { + UNKNOWN = 0; + CHOWN = 1000; + DAC_OVERRIDE = 1001; + DAC_READ_SEARCH = 1002; + FOWNER = 1003; + FSETID = 1004; + KILL = 1005; + SETGID = 1006; + SETUID = 1007; + SETPCAP = 1008; + LINUX_IMMUTABLE = 1009; + NET_BIND_SERVICE = 1010; + NET_BROADCAST = 1011; + NET_ADMIN = 1012; + NET_RAW = 1013; + IPC_LOCK = 1014; + IPC_OWNER = 1015; + SYS_MODULE = 1016; + SYS_RAWIO = 1017; + SYS_CHROOT = 1018; + SYS_PTRACE = 1019; + SYS_PACCT = 1020; + SYS_ADMIN = 1021; + SYS_BOOT = 1022; + SYS_NICE = 1023; + SYS_RESOURCE = 1024; + SYS_TIME = 1025; + SYS_TTY_CONFIG = 1026; + MKNOD = 1027; + LEASE = 1028; + AUDIT_WRITE = 1029; + AUDIT_CONTROL = 1030; + SETFCAP = 1031; + MAC_OVERRIDE = 1032; + MAC_ADMIN = 1033; + SYSLOG = 1034; + WAKE_ALARM = 1035; + BLOCK_SUSPEND = 1036; + AUDIT_READ = 1037; + option (gogoproto.goproto_enum_prefix) = true; + } + + repeated Capability capabilities = 1; +} + + +/** + * Encapsulation for Linux specific configuration. + * E.g, capabilities, limits etc. + */ +message LinuxInfo { + // Since 1.4.0, deprecated in favor of `effective_capabilities`. + optional CapabilityInfo capability_info = 1 [deprecated = true]; + + // The set of capabilities that are allowed but not initially + // granted to tasks. + optional CapabilityInfo bounding_capabilities = 2; + + // Represents the set of capabilities that the task will + // be executed with. + optional CapabilityInfo effective_capabilities = 3; + + // If set as 'true', the container shares the pid namespace with + // its parent. If the container is a top level container, it will + // share the pid namespace with the agent. If the container is a + // nested container, it will share the pid namespace with its + // parent container. This field will be ignored if 'namespaces/pid' + // isolator is not enabled. + optional bool share_pid_namespace = 4 [(gogoproto.customname) = "SharePIDNamespace"]; +} + + +/** +* Encapsulation for POSIX rlimits, see +* http://pubs.opengroup.org/onlinepubs/009695399/functions/getrlimit.html. +* Note that some types might only be defined for Linux. +* We use a custom prefix to avoid conflict with existing system macros +* (e.g., `RLIMIT_CPU` or `NOFILE`). +*/ +message RLimitInfo { + message RLimit { + enum Type { + UNKNOWN = 0; + RLMT_AS = 1; + RLMT_CORE = 2; + RLMT_CPU = 3; + RLMT_DATA = 4; + RLMT_FSIZE = 5; + RLMT_LOCKS = 6; + RLMT_MEMLOCK = 7; + RLMT_MSGQUEUE = 8; + RLMT_NICE = 9; + RLMT_NOFILE = 10; + RLMT_NPROC = 11; + RLMT_RSS = 12; + RLMT_RTPRIO = 13; + RLMT_RTTIME = 14; + RLMT_SIGPENDING = 15; + RLMT_STACK = 16; + option (gogoproto.goproto_enum_prefix) = true; + } + optional Type type = 1 [(gogoproto.nullable) = false]; + + // Either both are set or both are not set. + // If both are not set, it represents unlimited. + // If both are set, we require `soft` <= `hard`. + optional uint64 hard = 2; + optional uint64 soft = 3; + } + + repeated RLimit rlimits = 1 [(gogoproto.nullable) = false]; +} + + +/** + * Describes the information about (pseudo) TTY that can + * be attached to a process running in a container. + */ +message TTYInfo { + message WindowSize { + required uint32 rows = 1 [(gogoproto.nullable) = false]; + required uint32 columns = 2 [(gogoproto.nullable) = false]; + } + + optional WindowSize window_size = 1; +} + + +/** + * Describes a container configuration and allows extensible + * configurations for different container implementations. + * + * NOTE: `ContainerInfo` may be specified, e.g., by a task, even if no + * container image is provided. In this case neither `MesosInfo` nor + * `DockerInfo` is set, the required `type` must be `MESOS`. This is to + * address a case when a task without an image, e.g., a shell script + * with URIs, wants to use features originally designed for containers, + * for example custom network isolation via `NetworkInfo`. + */ +message ContainerInfo { + // All container implementation types. + enum Type { + DOCKER = 1; + MESOS = 2; + option (gogoproto.goproto_enum_prefix) = true; + } + + message DockerInfo { + // The docker image that is going to be passed to the registry. + required string image = 1 [(gogoproto.nullable) = false]; + + // Network options. + enum Network { + HOST = 1; + BRIDGE = 2; + NONE = 3; + USER = 4; + option (gogoproto.goproto_enum_prefix) = true; + } + + optional Network network = 2 [default = HOST]; + + message PortMapping { + required uint32 host_port = 1 [(gogoproto.nullable) = false]; + required uint32 container_port = 2 [(gogoproto.nullable) = false]; + // Protocol to expose as (ie: tcp, udp). + optional string protocol = 3; + } + + repeated PortMapping port_mappings = 3 [(gogoproto.nullable) = false]; + + optional bool privileged = 4 [default = false]; + + // Allowing arbitrary parameters to be passed to docker CLI. + // Note that anything passed to this field is not guaranteed + // to be supported moving forward, as we might move away from + // the docker CLI. + repeated Parameter parameters = 5 [(gogoproto.nullable) = false]; + + // With this flag set to true, the docker containerizer will + // pull the docker image from the registry even if the image + // is already downloaded on the agent. + optional bool force_pull_image = 6; + + // The name of volume driver plugin. + optional string volume_driver = 7 [deprecated = true]; // Since 1.0 + } + + message MesosInfo { + optional Image image = 1; + } + + required Type type = 1; + repeated Volume volumes = 2 [(gogoproto.nullable) = false]; + optional string hostname = 4; + + // Only one of the following *Info messages should be set to match + // the type. + optional DockerInfo docker = 3; + optional MesosInfo mesos = 5; + + // A list of network requests. A framework can request multiple IP addresses + // for the container. + repeated NetworkInfo network_infos = 7 [(gogoproto.nullable) = false]; + + // Linux specific information for the container. + optional LinuxInfo linux_info = 8; + + // (POSIX only) rlimits of the container. + optional RLimitInfo rlimit_info = 9; + + // If specified a tty will be attached to the container entrypoint. + optional TTYInfo tty_info = 10 [(gogoproto.customname) = "TTYInfo"]; +} + + +/** + * Container related information that is resolved during container + * setup. The information is sent back to the framework as part of the + * TaskStatus message. + */ +message ContainerStatus { + optional ContainerID container_id = 4 [(gogoproto.customname) = "ContainerID"]; + + // This field can be reliably used to identify the container IP address. + repeated NetworkInfo network_infos = 1 [(gogoproto.nullable) = false]; + + // Information about Linux control group (cgroup). + optional CgroupInfo cgroup_info = 2; + + // Information about Executor PID. + optional uint32 executor_pid = 3 [(gogoproto.customname) = "ExecutorPID"]; +} + + +/** + * Linux control group (cgroup) information. + */ +message CgroupInfo { + // Configuration of a blkio cgroup subsystem. + message Blkio { + enum Operation { + UNKNOWN = 0; + TOTAL = 1; + READ = 2; + WRITE = 3; + SYNC = 4; + ASYNC = 5; + option (gogoproto.goproto_enum_prefix) = true; + } + + // Describes a stat value without the device descriptor part. + message Value { + optional Operation op = 1; // Required. + optional uint64 value = 2; // Required. + } + + message CFQ { + message Statistics { + // Stats are grouped by block devices. If `device` is not + // set, it represents `Total`. + optional Device.Number device = 1; + // blkio.sectors + optional uint64 sectors = 2; + // blkio.time + optional uint64 time = 3; + // blkio.io_serviced + repeated Value io_serviced = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "IOServiced"]; + // blkio.io_service_bytes + repeated Value io_service_bytes = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "IOServiceBytes"]; + // blkio.io_service_time + repeated Value io_service_time = 6 [(gogoproto.nullable) = false, (gogoproto.customname) = "IOServiceTime"]; + // blkio.io_wait_time + repeated Value io_wait_time = 7 [(gogoproto.nullable) = false, (gogoproto.customname) = "IOWaitTime"]; + // blkio.io_merged + repeated Value io_merged = 8 [(gogoproto.nullable) = false, (gogoproto.customname) = "IOMerged"]; + // blkio.io_queued + repeated Value io_queued = 9 [(gogoproto.nullable) = false, (gogoproto.customname) = "IOQueued"]; + } + + // TODO(jasonlai): Add fields for blkio weight and weight + // device. + } + + message Throttling { + message Statistics { + // Stats are grouped by block devices. If `device` is not + // set, it represents `Total`. + optional Device.Number device = 1; + // blkio.throttle.io_serviced + repeated Value io_serviced = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "IOServiced"]; + // blkio.throttle.io_service_bytes + repeated Value io_service_bytes = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "IOServiceBytes"]; + } + + // TODO(jasonlai): Add fields for blkio.throttle.*_device. + } + + message Statistics { + repeated CFQ.Statistics cfq = 1 [(gogoproto.nullable) = false, (gogoproto.customname) = "CFQ"]; + repeated CFQ.Statistics cfq_recursive = 2 [(gogoproto.nullable) = false, (gogoproto.customname) = "CFQRecursive"]; + repeated Throttling.Statistics throttling = 3; + } + } + + // Configuration of a net_cls cgroup subsystem. + message NetCls { + // The 32-bit classid consists of two parts, a 16 bit major handle + // and a 16-bit minor handle. The major and minor handle are + // represented using the format 0xAAAABBBB, where 0xAAAA is the + // 16-bit major handle and 0xBBBB is the 16-bit minor handle. + optional uint32 classid = 1 [(gogoproto.customname) = "ClassID"]; + } + + optional NetCls net_cls = 1 [(gogoproto.customname) = "NetCLS"]; +} + + +/** + * Collection of labels. Labels should not contain duplicate key-value + * pairs. + */ +message Labels { + repeated Label labels = 1 [(gogoproto.nullable) = false]; +} + + +/** + * Key, value pair used to store free form user-data. + */ +message Label { + required string key = 1 [(gogoproto.nullable) = false]; + optional string value = 2; +} + + +/** + * Named port used for service discovery. + */ +message Port { + // Port number on which the framework exposes a service. + required uint32 number = 1 [(gogoproto.nullable) = false]; + + // Name of the service hosted on this port. + optional string name = 2; + + // Layer 4-7 protocol on which the framework exposes its services. + optional string protocol = 3; + + // This field restricts discovery within a framework (FRAMEWORK), + // within a Mesos cluster (CLUSTER), or places no restrictions (EXTERNAL). + // The visibility setting for a Port overrides the general visibility setting + // in the DiscoveryInfo. + optional DiscoveryInfo.Visibility visibility = 4; + + // This can be used to decorate the message with metadata to be + // interpreted by external applications such as firewalls. + optional Labels labels = 5; +} + + +/** + * Collection of ports. + */ +message Ports { + repeated Port ports = 1 [(gogoproto.nullable) = false]; +} + + +/** +* Service discovery information. +* The visibility field restricts discovery within a framework (FRAMEWORK), +* within a Mesos cluster (CLUSTER), or places no restrictions (EXTERNAL). +* Each port in the ports field also has an optional visibility field. +* If visibility is specified for a port, it overrides the default service-wide +* DiscoveryInfo.visibility for that port. +* The environment, location, and version fields provide first class support for +* common attributes used to differentiate between similar services. The +* environment may receive values such as PROD/QA/DEV, the location field may +* receive values like EAST-US/WEST-US/EUROPE/AMEA, and the version field may +* receive values like v2.0/v0.9. The exact use of these fields is up to each +* service discovery system. +*/ +message DiscoveryInfo { + enum Visibility { + FRAMEWORK = 0; + CLUSTER = 1; + EXTERNAL = 2; + } + + required Visibility visibility = 1 [(gogoproto.nullable) = false]; + optional string name = 2; + optional string environment = 3; + optional string location = 4; + optional string version = 5; + optional Ports ports = 6; + optional Labels labels = 7; +} + + +/** + * Named WeightInfo to indicate resource allocation + * priority between the different roles. + */ +message WeightInfo { + required double weight = 1 [(gogoproto.nullable) = false]; + + // Related role name. + optional string role = 2; +} + + +/** + * Version information of a component. + */ +message VersionInfo { + required string version = 1 [(gogoproto.nullable) = false]; + optional string build_date = 2; + optional double build_time = 3; + optional string build_user = 4; + optional string git_sha = 5 [(gogoproto.customname) = "GitSHA"]; + optional string git_branch = 6; + optional string git_tag = 7; +} + + +/** + * Flag consists of a name and optionally its value. + */ +message Flag { + required string name = 1 [(gogoproto.nullable) = false]; + optional string value = 2; +} + + +/** + * Describes a Role. Roles can be used to specify that certain resources are + * reserved for the use of one or more frameworks. + */ +message Role { + required string name = 1 [(gogoproto.nullable) = false]; + required double weight = 2 [(gogoproto.nullable) = false]; + repeated FrameworkID frameworks = 3 [(gogoproto.nullable) = false]; + repeated Resource resources = 4 [(gogoproto.nullable) = false]; +} + + +/** + * Metric consists of a name and optionally its value. + */ +message Metric { + required string name = 1 [(gogoproto.nullable) = false]; + optional double value = 2; +} + + +/** + * Describes a File. + */ +message FileInfo { + // Absolute path to the file. + required string path = 1 [(gogoproto.nullable) = false]; + + // Number of hard links. + optional int32 nlink = 2; + + // Total size in bytes. + optional uint64 size = 3; + + // Last modification time. + optional TimeInfo mtime = 4; + + // Represents a file's mode and permission bits. The bits have the same + // definition on all systems and is portable. + optional uint32 mode = 5; + + // User ID of owner. + optional string uid = 6 [(gogoproto.customname) = "UID"]; + + // Group ID of owner. + optional string gid = 7 [(gogoproto.customname) = "GID"]; +} + + +/** + * Describes information abount a device. + */ +message Device { + message Number { + required uint64 major_number = 1; + required uint64 minor_number = 2; + } + + optional string path = 1; + optional Number number = 2; +} + + +/** + * Describes a device whitelist entry that expose from host to container. + */ +message DeviceAccess { + message Access { + optional bool read = 1; + optional bool write = 2; + optional bool mknod = 3; + } + required Device device = 1 [(gogoproto.nullable) = false]; + required Access access = 2 [(gogoproto.nullable) = false]; +} + + +message DeviceWhitelist { + repeated DeviceAccess allowed_devices = 1 [(gogoproto.nullable) = false]; +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/ranges.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/ranges.go new file mode 100644 index 00000000..d391e157 --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/ranges.go @@ -0,0 +1,253 @@ +package mesos + +import ( + "sort" +) + +// Ranges represents a list of Ranges. +type Ranges []Value_Range + +// NewRanges returns squashed Ranges from the given numbers. +func NewRanges(ns ...uint64) Ranges { + xs := append(uint64s{}, ns...) + sort.Sort(xs) + rs := make(Ranges, len(xs)) + for i := range xs { + rs[i].Begin, rs[i].End = xs[i], xs[i] + } + return rs.Squash() +} + +// NewPortRanges returns Ranges from the "ports" resource in the +// given *Offer. If that resource isn't provided, nil will be returned. +// +// The returned Ranges are sorted and have all overlapping ranges merged from +// left to right. e.g. [[0, 5], [4, 3], [10, 7]] -> [[0, 5], [7, 10]] +func NewPortRanges(o *Offer) Ranges { + if o == nil { + return Ranges{} + } + + var ( + r Resource + found bool + ) + for i := range o.Resources { + if o.Resources[i].GetName() == "ports" { + r = o.Resources[i] + found = true + break + } + } + + if !found { + return Ranges{} + } + + offered := r.GetRanges().GetRange() + rs := make(Ranges, len(offered)) + for i, r := range offered { + if lo, hi := r.GetBegin(), r.GetEnd(); lo <= hi { + rs[i].Begin, rs[i].End = lo, hi + } else { + rs[i].Begin, rs[i].End = hi, lo + } + } + return rs.Sort().Squash() +} + +// These three methods implement sort.Interface +func (rs Ranges) Len() int { return len(rs) } +func (rs Ranges) Swap(i, j int) { rs[i], rs[j] = rs[j], rs[i] } +func (rs Ranges) Less(i, j int) bool { + return rs[i].Begin < rs[j].Begin || (rs[i].Begin == rs[j].Begin && rs[i].End < rs[j].End) +} + +// Size returns the sum of the Size of all Ranges. +func (rs Ranges) Size() uint64 { + var sz uint64 + for i := range rs { + sz += 1 + (rs[i].End - rs[i].Begin) + } + return sz +} + +// Sort sorts the receiving Ranges and returns the result; convenience +func (rs Ranges) Sort() Ranges { + sort.Sort(rs) + return rs +} + +// Squash merges overlapping and continuous Ranges. It assumes they're pre-sorted. +func (rs Ranges) Squash() Ranges { + if len(rs) < 2 { + return rs + } + squashed := Ranges{rs[0]} + for i := 1; i < len(rs); i++ { + switch max := squashed[len(squashed)-1].End; { + case 1+max < rs[i].Begin: // no overlap nor continuity: push + squashed = append(squashed, rs[i]) + case max <= rs[i].End: // overlap or continuity: squash + squashed[len(squashed)-1].End = rs[i].End + } + } + return squashed +} + +// Search performs a binary search for n returning the index of the Range it was +// found at or -1 if not found. +func (rs Ranges) Search(n uint64) int { + for lo, hi := 0, len(rs)-1; lo <= hi; { + switch m := lo + (hi-lo)/2; { + case n < rs[m].Begin: + hi = m - 1 + case n > rs[m].End: + lo = m + 1 + default: + return m + } + } + return -1 +} + +// Partition partitions Ranges around n. It returns the partitioned Ranges +// and a boolean indicating if n was found. +func (rs Ranges) Partition(n uint64) (Ranges, bool) { + i := rs.Search(n) + if i < 0 { + return rs, false + } + + pn := make(Ranges, 0, len(rs)+1) + switch pn = append(pn, rs[:i]...); { + case rs[i].Begin == rs[i].End: // delete + case rs[i].Begin == n: // increment lower bound + pn = append(pn, Value_Range{rs[i].Begin + 1, rs[i].End}) + case rs[i].End == n: // decrement upper bound + pn = append(pn, Value_Range{rs[i].Begin, rs[i].End - 1}) + default: // split + pn = append(pn, Value_Range{rs[i].Begin, n - 1}, Value_Range{n + 1, rs[i].End}) + } + return append(pn, rs[i+1:]...), true +} + +// Remove removes a range from already coalesced ranges. +// The algorithms constructs a new vector of ranges which is then +// Squash'ed into a Ranges instance. +func (rs Ranges) Remove(removal Value_Range) Ranges { + ranges := make([]Value_Range, 0, len(rs)) + for _, r := range rs { + // skip if the entire range is subsumed by removal + if r.Begin >= removal.Begin && r.End <= removal.End { + continue + } + // divide if the range subsumes the removal + if r.Begin < removal.Begin && r.End > removal.End { + ranges = append(ranges, + Value_Range{r.Begin, removal.Begin - 1}, + Value_Range{removal.End + 1, r.End}, + ) + continue + } + // add the full range if there's no intersection + if r.End < removal.Begin || r.Begin > removal.End { + ranges = append(ranges, r) + continue + } + // trim if the range does intersect + if r.End > removal.End { + ranges = append(ranges, Value_Range{removal.End + 1, r.End}) + } else { + if r.Begin >= removal.Begin { + // should never happen + panic("r.Begin >= removal.Begin") + } + ranges = append(ranges, Value_Range{r.Begin, removal.Begin - 1}) + } + } + return Ranges(ranges).Squash() +} + +// Compare assumes that both Ranges are already in sort-order. +// Returns 0 if rs and right are equivalent, -1 if rs is a subset of right, or else 1 +func (rs Ranges) Compare(right Ranges) int { + x, y, result := rs.equiv(right) + if result { + return 0 + } + for _, a := range x { + // make sure that this range is a subset of a range in y + matched := false + for _, b := range y { + if a.Begin >= b.Begin && a.End <= b.End { + matched = true + break + } + } + if !matched { + return 1 + } + } + return -1 +} + +// Equivalent assumes that both Ranges are already in sort-order. +func (rs Ranges) Equivalent(right Ranges) (result bool) { + _, _, result = rs.equiv(right) + return +} + +// Equivalent assumes that both Ranges are already in sort-order. +func (rs Ranges) equiv(right Ranges) (_, _ Ranges, _ bool) { + // we need to squash rs and right but don't want to change the originals + switch len(rs) { + case 0: + case 1: + rs = Ranges{rs[0]} + default: + rs = Ranges(append([]Value_Range{rs[0], rs[1]}, rs[2:]...)).Sort().Squash() + } + switch len(right) { + case 0: + case 1: + right = Ranges{right[0]} + default: + right = Ranges(append([]Value_Range{right[0], right[1]}, right[2:]...)).Sort().Squash() + } + return rs, right, (&Value_Ranges{Range: rs}).Equal(&Value_Ranges{Range: right}) +} + +func (rs Ranges) Clone() Ranges { + if len(rs) == 0 { + return nil + } + x := make(Ranges, len(rs)) + copy(x, rs) + return x +} + +// Min returns the minimum number in Ranges. It will panic on empty Ranges. +func (rs Ranges) Min() uint64 { return rs[0].Begin } + +// Max returns the maximum number in Ranges. It will panic on empty Ranges. +func (rs Ranges) Max() uint64 { return rs[len(rs)-1].End } + +// resource returns a *Resource with the given name and Ranges. +func (rs Ranges) resource(name string) Resource { + vr := make([]Value_Range, len(rs)) + copy(vr, rs) + return Resource{ + Name: name, + Type: RANGES.Enum(), + Ranges: &Value_Ranges{Range: vr}, + } +} + +// uint64s is an utility used to sort a slice of uint64s +type uint64s []uint64 + +// These three methods implement sort.Interface +func (ns uint64s) Len() int { return len(ns) } +func (ns uint64s) Less(i, j int) bool { return ns[i] < ns[j] } +func (ns uint64s) Swap(i, j int) { ns[i], ns[j] = ns[j], ns[i] } diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/recordio/doc.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/recordio/doc.go new file mode 100644 index 00000000..bc5b095c --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/recordio/doc.go @@ -0,0 +1,5 @@ +// Package recordio implements the Mesos variant of RecordIO framing, whereby +// each record is prefixed by a line that indicates the length of the record in +// decimal ASCII. The bytes of the record immediately follow the length-line. +// Zero-length records are allowed. +package recordio diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/recordio/reader.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/recordio/reader.go new file mode 100644 index 00000000..b8d034e8 --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/recordio/reader.go @@ -0,0 +1,145 @@ +package recordio + +import ( + "bufio" + "bytes" + "io" + + logger "github.com/mesos/mesos-go/api/v1/lib/debug" + "github.com/mesos/mesos-go/api/v1/lib/encoding/framing" +) + +const debug = logger.Logger(false) + +type ( + Opt func(*reader) + + reader struct { + *bufio.Scanner + pend int + splitf func(data []byte, atEOF bool) (int, []byte, error) + maxf int // max frame size + } +) + +// NewReader returns a reader that parses frames from a recordio stream. +func NewReader(read io.Reader, opt ...Opt) framing.Reader { + debug.Log("new frame reader") + r := &reader{Scanner: bufio.NewScanner(read)} + r.Split(func(data []byte, atEOF bool) (int, []byte, error) { + // Scanner panics if we invoke Split after scanning has started, + // use this proxy func as a work-around. + return r.splitf(data, atEOF) + }) + buf := make([]byte, 16*1024) + r.Buffer(buf, 1<<22) // 1<<22 == max protobuf size + r.splitf = r.splitSize + // apply options + for _, f := range opt { + if f != nil { + f(r) + } + } + return r +} + +// MaxMessageSize returns a functional option that configures the internal Scanner's buffer and max token (message) +// length, in bytes. +func MaxMessageSize(max int) Opt { + return func(r *reader) { + buf := make([]byte, max>>1) + r.Buffer(buf, max) + r.maxf = max + } +} + +func (r *reader) splitSize(data []byte, atEOF bool) (int, []byte, error) { + const maxTokenLength = 20 // textual length of largest uint64 number + if atEOF { + x := len(data) + switch { + case x == 0: + debug.Log("EOF and empty frame, returning io.EOF") + return 0, nil, io.EOF + case x < 2: // min frame size + debug.Log("remaining data less than min total frame length") + return 0, nil, framing.ErrorUnderrun + } + // otherwise, we may have a valid frame... + } + debug.Log("len(data)=", len(data)) + adv := 0 + for { + i := 0 + for ; i < maxTokenLength && i < len(data) && data[i] != '\n'; i++ { + } + debug.Log("i=", i) + if i == len(data) { + debug.Log("need more input") + return 0, nil, nil // need more input + } + if i == maxTokenLength && data[i] != '\n' { + debug.Log("frame size: max token length exceeded") + return 0, nil, framing.ErrorBadSize + } + n, err := ParseUintBytes(bytes.TrimSpace(data[:i]), 10, 64) + if err != nil { + debug.Log("failed to parse frame size field:", err) + return 0, nil, framing.ErrorBadSize + } + if r.maxf != 0 && int(n) > r.maxf { + debug.Log("frame size max length exceeded:", n) + return 0, nil, framing.ErrorOversizedFrame + } + if n == 0 { + // special case... don't invoke splitData, just parse the next size header + adv += i + 1 + data = data[i+1:] + continue + } + r.pend = int(n) + r.splitf = r.splitFrame + debug.Logf("split next frame: %d, %d", n, adv+i+1) + return adv + i + 1, data[:0], nil // returning a nil token screws up the Scanner, so return empty + } +} + +func (r *reader) splitFrame(data []byte, atEOF bool) (advance int, token []byte, err error) { + x := len(data) + debug.Log("splitFrame:x=", x, ",eof=", atEOF) + if atEOF { + if x < r.pend { + return 0, nil, framing.ErrorUnderrun + } + } + if r.pend == 0 { + panic("asked to read frame data, but no data left in frame") + } + if x < int(r.pend) { + // need more data + return 0, nil, nil + } + r.splitf = r.splitSize + adv := int(r.pend) + r.pend = 0 + return adv, data[:adv], nil +} + +// ReadFrame implements framing.Reader +func (r *reader) ReadFrame() (tok []byte, err error) { + for r.Scan() { + b := r.Bytes() + if len(b) == 0 { + continue + } + tok = b + debug.Log("len(tok)", len(tok)) + break + } + // either scan failed, or it succeeded and we have a token... + err = r.Err() + if err == nil && len(tok) == 0 { + err = io.EOF + } + return +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/recordio/strconv.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/recordio/strconv.go new file mode 100644 index 00000000..6e2b2681 --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/recordio/strconv.go @@ -0,0 +1,117 @@ +/* +Copyright 2013 The Camlistore Authors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package recordio + +import ( + "errors" + "strconv" +) + +// ParseUintBytes is like strconv.ParseUint, but using a []byte. +func ParseUintBytes(s []byte, base int, bitSize int) (n uint64, err error) { + var cutoff, maxVal uint64 + + if bitSize == 0 { + bitSize = int(strconv.IntSize) + } + + s0 := s + switch { + case len(s) < 1: + err = strconv.ErrSyntax + goto Error + + case 2 <= base && base <= 36: + // valid base; nothing to do + + case base == 0: + // Look for octal, hex prefix. + switch { + case s[0] == '0' && len(s) > 1 && (s[1] == 'x' || s[1] == 'X'): + base = 16 + s = s[2:] + if len(s) < 1 { + err = strconv.ErrSyntax + goto Error + } + case s[0] == '0': + base = 8 + default: + base = 10 + } + + default: + err = errors.New("invalid base " + strconv.Itoa(base)) + goto Error + } + + n = 0 + cutoff = cutoff64(base) + maxVal = 1<= base { + n = 0 + err = strconv.ErrSyntax + goto Error + } + + if n >= cutoff { + // n*base overflows + n = 1<<64 - 1 + err = strconv.ErrRange + goto Error + } + n *= uint64(base) + + n1 := n + uint64(v) + if n1 < n || n1 > maxVal { + // n+v overflows + n = 1<<64 - 1 + err = strconv.ErrRange + goto Error + } + n = n1 + } + + return n, nil + +Error: + return n, &strconv.NumError{Func: "ParseUint", Num: string(s0), Err: err} +} + +// Return the first number n such that n*base >= 1<<64. +func cutoff64(base int) uint64 { + if base < 2 { + return 0 + } + return (1<<64-1)/uint64(base) + 1 +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/recordio/writer.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/recordio/writer.go new file mode 100644 index 00000000..085f967d --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/recordio/writer.go @@ -0,0 +1,34 @@ +package recordio + +import ( + "io" + "strconv" +) + +var lf = []byte{'\n'} + +type Writer struct { + out io.Writer +} + +func NewWriter(out io.Writer) *Writer { + return &Writer{out} +} + +func (w *Writer) writeBuffer(b []byte, err error) error { + if err != nil { + return err + } + n, err := w.out.Write(b) + if err == nil && n != len(b) { + return io.ErrShortWrite + } + return err +} + +func (w *Writer) WriteFrame(b []byte) (err error) { + err = w.writeBuffer(([]byte)(strconv.Itoa(len(b))), err) + err = w.writeBuffer(lf, err) + err = w.writeBuffer(b, err) + return +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/resources.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/resources.go new file mode 100644 index 00000000..2c348030 --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/resources.go @@ -0,0 +1,1145 @@ +package mesos + +import ( + "bytes" + "fmt" + "strconv" + + "github.com/gogo/protobuf/proto" + "github.com/mesos/mesos-go/api/v1/lib/roles" +) + +const DefaultRole = "*" + +type ( + Resources []Resource + resourceErrorType int + + resourceError struct { + errorType resourceErrorType + reason string + spec Resource + } +) + +const ( + resourceErrorTypeIllegalName resourceErrorType = iota + resourceErrorTypeIllegalType + resourceErrorTypeUnsupportedType + resourceErrorTypeIllegalScalar + resourceErrorTypeIllegalRanges + resourceErrorTypeIllegalSet + resourceErrorTypeIllegalDisk + resourceErrorTypeIllegalReservation + resourceErrorTypeIllegalShare + + noReason = "" // make error generation code more readable +) + +var ( + resourceErrorMessages = map[resourceErrorType]string{ + resourceErrorTypeIllegalName: "missing or illegal resource name", + resourceErrorTypeIllegalType: "missing or illegal resource type", + resourceErrorTypeUnsupportedType: "unsupported resource type", + resourceErrorTypeIllegalScalar: "illegal scalar resource", + resourceErrorTypeIllegalRanges: "illegal ranges resource", + resourceErrorTypeIllegalSet: "illegal set resource", + resourceErrorTypeIllegalDisk: "illegal disk resource", + resourceErrorTypeIllegalReservation: "illegal resource reservation", + resourceErrorTypeIllegalShare: "illegal shared resource", + } +) + +func (t resourceErrorType) Generate(reason string) error { + msg := resourceErrorMessages[t] + if reason != noReason { + if msg != "" { + msg += ": " + reason + } else { + msg = reason + } + } + return &resourceError{errorType: t, reason: msg} +} + +func (err *resourceError) Reason() string { return err.reason } +func (err *resourceError) Resource() Resource { return err.spec } +func (err *resourceError) WithResource(r Resource) { err.spec = r } + +func (err *resourceError) Error() string { + // TODO(jdef) include additional context here? (type, resource) + if err.reason != "" { + return "resource error: " + err.reason + } + return "resource error" +} + +func IsResourceError(err error) (ok bool) { + _, ok = err.(*resourceError) + return +} + +func (r *Resource_ReservationInfo) Assign() func(interface{}) { + return func(v interface{}) { + type reserver interface { + WithReservation(*Resource_ReservationInfo) + } + if ri, ok := v.(reserver); ok { + ri.WithReservation(r) + } + } +} + +func (resources Resources) Clone() Resources { + if resources == nil { + return nil + } + clone := make(Resources, 0, len(resources)) + for i := range resources { + rr := proto.Clone(&resources[i]).(*Resource) + clone = append(clone, *rr) + } + return clone +} + +// Minus calculates and returns the result of `resources - that` without modifying either +// the receiving `resources` or `that`. +func (resources Resources) Minus(that ...Resource) Resources { + x := resources.Clone() + return x.Subtract(that...) +} + +// Subtract subtracts `that` from the receiving `resources` and returns the result (the modified +// `resources` receiver). +func (resources *Resources) Subtract(that ...Resource) (rs Resources) { + if resources != nil { + if len(that) > 0 { + x := make(Resources, len(that)) + copy(x, that) + that = x + + for i := range that { + resources.Subtract1(that[i]) + } + } + rs = *resources + } + return +} + +// Plus calculates and returns the result of `resources + that` without modifying either +// the receiving `resources` or `that`. +func (resources Resources) Plus(that ...Resource) Resources { + x := resources.Clone() + return x.Add(that...) +} + +// Add adds `that` to the receiving `resources` and returns the result (the modified +// `resources` receiver). +func (resources *Resources) Add(that ...Resource) (rs Resources) { + if resources != nil { + rs = *resources + } + for i := range that { + rs = rs._add(that[i]) + } + if resources != nil { + *resources = rs + } + return +} + +// Add1 adds `that` to the receiving `resources` and returns the result (the modified +// `resources` receiver). +func (resources *Resources) Add1(that Resource) (rs Resources) { + if resources != nil { + rs = *resources + } + rs = rs._add(that) + if resources != nil { + *resources = rs + } + return +} + +func (resources Resources) _add(that Resource) Resources { + if that.Validate() != nil || that.IsEmpty() { + return resources + } + for i := range resources { + r := &resources[i] + if r.Addable(that) { + r.Add(that) + return resources + } + } + // cannot be combined with an existing resource + r := proto.Clone(&that).(*Resource) + return append(resources, *r) +} + +// Minus1 calculates and returns the result of `resources - that` without modifying either +// the receiving `resources` or `that`. +func (resources *Resources) Minus1(that Resource) Resources { + x := resources.Clone() + return x.Subtract1(that) +} + +// Subtract1 subtracts `that` from the receiving `resources` and returns the result (the modified +// `resources` receiver). +func (resources *Resources) Subtract1(that Resource) Resources { + if resources == nil { + return nil + } + if that.Validate() == nil && !that.IsEmpty() { + for i := range *resources { + r := &(*resources)[i] + if r.Subtractable(that) { + r.Subtract(that) + // remove the resource if it becomes invalid or zero. + // need to do validation in order to strip negative scalar + // resource objects. + if r.Validate() != nil || r.IsEmpty() { + // delete resource at i, without leaking an uncollectable Resource + // a, a[len(a)-1] = append(a[:i], a[i+1:]...), nil + (*resources), (*resources)[len((*resources))-1] = append((*resources)[:i], (*resources)[i+1:]...), Resource{} + } + break + } + } + } + return *resources +} + +// String returns a human-friendly representation of the resource collection using default formatting +// options (e.g. allocation-info is not rendered). For additional control over resource formatting see +// the Format func. +func (resources Resources) String() string { + return resources.Format() +} + +type ResourcesFormatOptions struct { + ShowAllocated bool // ShowAllocated when true will not display resource allocation info +} + +func (resources Resources) Format(options ...func(*ResourcesFormatOptions)) string { + if len(resources) == 0 { + return "" + } + var f ResourcesFormatOptions + for _, o := range options { + if o != nil { + o(&f) + } + } + // TODO(jdef) use a string.Builder once we can rely on a more modern golang version + buf := bytes.Buffer{} + for i := range resources { + if i > 0 { + buf.WriteString(";") + } + r := &resources[i] + buf.WriteString(r.Name) + if r.AllocationInfo != nil && f.ShowAllocated { + buf.WriteString("(allocated: ") + buf.WriteString(r.AllocationInfo.GetRole()) + buf.WriteString(")") + } + if res := r.Reservations; len(res) > 0 || (r.Role != nil && *r.Role != "*") { + if len(res) == 0 { + res = make([]Resource_ReservationInfo, 0, 1) + if r.Reservation == nil { + res = append(res, Resource_ReservationInfo{ + Type: Resource_ReservationInfo_STATIC.Enum(), + Role: r.Role, + }) + } else { + res = append(res, *r.Reservation) // copy! + res[0].Type = Resource_ReservationInfo_DYNAMIC.Enum() + res[0].Role = r.Role + } + } + buf.WriteString("(reservations: [") + for j := range res { + if j > 0 { + buf.WriteString(",") + } + rr := &res[j] + buf.WriteString("(") + buf.WriteString(rr.GetType().String()) + buf.WriteString(",") + buf.WriteString(rr.GetRole()) + if rr.Principal != nil { + buf.WriteString(",") + buf.WriteString(*rr.Principal) + } + if rr.Labels != nil { + buf.WriteString(",{") + rr.GetLabels().writeTo(&buf) + buf.WriteString("}") + } + buf.WriteString(")") + } + buf.WriteString("])") + } + if d := r.GetDisk(); d != nil { + buf.WriteString("[") + if s := d.GetSource(); s != nil { + switch s.GetType() { + case Resource_DiskInfo_Source_BLOCK: + buf.WriteString("BLOCK") + if id, profile := s.GetID(), s.GetProfile(); id != "" || profile != "" { + buf.WriteByte('(') + buf.WriteString(id) + buf.WriteByte(',') + buf.WriteString(profile) + buf.WriteByte(')') + } + case Resource_DiskInfo_Source_RAW: + buf.WriteString("RAW") + if id, profile := s.GetID(), s.GetProfile(); id != "" || profile != "" { + buf.WriteByte('(') + buf.WriteString(id) + buf.WriteByte(',') + buf.WriteString(profile) + buf.WriteByte(')') + } + case Resource_DiskInfo_Source_PATH: + buf.WriteString("PATH") + if id, profile := s.GetID(), s.GetProfile(); id != "" || profile != "" { + buf.WriteByte('(') + buf.WriteString(id) + buf.WriteByte(',') + buf.WriteString(profile) + buf.WriteByte(')') + } else if root := s.GetPath().GetRoot(); root != "" { + buf.WriteByte(':') + buf.WriteString(root) + } + case Resource_DiskInfo_Source_MOUNT: + buf.WriteString("MOUNT") + if id, profile := s.GetID(), s.GetProfile(); id != "" || profile != "" { + buf.WriteByte('(') + buf.WriteString(id) + buf.WriteByte(',') + buf.WriteString(profile) + buf.WriteByte(')') + } else if root := s.GetMount().GetRoot(); root != "" { + buf.WriteByte(':') + buf.WriteString(root) + } + } + } + if p := d.GetPersistence(); p != nil { + if d.GetSource() != nil { + buf.WriteString(",") + } + buf.WriteString(p.GetID()) + } + if v := d.GetVolume(); v != nil { + buf.WriteString(":") + vconfig := v.GetContainerPath() + if h := v.GetHostPath(); h != "" { + vconfig = h + ":" + vconfig + } + if m := v.Mode; m != nil { + switch *m { + case RO: + vconfig += ":ro" + case RW: + vconfig += ":rw" + default: + panic("unrecognized volume mode: " + m.String()) + } + } + buf.WriteString(vconfig) + } + buf.WriteString("]") + } + if r.Revocable != nil { + buf.WriteString("{REV}") + } + if r.Shared != nil { + buf.WriteString("") + } + buf.WriteString(":") + switch r.GetType() { + case SCALAR: + buf.WriteString(strconv.FormatFloat(r.GetScalar().GetValue(), 'f', -1, 64)) + case RANGES: + buf.WriteString("[") + ranges := Ranges(r.GetRanges().GetRange()) + for j := range ranges { + if j > 0 { + buf.WriteString(",") + } + if b, e := ranges[j].Begin, ranges[j].End; b == e { + buf.WriteString(strconv.FormatUint(b, 10)) + } else { + buf.WriteString(strconv.FormatUint(b, 10)) + buf.WriteString("-") + buf.WriteString(strconv.FormatUint(e, 10)) + } + } + buf.WriteString("]") + case SET: + buf.WriteString("{") + items := r.GetSet().GetItem() + for j := range items { + if j > 0 { + buf.WriteString(",") + } + buf.WriteString(items[j]) + } + buf.WriteString("}") + } + } + return buf.String() +} + +func (left *Resource) Validate() error { + if left.GetName() == "" { + return resourceErrorTypeIllegalName.Generate(noReason) + } + if _, ok := Value_Type_name[int32(left.GetType())]; !ok { + return resourceErrorTypeIllegalType.Generate(noReason) + } + switch left.GetType() { + case SCALAR: + if s := left.GetScalar(); s == nil || left.GetRanges() != nil || left.GetSet() != nil { + return resourceErrorTypeIllegalScalar.Generate(noReason) + } else if s.GetValue() < 0 { + return resourceErrorTypeIllegalScalar.Generate("value < 0") + } + case RANGES: + r := left.GetRanges() + if left.GetScalar() != nil || r == nil || left.GetSet() != nil { + return resourceErrorTypeIllegalRanges.Generate(noReason) + } + for i, rr := range r.GetRange() { + // ensure that ranges are not inverted + if rr.Begin > rr.End { + return resourceErrorTypeIllegalRanges.Generate("begin > end") + } + // ensure that ranges don't overlap (but not necessarily squashed) + for j := i + 1; j < len(r.GetRange()); j++ { + r2 := r.GetRange()[j] + if rr.Begin <= r2.Begin && r2.Begin <= rr.End { + return resourceErrorTypeIllegalRanges.Generate("overlapping ranges") + } + } + } + case SET: + s := left.GetSet() + if left.GetScalar() != nil || left.GetRanges() != nil || s == nil { + return resourceErrorTypeIllegalSet.Generate(noReason) + } + unique := make(map[string]struct{}, len(s.GetItem())) + for _, x := range s.GetItem() { + if _, found := unique[x]; found { + return resourceErrorTypeIllegalSet.Generate("duplicated elements") + } + unique[x] = struct{}{} + } + default: + return resourceErrorTypeUnsupportedType.Generate(noReason) + } + + // check for disk resource + if disk := left.GetDisk(); disk != nil { + if left.GetName() != "disk" { + return resourceErrorTypeIllegalDisk.Generate("DiskInfo should not be set for \"" + left.GetName() + "\" resource") + } + if s := disk.GetSource(); s != nil { + switch s.GetType() { + case Resource_DiskInfo_Source_PATH, + Resource_DiskInfo_Source_MOUNT: + // these only contain optional members + case Resource_DiskInfo_Source_BLOCK, + Resource_DiskInfo_Source_RAW: + // TODO(jdef): update w/ validation once the format of BLOCK and RAW + // disks is known. + case Resource_DiskInfo_Source_UNKNOWN: + return resourceErrorTypeIllegalDisk.Generate(fmt.Sprintf("unsupported DiskInfo.Source.Type in %q", s)) + } + } + } + + if rs := left.GetReservations(); len(rs) == 0 { + // check for "pre-reservation-refinement" format + if _, err := roles.Parse(left.GetRole()); err != nil { + return resourceErrorTypeIllegalReservation.Generate(err.Error()) + } + + if r := left.GetReservation(); r != nil { + if r.Type != nil { + return resourceErrorTypeIllegalReservation.Generate( + "Resource.ReservationInfo.type must not be set for the Resource.reservation field") + } + if r.Role != nil { + return resourceErrorTypeIllegalReservation.Generate( + "Resource.ReservationInfo.role must not be set for the Resource.reservation field") + } + // check for invalid state of (role,reservation) pair + if left.GetRole() == "*" { + return resourceErrorTypeIllegalReservation.Generate("default role cannot be dynamically reserved") + } + } + } else { + // check for "post-reservation-refinement" format + for i := range rs { + r := &rs[i] + if r.Type == nil { + return resourceErrorTypeIllegalReservation.Generate( + "Resource.ReservationInfo.type must be set") + } + if r.Role == nil { + return resourceErrorTypeIllegalReservation.Generate( + "Resource.ReservationInfo.role must be set") + } + if _, err := roles.Parse(r.GetRole()); err != nil { + return resourceErrorTypeIllegalReservation.Generate(err.Error()) + } + if r.GetRole() == "*" { + return resourceErrorTypeIllegalReservation.Generate( + "role '*' cannot be reserved") + } + } + // check that reservations are correctly refined + ancestor := rs[0].GetRole() + for i := 1; i < len(rs); i++ { + r := &rs[i] + if r.GetType() == Resource_ReservationInfo_STATIC { + return resourceErrorTypeIllegalReservation.Generate( + "a refined reservation cannot be STATIC") + } + child := r.GetRole() + if !roles.IsStrictSubroleOf(child, ancestor) { + return resourceErrorTypeIllegalReservation.Generate(fmt.Sprintf( + "role %q is not a refinement of %q", child, ancestor)) + } + } + + // Additionally, we allow the "pre-reservation-refinement" format to be set + // as long as there is only one reservation, and the `Resource.role` and + // `Resource.reservation` fields are consistent with the reservation. + if len(rs) == 1 { + if r := left.Role; r != nil && *r != rs[0].GetRole() { + return resourceErrorTypeIllegalReservation.Generate(fmt.Sprintf( + "'Resource.role' field with %q does not match the role %q in 'Resource.reservations'", + *r, rs[0].GetRole())) + } + + switch rs[0].GetType() { + case Resource_ReservationInfo_STATIC: + if left.Reservation != nil { + return resourceErrorTypeIllegalReservation.Generate( + "'Resource.reservation' must not be set if the single reservation in 'Resource.reservations' is STATIC") + } + case Resource_ReservationInfo_DYNAMIC: + if (left.Role == nil) != (left.GetReservation() == nil) { + return resourceErrorTypeIllegalReservation.Generate( + "'Resource.role' and 'Resource.reservation' must both be set or both not be set if the single reservation in 'Resource.reservations' is DYNAMIC") + } + if r := left.GetReservation(); r != nil && r.GetPrincipal() != rs[0].GetPrincipal() { + return resourceErrorTypeIllegalReservation.Generate(fmt.Sprintf( + "'Resource.reservation.principal' with %q does not match the principal %q in 'Resource.reservations'", + r.GetPrincipal(), rs[0].GetPrincipal())) + } + if r := left.GetReservation(); r != nil && !r.GetLabels().Equivalent(rs[0].GetLabels()) { + return resourceErrorTypeIllegalReservation.Generate(fmt.Sprintf( + "'Resource.reservation.labels' with %q does not match the labels %q in 'Resource.reservations'", + r.GetLabels(), rs[0].GetLabels())) + } + case Resource_ReservationInfo_UNKNOWN: + return resourceErrorTypeIllegalReservation.Generate("Unsupported 'Resource.ReservationInfo.type'") + } + } else { + if r := left.Role; r != nil { + return resourceErrorTypeIllegalReservation.Generate( + "'Resource.role' must not be set if there is more than one reservation in 'Resource.reservations'") + } + if r := left.GetReservation(); r != nil { + return resourceErrorTypeIllegalReservation.Generate( + "'Resource.reservation' must not be set if there is more than one reservation in 'Resource.reservations'") + } + } + } + + // Check that shareability is enabled for supported resource types. + // For now, it is for persistent volumes only. + // NOTE: We need to modify this once we extend shareability to other + // resource types. + if s := left.GetShared(); s != nil { + if left.GetName() != "disk" { + return resourceErrorTypeIllegalShare.Generate(fmt.Sprintf( + "Resource %q cannot be shared", left.GetName())) + } + if p := left.GetDisk().GetPersistence(); p == nil { + return resourceErrorTypeIllegalShare.Generate("only persistent volumes can be shared") + } + } + + return nil +} + +func (left *Resource_AllocationInfo) Equivalent(right *Resource_AllocationInfo) bool { + if (left == nil) != (right == nil) { + return false + } else if left == nil { + return true + } + if (left.Role == nil) != (right.Role == nil) { + return false + } + if left.Role != nil && *left.Role != *right.Role { + return false + } + return true +} + +func (r *Resource_ReservationInfo) Equivalent(right *Resource_ReservationInfo) bool { + // TODO(jdef) should we consider equivalency of both pre- and post-refinement formats, + // such that a pre-refinement format could be the equivalent of a post-refinement format + // if defined just the right way? + if (r == nil) != (right == nil) { + return false + } else if r == nil { + return true + } + if (r.Type == nil) != (right.Type == nil) { + return false + } + if r.Type != nil && *r.Type != *right.Type { + return false + } + if (r.Role == nil) != (right.Role == nil) { + return false + } + if r.Role != nil && *r.Role != *right.Role { + return false + } + if (r.Principal == nil) != (right.Principal == nil) { + return false + } + if r.Principal != nil && *r.Principal != *right.Principal { + return false + } + return r.Labels.Equivalent(right.Labels) +} + +func (left *Resource_DiskInfo) Equivalent(right *Resource_DiskInfo) bool { + // NOTE: We ignore 'volume' inside DiskInfo when doing comparison + // because it describes how this resource will be used which has + // nothing to do with the Resource object itself. A framework can + // use this resource and specify different 'volume' every time it + // uses it. + // see https://github.com/apache/mesos/blob/0.25.0/src/common/resources.cpp#L67 + if (left == nil) != (right == nil) { + return false + } + + if a, b := left.GetSource(), right.GetSource(); (a == nil) != (b == nil) { + return false + } else if a != nil { + if a.GetType() != b.GetType() { + return false + } + if aa, bb := a.GetMount(), b.GetMount(); (aa == nil) != (bb == nil) { + return false + } else if aa.GetRoot() != bb.GetRoot() { + return false + } + if aa, bb := a.GetPath(), b.GetPath(); (aa == nil) != (bb == nil) { + return false + } else if aa.GetRoot() != bb.GetRoot() { + return false + } + if aa, bb := a.GetID(), b.GetID(); aa != bb { + return false + } + if aa, bb := a.GetProfile(), b.GetProfile(); aa != bb { + return false + } + if aa, bb := a.GetMetadata(), b.GetMetadata(); (aa == nil) != (bb == nil) { + return false + } else if !labelList(aa.GetLabels()).Equivalent(labelList(bb.GetLabels())) { + return false + } + } + + if a, b := left.GetPersistence(), right.GetPersistence(); (a == nil) != (b == nil) { + return false + } else if a != nil { + return a.GetID() == b.GetID() + } + + return true +} + +// Equivalent returns true if right is equivalent to left (differs from Equal in that +// deeply nested values are test for equivalence, not equality). +func (left *Resource) Equivalent(right Resource) bool { + if left == nil { + return right.IsEmpty() + } + if left.GetName() != right.GetName() || + left.GetType() != right.GetType() || + left.GetRole() != right.GetRole() { + return false + } + if a, b := left.GetAllocationInfo(), right.GetAllocationInfo(); !a.Equivalent(b) { + return false + } + if a, b := left.GetReservations(), right.GetReservations(); len(a) != len(b) { + return false + } else { + for i := range a { + ri := &a[i] + if !ri.Equivalent(&b[i]) { + return false + } + } + } + if !left.GetReservation().Equivalent(right.GetReservation()) { + return false + } + if !left.GetDisk().Equivalent(right.GetDisk()) { + return false + } + if (left.Revocable == nil) != (right.Revocable == nil) { + return false + } + if a, b := left.ProviderID, right.ProviderID; (a == nil) != (b == nil) { + return false + } else if a != nil && a.Value != b.Value { + return false + } + if a, b := left.Shared, right.Shared; (a == nil) != (b == nil) { + return false + } + + switch left.GetType() { + case SCALAR: + return left.GetScalar().Compare(right.GetScalar()) == 0 + case RANGES: + return Ranges(left.GetRanges().GetRange()).Equivalent(right.GetRanges().GetRange()) + case SET: + return left.GetSet().Compare(right.GetSet()) == 0 + default: + return false + } +} + +// Addable tests if we can add two Resource objects together resulting in one +// valid Resource object. For example, two Resource objects with +// different name, type or role are not addable. +func (left *Resource) Addable(right Resource) bool { + if left == nil { + return true + } + if left.GetName() != right.GetName() || + left.GetType() != right.GetType() || + left.GetRole() != right.GetRole() { + return false + } + + if a, b := left.GetShared(), right.GetShared(); (a == nil) != (b == nil) { + // shared has no fields + return false + } + + if a, b := left.GetAllocationInfo(), right.GetAllocationInfo(); !a.Equivalent(b) { + return false + } + + if !left.GetReservation().Equivalent(right.GetReservation()) { + return false + } + + if a, b := left.Reservations, right.Reservations; len(a) != len(b) { + return false + } else { + for i := range a { + aa := &a[i] + if !aa.Equivalent(&b[i]) { + return false + } + } + } + + if !left.GetDisk().Equivalent(right.GetDisk()) { + return false + } + + if ls := left.GetDisk().GetSource(); ls != nil { + switch ls.GetType() { + case Resource_DiskInfo_Source_PATH: + // Two PATH resources can be added if their disks are identical + case Resource_DiskInfo_Source_BLOCK, + Resource_DiskInfo_Source_MOUNT: + // Two resources that represent exclusive 'MOUNT' or 'RAW' disks + // cannot be added together; this would defeat the exclusivity. + return false + case Resource_DiskInfo_Source_RAW: + // We can only add resources representing 'RAW' disks if + // they have no identity or are identical. + if ls.GetID() != "" { + return false + } + case Resource_DiskInfo_Source_UNKNOWN: + panic("unreachable") + } + } + + // from apache/mesos: src/common/resources.cpp + // TODO(jieyu): Even if two Resource objects with DiskInfo have the + // same persistence ID, they cannot be added together. In fact, this + // shouldn't happen if we do not add resources from different + // namespaces (e.g., across slave). Consider adding a warning. + if left.GetDisk().GetPersistence() != nil { + return false + } + if (left.GetRevocable() == nil) != (right.GetRevocable() == nil) { + return false + } + if a, b := left.GetProviderID(), right.GetProviderID(); (a == nil) != (b == nil) { + return false + } else if a != nil && a.Value != b.Value { + return false + } + return true +} + +// Subtractable tests if we can subtract "right" from "left" resulting in one +// valid Resource object. For example, two Resource objects with different +// name, type or role are not subtractable. +// NOTE: Set subtraction is always well defined, it does not require +// 'right' to be contained within 'left'. For example, assuming that +// "left = {1, 2}" and "right = {2, 3}", "left" and "right" are +// subtractable because "left - right = {1}". However, "left" does not +// contain "right". +func (left *Resource) Subtractable(right Resource) bool { + if left.GetName() != right.GetName() || + left.GetType() != right.GetType() || + left.GetRole() != right.GetRole() { + return false + } + if a, b := left.GetShared(), right.GetShared(); (a == nil) != (b == nil) { + // shared has no fields + return false + } + + if a, b := left.GetAllocationInfo(), right.GetAllocationInfo(); !a.Equivalent(b) { + return false + } + + if !left.GetReservation().Equivalent(right.GetReservation()) { + return false + } + if a, b := left.Reservations, right.Reservations; len(a) != len(b) { + return false + } else { + for i := range a { + aa := &a[i] + if !aa.Equivalent(&b[i]) { + return false + } + } + } + + if !left.GetDisk().Equivalent(right.GetDisk()) { + return false + } + + if ls := left.GetDisk().GetSource(); ls != nil { + switch ls.GetType() { + case Resource_DiskInfo_Source_PATH: + // Two PATH resources can be subtracted if their disks are identical + case Resource_DiskInfo_Source_BLOCK, + Resource_DiskInfo_Source_MOUNT: + // Two resources that represent exclusive 'MOUNT' or 'RAW' disks + // cannot be substracted from each other if they are not the same; + // this would defeat the exclusivity. + if !left.Equivalent(right) { + return false + } + case Resource_DiskInfo_Source_RAW: + // We can only add resources representing 'RAW' disks if + // they have no identity or refer to the same disk. + if ls.GetID() != "" && !left.Equivalent(right) { + return false + } + case Resource_DiskInfo_Source_UNKNOWN: + panic("unreachable") + } + } + + // NOTE: For Resource objects that have DiskInfo, we can only do + // subtraction if they are **equal**. + if left.GetDisk().GetPersistence() != nil && !left.Equivalent(right) { + return false + } + if (left.GetRevocable() == nil) != (right.GetRevocable() == nil) { + return false + } + if a, b := left.GetProviderID(), right.GetProviderID(); (a == nil) != (b == nil) { + return false + } else if a != nil && a.Value != b.Value { + return false + } + return true +} + +// Contains tests if "right" is contained in "left". +func (left Resource) Contains(right Resource) bool { + if !left.Subtractable(right) { + return false + } + switch left.GetType() { + case SCALAR: + return right.GetScalar().Compare(left.GetScalar()) <= 0 + case RANGES: + return right.GetRanges().Compare(left.GetRanges()) <= 0 + case SET: + return right.GetSet().Compare(left.GetSet()) <= 0 + default: + return false + } +} + +// Subtract removes right from left. +// This func panics if the resource types don't match. +func (left *Resource) Subtract(right Resource) { + switch right.checkType(left.GetType()) { + case SCALAR: + left.Scalar = left.GetScalar().Subtract(right.GetScalar()) + case RANGES: + left.Ranges = left.GetRanges().Subtract(right.GetRanges()) + case SET: + left.Set = left.GetSet().Subtract(right.GetSet()) + } +} + +// Add adds right to left. +// This func panics if the resource types don't match. +func (left *Resource) Add(right Resource) { + switch right.checkType(left.GetType()) { + case SCALAR: + left.Scalar = left.GetScalar().Add(right.GetScalar()) + case RANGES: + left.Ranges = left.GetRanges().Add(right.GetRanges()) + case SET: + left.Set = left.GetSet().Add(right.GetSet()) + } +} + +// checkType panics if the type of this resources != t +func (left *Resource) checkType(t Value_Type) Value_Type { + if left != nil && left.GetType() != t { + panic(fmt.Sprintf("expected type %v instead of %v", t, left.GetType())) + } + return t +} + +// IsEmpty returns true if the value of this resource is equivalent to the zero-value, +// where a zero-length slice or map is equivalent to a nil reference to such. +func (left *Resource) IsEmpty() bool { + if left == nil { + return true + } + switch left.GetType() { + case SCALAR: + return left.GetScalar().GetValue() == 0 + case RANGES: + return len(left.GetRanges().GetRange()) == 0 + case SET: + return len(left.GetSet().GetItem()) == 0 + } + return false +} + +// IsUnreserved returns true if this resource neither statically or dynamically reserved. +// A resource is considered statically reserved if it has a non-default role. +func (left *Resource) IsUnreserved() bool { + // role != RoleDefault -> static reservation + // GetReservation() != nil -> dynamic reservation + // return {no-static-reservation} && {no-dynamic-reservation} + return (left.Role == nil || left.GetRole() == "*") && left.GetReservation() == nil && len(left.GetReservations()) == 0 +} + +// IsReserved returns true if this resource has been reserved for the given role. +// If role=="" then return true if there are no static or dynamic reservations for this resource. +// It's expected that this Resource has already been validated (see Validate). +func (left *Resource) IsReserved(role string) bool { + return !left.IsUnreserved() && (role == "" || role == left.ReservationRole()) +} + +// ReservationRole returns the role for which the resource is reserved. Callers should check the +// reservation status of the resource via IsReserved prior to invoking this func. +func (r *Resource) ReservationRole() string { + // if using reservation refinement, return the role of the last refinement + rs := r.GetReservations() + if x := len(rs); x > 0 { + return rs[x-1].GetRole() + } + // if using the old reservation API, role is a first class field of Resource + // (and it's never stored in Resource.Reservation). + return r.GetRole() +} + +// IsAllocatableTo returns true if the resource may be allocated to the given role. +func (left *Resource) IsAllocatableTo(role string) bool { + if left.IsUnreserved() { + return true + } + r := left.ReservationRole() + return role == r || roles.IsStrictSubroleOf(role, r) +} + +// IsDynamicallyReserved returns true if this resource has a non-nil reservation descriptor +func (left *Resource) IsDynamicallyReserved() bool { + if left.IsReserved("") { + if left.GetReservation() != nil { + return true + } + rs := left.GetReservations() + return rs[len(rs)-1].GetType() == Resource_ReservationInfo_DYNAMIC + } + return false +} + +// IsRevocable returns true if this resource has a non-nil revocable descriptor +func (left *Resource) IsRevocable() bool { + return left.GetRevocable() != nil +} + +// IsPersistentVolume returns true if this is a disk resource with a non-nil Persistence descriptor +func (left *Resource) IsPersistentVolume() bool { + return left.GetDisk().GetPersistence() != nil +} + +// IsDisk returns true if this is a disk resource of the specified type. +func (left *Resource) IsDisk(t Resource_DiskInfo_Source_Type) bool { + if s := left.GetDisk().GetSource(); s != nil { + return s.GetType() == t + } + return false +} + +// HasResourceProvider returns true if the given Resource object is provided by a resource provider. +func (left *Resource) HasResourceProvider() bool { + return left.GetProviderID() != nil +} + +// ToUnreserved returns a (cloned) view of the Resources w/o any reservation data. It does not modify +// the receiver. +func (rs Resources) ToUnreserved() (result Resources) { + if rs == nil { + return nil + } + for i := range rs { + r := rs[i] // intentionally shallow-copy + r.Reservations = nil + r.Reservation = nil + r.Role = nil + result.Add1(r) + } + return +} + +// PushReservation returns a cloned set of Resources w/ the given resource refinement. +// Panics if resources become invalid as a result of pushing the reservation (e.g. pre- and post- +// refinement modes are mixed). +func (rs Resources) PushReservation(ri Resource_ReservationInfo) (result Resources) { +push_next: + for i := range rs { + if rs[i].IsEmpty() { + continue + } + r := proto.Clone(&rs[i]).(*Resource) // we don't want to impact rs + r.Reservations = append(r.Reservations, *(proto.Clone(&ri).(*Resource_ReservationInfo))) + + if err := r.Validate(); err != nil { + panic(err) + } + + // unroll Add1 to avoid additional calls to Clone + rr := *r + for j := range result { + r2 := &result[j] + if r2.Addable(rr) { + r2.Add(rr) + continue push_next + } + } + // cannot be combined with an existing resource + result = append(result, rr) + } + return +} + +// PopReservation returns a cloned set of Resources wherein the most recent reservation refeinement has been +// removed. Panics if for any resource in the collection there is no "last refinement" to remove. +func (rs Resources) PopReservation() (result Resources) { +pop_next: + for i := range rs { + r := &rs[i] + ls := len(r.Reservations) + if ls == 0 { + panic(fmt.Sprintf("no reservations exist for resource %q", r)) + } + + r = proto.Clone(r).(*Resource) // avoid modifying rs + r.Reservations[ls-1] = Resource_ReservationInfo{} // don't leak nested pointers + r.Reservations = r.Reservations[:ls-1] // shrink the slice + + // unroll Add1 to avoid additional calls to Clone + rr := *r + for j := range result { + r2 := &result[j] + if r2.Addable(rr) { + r2.Add(rr) + continue pop_next + } + } + + // cannot be combined with an existing resource + result = append(result, rr) + } + return +} + +// Allocate sets the AllocationInfo for the resource, panics if role is "". +func (r *Resource) Allocate(role string) { + if role == "" { + panic(fmt.Sprintf("cannot allocate resource to an empty-string role: %q", r)) + } + r.AllocationInfo = &Resource_AllocationInfo{Role: &role} +} + +// Unallocate clears the AllocationInfo for the resource. +func (r *Resource) Unallocate() { + r.AllocationInfo = nil +} + +// Allocate sets the AllocationInfo for all the resources. +// Returns a reference to the receiver to allow for chaining. +func (rs Resources) Allocate(role string) Resources { + if role == "" { + panic(fmt.Sprintf("cannot allocate resources to an empty-string role: %q", rs)) + } + for i := range rs { + rs[i].AllocationInfo = &Resource_AllocationInfo{Role: &role} + } + return rs +} + +// Unallocate clears the AllocationInfo for all the resources. +// Returns a reference to the receiver to allow for chaining. +func (rs Resources) Unallocate() Resources { + for i := range rs { + rs[i].AllocationInfo = nil + } + return rs +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/roles/role.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/roles/role.go new file mode 100644 index 00000000..b6075f8d --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/roles/role.go @@ -0,0 +1,82 @@ +package roles + +import ( + "fmt" + "strings" + "unicode" +) + +// Role is a deprecated type. +type Role string + +const defaultRole = Role("*") + +func (r Role) IsDefault() bool { + return r == defaultRole +} + +func (r Role) Assign() func(interface{}) { + return func(v interface{}) { + type roler interface { + WithRole(string) + } + if ri, ok := v.(roler); ok { + ri.WithRole(string(r)) + } + } +} + +func (r Role) Proto() *string { + s := string(r) + return &s +} + +// IsStrictSubroleOf returns true if left is a strict subrole of right. +func IsStrictSubroleOf(left, right string) bool { + return len(left) > len(right) && left[len(right)] == '/' && strings.HasPrefix(left, right) +} + +var illegalComponents = map[string]struct{}{ + ".": struct{}{}, + "..": struct{}{}, + "*": struct{}{}, +} + +func Parse(s string) (string, error) { + if s == string(defaultRole) { + return s, nil + } + if strings.HasPrefix(s, "/") { + return "", fmt.Errorf("role %q cannot start with a slash", s) + } + if strings.HasSuffix(s, "/") { + return "", fmt.Errorf("role %q cannot end with a slash", s) + } + + // validate each component in the role path + for _, part := range strings.Split(s, "/") { + if part == "" { + return "", fmt.Errorf("role %q cannot contain two adjacent slashes", s) + } + if bad, found := illegalComponents[part]; found { + return "", fmt.Errorf("role %q cannot contain %q as a component", s, bad) + } + if strings.HasPrefix(part, "-") { + return "", fmt.Errorf("role component %q is invalid because it begins with a dash", part) + } + if strings.IndexFunc(part, func(r rune) bool { return unicode.IsSpace(r) || unicode.IsControl(r) }) > -1 { + return "", fmt.Errorf("role component %q is invalid because it contains backspace or whitespace", part) + } + } + return s, nil +} + +func Validate(roles ...string) error { + for i := range roles { + _, err := Parse(roles[i]) + if err != nil { + return err + } + } + return nil +} diff --git a/vendor/github.com/mesos/mesos-go/api/v1/lib/values.go b/vendor/github.com/mesos/mesos-go/api/v1/lib/values.go new file mode 100644 index 00000000..ae46905e --- /dev/null +++ b/vendor/github.com/mesos/mesos-go/api/v1/lib/values.go @@ -0,0 +1,142 @@ +package mesos + +func (left *Value_Scalar) Compare(right *Value_Scalar) int { + var ( + a = convertToFixed64(left.GetValue()) + b = convertToFixed64(right.GetValue()) + ) + if a < b { + return -1 + } + if a > b { + return 1 + } + return 0 +} + +func (left *Value_Ranges) Compare(right *Value_Ranges) int { + return Ranges(left.GetRange()).Compare(right.GetRange()) +} + +func (left *Value_Set) Compare(right *Value_Set) int { + i, j := left.GetItem(), right.GetItem() + if len(i) <= len(j) { + b := make(map[string]struct{}, len(j)) + for _, x := range j { + b[x] = struct{}{} + } + // make sure that each item on the left exists on the right, + // otherwise left is not a subset of right. + a := make(map[string]struct{}, len(i)) + for _, x := range i { + if _, ok := b[x]; !ok { + return 1 + } + a[x] = struct{}{} + } + // if every item on the right also exists on the left, then + // the sets are equal, otherwise left < right + for x := range b { + if _, ok := a[x]; !ok { + return -1 + } + } + return 0 + } + return 1 +} + +func (left *Value_Set) Add(right *Value_Set) *Value_Set { + lefty := left.GetItem() + righty := right.GetItem() + c := len(lefty) + len(righty) + if c == 0 { + return nil + } + m := make(map[string]struct{}, c) + for _, v := range lefty { + m[v] = struct{}{} + } + for _, v := range righty { + m[v] = struct{}{} + } + x := make([]string, 0, len(m)) + for v := range m { + x = append(x, v) + } + return &Value_Set{Item: x} +} + +func (left *Value_Set) Subtract(right *Value_Set) *Value_Set { + // for each item in right, remove it from left + lefty := left.GetItem() + righty := right.GetItem() + if c := len(lefty); c == 0 { + return nil + } else if len(righty) == 0 { + x := make([]string, c) + copy(x, lefty) + return &Value_Set{Item: x} + } + + a := make(map[string]struct{}, len(lefty)) + for _, x := range lefty { + a[x] = struct{}{} + } + for _, x := range righty { + delete(a, x) + } + if len(a) == 0 { + return nil + } + i := 0 + for k := range a { + lefty[i] = k + i++ + } + return &Value_Set{Item: lefty[:len(a)]} +} + +func (left *Value_Ranges) Add(right *Value_Ranges) *Value_Ranges { + a, b := Ranges(left.GetRange()), Ranges(right.GetRange()) + c := len(a) + len(b) + if c == 0 { + return nil + } + x := make(Ranges, c) + if len(a) > 0 { + copy(x, a) + } + if len(b) > 0 { + copy(x[len(a):], b) + } + return &Value_Ranges{ + Range: x.Sort().Squash(), + } +} + +func (left *Value_Ranges) Subtract(right *Value_Ranges) *Value_Ranges { + a, b := Ranges(left.GetRange()), Ranges(right.GetRange()) + if len(a) > 1 { + x := make(Ranges, len(a)) + copy(x, a) + a = x.Sort().Squash() + } + for _, r := range b { + a = a.Remove(r) + } + if len(a) == 0 { + return nil + } + return &Value_Ranges{Range: a} +} + +func (left *Value_Scalar) Add(right *Value_Scalar) *Value_Scalar { + sum := convertToFixed64(left.GetValue()) + convertToFixed64(right.GetValue()) + return &Value_Scalar{Value: convertToFloat64(sum)} +} + +func (left *Value_Scalar) Subtract(right *Value_Scalar) *Value_Scalar { + diff := convertToFixed64(left.GetValue()) - convertToFixed64(right.GetValue()) + return &Value_Scalar{Value: convertToFloat64(diff)} +} diff --git a/vendor/github.com/pquerna/ffjson/LICENSE b/vendor/github.com/pquerna/ffjson/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/vendor/github.com/pquerna/ffjson/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/vendor/github.com/pquerna/ffjson/NOTICE b/vendor/github.com/pquerna/ffjson/NOTICE new file mode 100644 index 00000000..405a4961 --- /dev/null +++ b/vendor/github.com/pquerna/ffjson/NOTICE @@ -0,0 +1,8 @@ +ffjson +Copyright (c) 2014, Paul Querna + +This product includes software developed by +Paul Querna (http://paul.querna.org/). + +Portions of this software were developed as +part of Go, Copyright (c) 2012 The Go Authors. \ No newline at end of file diff --git a/vendor/github.com/pquerna/ffjson/fflib/v1/buffer.go b/vendor/github.com/pquerna/ffjson/fflib/v1/buffer.go new file mode 100644 index 00000000..7f63a858 --- /dev/null +++ b/vendor/github.com/pquerna/ffjson/fflib/v1/buffer.go @@ -0,0 +1,421 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package v1 + +// Simple byte buffer for marshaling data. + +import ( + "bytes" + "encoding/json" + "errors" + "io" + "unicode/utf8" +) + +type grower interface { + Grow(n int) +} + +type truncater interface { + Truncate(n int) + Reset() +} + +type bytesReader interface { + Bytes() []byte + String() string +} + +type runeWriter interface { + WriteRune(r rune) (n int, err error) +} + +type stringWriter interface { + WriteString(s string) (n int, err error) +} + +type lener interface { + Len() int +} + +type rewinder interface { + Rewind(n int) (err error) +} + +type encoder interface { + Encode(interface{}) error +} + +// TODO(pquerna): continue to reduce these interfaces + +type EncodingBuffer interface { + io.Writer + io.WriterTo + io.ByteWriter + stringWriter + truncater + grower + rewinder + encoder +} + +type DecodingBuffer interface { + io.ReadWriter + io.ByteWriter + stringWriter + runeWriter + truncater + grower + bytesReader + lener +} + +// A Buffer is a variable-sized buffer of bytes with Read and Write methods. +// The zero value for Buffer is an empty buffer ready to use. +type Buffer struct { + buf []byte // contents are the bytes buf[off : len(buf)] + off int // read at &buf[off], write at &buf[len(buf)] + runeBytes [utf8.UTFMax]byte // avoid allocation of slice on each WriteByte or Rune + encoder *json.Encoder + skipTrailingByte bool +} + +// ErrTooLarge is passed to panic if memory cannot be allocated to store data in a buffer. +var ErrTooLarge = errors.New("fflib.v1.Buffer: too large") + +// Bytes returns a slice of the contents of the unread portion of the buffer; +// len(b.Bytes()) == b.Len(). If the caller changes the contents of the +// returned slice, the contents of the buffer will change provided there +// are no intervening method calls on the Buffer. +func (b *Buffer) Bytes() []byte { return b.buf[b.off:] } + +// String returns the contents of the unread portion of the buffer +// as a string. If the Buffer is a nil pointer, it returns "". +func (b *Buffer) String() string { + if b == nil { + // Special case, useful in debugging. + return "" + } + return string(b.buf[b.off:]) +} + +// Len returns the number of bytes of the unread portion of the buffer; +// b.Len() == len(b.Bytes()). +func (b *Buffer) Len() int { return len(b.buf) - b.off } + +// Truncate discards all but the first n unread bytes from the buffer. +// It panics if n is negative or greater than the length of the buffer. +func (b *Buffer) Truncate(n int) { + if n == 0 { + b.off = 0 + b.buf = b.buf[0:0] + } else { + b.buf = b.buf[0 : b.off+n] + } +} + +// Reset resets the buffer so it has no content. +// b.Reset() is the same as b.Truncate(0). +func (b *Buffer) Reset() { b.Truncate(0) } + +// grow grows the buffer to guarantee space for n more bytes. +// It returns the index where bytes should be written. +// If the buffer can't grow it will panic with ErrTooLarge. +func (b *Buffer) grow(n int) int { + // If we have no buffer, get one from the pool + m := b.Len() + if m == 0 { + if b.buf == nil { + b.buf = makeSlice(2 * n) + b.off = 0 + } else if b.off != 0 { + // If buffer is empty, reset to recover space. + b.Truncate(0) + } + } + if len(b.buf)+n > cap(b.buf) { + var buf []byte + if m+n <= cap(b.buf)/2 { + // We can slide things down instead of allocating a new + // slice. We only need m+n <= cap(b.buf) to slide, but + // we instead let capacity get twice as large so we + // don't spend all our time copying. + copy(b.buf[:], b.buf[b.off:]) + buf = b.buf[:m] + } else { + // not enough space anywhere + buf = makeSlice(2*cap(b.buf) + n) + copy(buf, b.buf[b.off:]) + Pool(b.buf) + b.buf = buf + } + b.off = 0 + } + b.buf = b.buf[0 : b.off+m+n] + return b.off + m +} + +// Grow grows the buffer's capacity, if necessary, to guarantee space for +// another n bytes. After Grow(n), at least n bytes can be written to the +// buffer without another allocation. +// If n is negative, Grow will panic. +// If the buffer can't grow it will panic with ErrTooLarge. +func (b *Buffer) Grow(n int) { + if n < 0 { + panic("bytes.Buffer.Grow: negative count") + } + m := b.grow(n) + b.buf = b.buf[0:m] +} + +// Write appends the contents of p to the buffer, growing the buffer as +// needed. The return value n is the length of p; err is always nil. If the +// buffer becomes too large, Write will panic with ErrTooLarge. +func (b *Buffer) Write(p []byte) (n int, err error) { + if b.skipTrailingByte { + p = p[:len(p)-1] + } + m := b.grow(len(p)) + return copy(b.buf[m:], p), nil +} + +// WriteString appends the contents of s to the buffer, growing the buffer as +// needed. The return value n is the length of s; err is always nil. If the +// buffer becomes too large, WriteString will panic with ErrTooLarge. +func (b *Buffer) WriteString(s string) (n int, err error) { + m := b.grow(len(s)) + return copy(b.buf[m:], s), nil +} + +// MinRead is the minimum slice size passed to a Read call by +// Buffer.ReadFrom. As long as the Buffer has at least MinRead bytes beyond +// what is required to hold the contents of r, ReadFrom will not grow the +// underlying buffer. +const minRead = 512 + +// ReadFrom reads data from r until EOF and appends it to the buffer, growing +// the buffer as needed. The return value n is the number of bytes read. Any +// error except io.EOF encountered during the read is also returned. If the +// buffer becomes too large, ReadFrom will panic with ErrTooLarge. +func (b *Buffer) ReadFrom(r io.Reader) (n int64, err error) { + // If buffer is empty, reset to recover space. + if b.off >= len(b.buf) { + b.Truncate(0) + } + for { + if free := cap(b.buf) - len(b.buf); free < minRead { + // not enough space at end + newBuf := b.buf + if b.off+free < minRead { + // not enough space using beginning of buffer; + // double buffer capacity + newBuf = makeSlice(2*cap(b.buf) + minRead) + } + copy(newBuf, b.buf[b.off:]) + Pool(b.buf) + b.buf = newBuf[:len(b.buf)-b.off] + b.off = 0 + } + m, e := r.Read(b.buf[len(b.buf):cap(b.buf)]) + b.buf = b.buf[0 : len(b.buf)+m] + n += int64(m) + if e == io.EOF { + break + } + if e != nil { + return n, e + } + } + return n, nil // err is EOF, so return nil explicitly +} + +// WriteTo writes data to w until the buffer is drained or an error occurs. +// The return value n is the number of bytes written; it always fits into an +// int, but it is int64 to match the io.WriterTo interface. Any error +// encountered during the write is also returned. +func (b *Buffer) WriteTo(w io.Writer) (n int64, err error) { + if b.off < len(b.buf) { + nBytes := b.Len() + m, e := w.Write(b.buf[b.off:]) + if m > nBytes { + panic("bytes.Buffer.WriteTo: invalid Write count") + } + b.off += m + n = int64(m) + if e != nil { + return n, e + } + // all bytes should have been written, by definition of + // Write method in io.Writer + if m != nBytes { + return n, io.ErrShortWrite + } + } + // Buffer is now empty; reset. + b.Truncate(0) + return +} + +// WriteByte appends the byte c to the buffer, growing the buffer as needed. +// The returned error is always nil, but is included to match bufio.Writer's +// WriteByte. If the buffer becomes too large, WriteByte will panic with +// ErrTooLarge. +func (b *Buffer) WriteByte(c byte) error { + m := b.grow(1) + b.buf[m] = c + return nil +} + +func (b *Buffer) Rewind(n int) error { + b.buf = b.buf[:len(b.buf)-n] + return nil +} + +func (b *Buffer) Encode(v interface{}) error { + if b.encoder == nil { + b.encoder = json.NewEncoder(b) + } + b.skipTrailingByte = true + err := b.encoder.Encode(v) + b.skipTrailingByte = false + return err +} + +// WriteRune appends the UTF-8 encoding of Unicode code point r to the +// buffer, returning its length and an error, which is always nil but is +// included to match bufio.Writer's WriteRune. The buffer is grown as needed; +// if it becomes too large, WriteRune will panic with ErrTooLarge. +func (b *Buffer) WriteRune(r rune) (n int, err error) { + if r < utf8.RuneSelf { + b.WriteByte(byte(r)) + return 1, nil + } + n = utf8.EncodeRune(b.runeBytes[0:], r) + b.Write(b.runeBytes[0:n]) + return n, nil +} + +// Read reads the next len(p) bytes from the buffer or until the buffer +// is drained. The return value n is the number of bytes read. If the +// buffer has no data to return, err is io.EOF (unless len(p) is zero); +// otherwise it is nil. +func (b *Buffer) Read(p []byte) (n int, err error) { + if b.off >= len(b.buf) { + // Buffer is empty, reset to recover space. + b.Truncate(0) + if len(p) == 0 { + return + } + return 0, io.EOF + } + n = copy(p, b.buf[b.off:]) + b.off += n + return +} + +// Next returns a slice containing the next n bytes from the buffer, +// advancing the buffer as if the bytes had been returned by Read. +// If there are fewer than n bytes in the buffer, Next returns the entire buffer. +// The slice is only valid until the next call to a read or write method. +func (b *Buffer) Next(n int) []byte { + m := b.Len() + if n > m { + n = m + } + data := b.buf[b.off : b.off+n] + b.off += n + return data +} + +// ReadByte reads and returns the next byte from the buffer. +// If no byte is available, it returns error io.EOF. +func (b *Buffer) ReadByte() (c byte, err error) { + if b.off >= len(b.buf) { + // Buffer is empty, reset to recover space. + b.Truncate(0) + return 0, io.EOF + } + c = b.buf[b.off] + b.off++ + return c, nil +} + +// ReadRune reads and returns the next UTF-8-encoded +// Unicode code point from the buffer. +// If no bytes are available, the error returned is io.EOF. +// If the bytes are an erroneous UTF-8 encoding, it +// consumes one byte and returns U+FFFD, 1. +func (b *Buffer) ReadRune() (r rune, size int, err error) { + if b.off >= len(b.buf) { + // Buffer is empty, reset to recover space. + b.Truncate(0) + return 0, 0, io.EOF + } + c := b.buf[b.off] + if c < utf8.RuneSelf { + b.off++ + return rune(c), 1, nil + } + r, n := utf8.DecodeRune(b.buf[b.off:]) + b.off += n + return r, n, nil +} + +// ReadBytes reads until the first occurrence of delim in the input, +// returning a slice containing the data up to and including the delimiter. +// If ReadBytes encounters an error before finding a delimiter, +// it returns the data read before the error and the error itself (often io.EOF). +// ReadBytes returns err != nil if and only if the returned data does not end in +// delim. +func (b *Buffer) ReadBytes(delim byte) (line []byte, err error) { + slice, err := b.readSlice(delim) + // return a copy of slice. The buffer's backing array may + // be overwritten by later calls. + line = append(line, slice...) + return +} + +// readSlice is like ReadBytes but returns a reference to internal buffer data. +func (b *Buffer) readSlice(delim byte) (line []byte, err error) { + i := bytes.IndexByte(b.buf[b.off:], delim) + end := b.off + i + 1 + if i < 0 { + end = len(b.buf) + err = io.EOF + } + line = b.buf[b.off:end] + b.off = end + return line, err +} + +// ReadString reads until the first occurrence of delim in the input, +// returning a string containing the data up to and including the delimiter. +// If ReadString encounters an error before finding a delimiter, +// it returns the data read before the error and the error itself (often io.EOF). +// ReadString returns err != nil if and only if the returned data does not end +// in delim. +func (b *Buffer) ReadString(delim byte) (line string, err error) { + slice, err := b.readSlice(delim) + return string(slice), err +} + +// NewBuffer creates and initializes a new Buffer using buf as its initial +// contents. It is intended to prepare a Buffer to read existing data. It +// can also be used to size the internal buffer for writing. To do that, +// buf should have the desired capacity but a length of zero. +// +// In most cases, new(Buffer) (or just declaring a Buffer variable) is +// sufficient to initialize a Buffer. +func NewBuffer(buf []byte) *Buffer { return &Buffer{buf: buf} } + +// NewBufferString creates and initializes a new Buffer using string s as its +// initial contents. It is intended to prepare a buffer to read an existing +// string. +// +// In most cases, new(Buffer) (or just declaring a Buffer variable) is +// sufficient to initialize a Buffer. +func NewBufferString(s string) *Buffer { + return &Buffer{buf: []byte(s)} +} diff --git a/vendor/github.com/pquerna/ffjson/fflib/v1/buffer_nopool.go b/vendor/github.com/pquerna/ffjson/fflib/v1/buffer_nopool.go new file mode 100644 index 00000000..b84af6ff --- /dev/null +++ b/vendor/github.com/pquerna/ffjson/fflib/v1/buffer_nopool.go @@ -0,0 +1,11 @@ +// +build !go1.3 + +package v1 + +// Stub version of buffer_pool.go for Go 1.2, which doesn't have sync.Pool. + +func Pool(b []byte) {} + +func makeSlice(n int) []byte { + return make([]byte, n) +} diff --git a/vendor/github.com/pquerna/ffjson/fflib/v1/buffer_pool.go b/vendor/github.com/pquerna/ffjson/fflib/v1/buffer_pool.go new file mode 100644 index 00000000..a021c57c --- /dev/null +++ b/vendor/github.com/pquerna/ffjson/fflib/v1/buffer_pool.go @@ -0,0 +1,105 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.3 + +package v1 + +// Allocation pools for Buffers. + +import "sync" + +var pools [14]sync.Pool +var pool64 *sync.Pool + +func init() { + var i uint + // TODO(pquerna): add science here around actual pool sizes. + for i = 6; i < 20; i++ { + n := 1 << i + pools[poolNum(n)].New = func() interface{} { return make([]byte, 0, n) } + } + pool64 = &pools[0] +} + +// This returns the pool number that will give a buffer of +// at least 'i' bytes. +func poolNum(i int) int { + // TODO(pquerna): convert to log2 w/ bsr asm instruction: + // + if i <= 64 { + return 0 + } else if i <= 128 { + return 1 + } else if i <= 256 { + return 2 + } else if i <= 512 { + return 3 + } else if i <= 1024 { + return 4 + } else if i <= 2048 { + return 5 + } else if i <= 4096 { + return 6 + } else if i <= 8192 { + return 7 + } else if i <= 16384 { + return 8 + } else if i <= 32768 { + return 9 + } else if i <= 65536 { + return 10 + } else if i <= 131072 { + return 11 + } else if i <= 262144 { + return 12 + } else if i <= 524288 { + return 13 + } else { + return -1 + } +} + +// Send a buffer to the Pool to reuse for other instances. +// You may no longer utilize the content of the buffer, since it may be used +// by other goroutines. +func Pool(b []byte) { + if b == nil { + return + } + c := cap(b) + + // Our smallest buffer is 64 bytes, so we discard smaller buffers. + if c < 64 { + return + } + + // We need to put the incoming buffer into the NEXT buffer, + // since a buffer guarantees AT LEAST the number of bytes available + // that is the top of this buffer. + // That is the reason for dividing the cap by 2, so it gets into the NEXT bucket. + // We add 2 to avoid rounding down if size is exactly power of 2. + pn := poolNum((c + 2) >> 1) + if pn != -1 { + pools[pn].Put(b[0:0]) + } + // if we didn't have a slot for this []byte, we just drop it and let the GC + // take care of it. +} + +// makeSlice allocates a slice of size n -- it will attempt to use a pool'ed +// instance whenever possible. +func makeSlice(n int) []byte { + if n <= 64 { + return pool64.Get().([]byte)[0:n] + } + + pn := poolNum(n) + + if pn != -1 { + return pools[pn].Get().([]byte)[0:n] + } else { + return make([]byte, n) + } +} diff --git a/vendor/github.com/pquerna/ffjson/fflib/v1/bytenum.go b/vendor/github.com/pquerna/ffjson/fflib/v1/bytenum.go new file mode 100644 index 00000000..08477409 --- /dev/null +++ b/vendor/github.com/pquerna/ffjson/fflib/v1/bytenum.go @@ -0,0 +1,88 @@ +/** + * Copyright 2014 Paul Querna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +/* Portions of this file are on Go stdlib's strconv/iota.go */ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package v1 + +import ( + "github.com/pquerna/ffjson/fflib/v1/internal" +) + +func ParseFloat(s []byte, bitSize int) (f float64, err error) { + return internal.ParseFloat(s, bitSize) +} + +// ParseUint is like ParseInt but for unsigned numbers, and oeprating on []byte +func ParseUint(s []byte, base int, bitSize int) (n uint64, err error) { + if len(s) == 1 { + switch s[0] { + case '0': + return 0, nil + case '1': + return 1, nil + case '2': + return 2, nil + case '3': + return 3, nil + case '4': + return 4, nil + case '5': + return 5, nil + case '6': + return 6, nil + case '7': + return 7, nil + case '8': + return 8, nil + case '9': + return 9, nil + } + } + return internal.ParseUint(s, base, bitSize) +} + +func ParseInt(s []byte, base int, bitSize int) (i int64, err error) { + if len(s) == 1 { + switch s[0] { + case '0': + return 0, nil + case '1': + return 1, nil + case '2': + return 2, nil + case '3': + return 3, nil + case '4': + return 4, nil + case '5': + return 5, nil + case '6': + return 6, nil + case '7': + return 7, nil + case '8': + return 8, nil + case '9': + return 9, nil + } + } + return internal.ParseInt(s, base, bitSize) +} diff --git a/vendor/github.com/pquerna/ffjson/fflib/v1/decimal.go b/vendor/github.com/pquerna/ffjson/fflib/v1/decimal.go new file mode 100644 index 00000000..069df7a0 --- /dev/null +++ b/vendor/github.com/pquerna/ffjson/fflib/v1/decimal.go @@ -0,0 +1,378 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Multiprecision decimal numbers. +// For floating-point formatting only; not general purpose. +// Only operations are assign and (binary) left/right shift. +// Can do binary floating point in multiprecision decimal precisely +// because 2 divides 10; cannot do decimal floating point +// in multiprecision binary precisely. + +package v1 + +type decimal struct { + d [800]byte // digits + nd int // number of digits used + dp int // decimal point + neg bool + trunc bool // discarded nonzero digits beyond d[:nd] +} + +func (a *decimal) String() string { + n := 10 + a.nd + if a.dp > 0 { + n += a.dp + } + if a.dp < 0 { + n += -a.dp + } + + buf := make([]byte, n) + w := 0 + switch { + case a.nd == 0: + return "0" + + case a.dp <= 0: + // zeros fill space between decimal point and digits + buf[w] = '0' + w++ + buf[w] = '.' + w++ + w += digitZero(buf[w : w+-a.dp]) + w += copy(buf[w:], a.d[0:a.nd]) + + case a.dp < a.nd: + // decimal point in middle of digits + w += copy(buf[w:], a.d[0:a.dp]) + buf[w] = '.' + w++ + w += copy(buf[w:], a.d[a.dp:a.nd]) + + default: + // zeros fill space between digits and decimal point + w += copy(buf[w:], a.d[0:a.nd]) + w += digitZero(buf[w : w+a.dp-a.nd]) + } + return string(buf[0:w]) +} + +func digitZero(dst []byte) int { + for i := range dst { + dst[i] = '0' + } + return len(dst) +} + +// trim trailing zeros from number. +// (They are meaningless; the decimal point is tracked +// independent of the number of digits.) +func trim(a *decimal) { + for a.nd > 0 && a.d[a.nd-1] == '0' { + a.nd-- + } + if a.nd == 0 { + a.dp = 0 + } +} + +// Assign v to a. +func (a *decimal) Assign(v uint64) { + var buf [24]byte + + // Write reversed decimal in buf. + n := 0 + for v > 0 { + v1 := v / 10 + v -= 10 * v1 + buf[n] = byte(v + '0') + n++ + v = v1 + } + + // Reverse again to produce forward decimal in a.d. + a.nd = 0 + for n--; n >= 0; n-- { + a.d[a.nd] = buf[n] + a.nd++ + } + a.dp = a.nd + trim(a) +} + +// Maximum shift that we can do in one pass without overflow. +// Signed int has 31 bits, and we have to be able to accommodate 9<>k == 0; r++ { + if r >= a.nd { + if n == 0 { + // a == 0; shouldn't get here, but handle anyway. + a.nd = 0 + return + } + for n>>k == 0 { + n = n * 10 + r++ + } + break + } + c := int(a.d[r]) + n = n*10 + c - '0' + } + a.dp -= r - 1 + + // Pick up a digit, put down a digit. + for ; r < a.nd; r++ { + c := int(a.d[r]) + dig := n >> k + n -= dig << k + a.d[w] = byte(dig + '0') + w++ + n = n*10 + c - '0' + } + + // Put down extra digits. + for n > 0 { + dig := n >> k + n -= dig << k + if w < len(a.d) { + a.d[w] = byte(dig + '0') + w++ + } else if dig > 0 { + a.trunc = true + } + n = n * 10 + } + + a.nd = w + trim(a) +} + +// Cheat sheet for left shift: table indexed by shift count giving +// number of new digits that will be introduced by that shift. +// +// For example, leftcheats[4] = {2, "625"}. That means that +// if we are shifting by 4 (multiplying by 16), it will add 2 digits +// when the string prefix is "625" through "999", and one fewer digit +// if the string prefix is "000" through "624". +// +// Credit for this trick goes to Ken. + +type leftCheat struct { + delta int // number of new digits + cutoff string // minus one digit if original < a. +} + +var leftcheats = []leftCheat{ + // Leading digits of 1/2^i = 5^i. + // 5^23 is not an exact 64-bit floating point number, + // so have to use bc for the math. + /* + seq 27 | sed 's/^/5^/' | bc | + awk 'BEGIN{ print "\tleftCheat{ 0, \"\" }," } + { + log2 = log(2)/log(10) + printf("\tleftCheat{ %d, \"%s\" },\t// * %d\n", + int(log2*NR+1), $0, 2**NR) + }' + */ + {0, ""}, + {1, "5"}, // * 2 + {1, "25"}, // * 4 + {1, "125"}, // * 8 + {2, "625"}, // * 16 + {2, "3125"}, // * 32 + {2, "15625"}, // * 64 + {3, "78125"}, // * 128 + {3, "390625"}, // * 256 + {3, "1953125"}, // * 512 + {4, "9765625"}, // * 1024 + {4, "48828125"}, // * 2048 + {4, "244140625"}, // * 4096 + {4, "1220703125"}, // * 8192 + {5, "6103515625"}, // * 16384 + {5, "30517578125"}, // * 32768 + {5, "152587890625"}, // * 65536 + {6, "762939453125"}, // * 131072 + {6, "3814697265625"}, // * 262144 + {6, "19073486328125"}, // * 524288 + {7, "95367431640625"}, // * 1048576 + {7, "476837158203125"}, // * 2097152 + {7, "2384185791015625"}, // * 4194304 + {7, "11920928955078125"}, // * 8388608 + {8, "59604644775390625"}, // * 16777216 + {8, "298023223876953125"}, // * 33554432 + {8, "1490116119384765625"}, // * 67108864 + {9, "7450580596923828125"}, // * 134217728 +} + +// Is the leading prefix of b lexicographically less than s? +func prefixIsLessThan(b []byte, s string) bool { + for i := 0; i < len(s); i++ { + if i >= len(b) { + return true + } + if b[i] != s[i] { + return b[i] < s[i] + } + } + return false +} + +// Binary shift left (/ 2) by k bits. k <= maxShift to avoid overflow. +func leftShift(a *decimal, k uint) { + delta := leftcheats[k].delta + if prefixIsLessThan(a.d[0:a.nd], leftcheats[k].cutoff) { + delta-- + } + + r := a.nd // read index + w := a.nd + delta // write index + n := 0 + + // Pick up a digit, put down a digit. + for r--; r >= 0; r-- { + n += (int(a.d[r]) - '0') << k + quo := n / 10 + rem := n - 10*quo + w-- + if w < len(a.d) { + a.d[w] = byte(rem + '0') + } else if rem != 0 { + a.trunc = true + } + n = quo + } + + // Put down extra digits. + for n > 0 { + quo := n / 10 + rem := n - 10*quo + w-- + if w < len(a.d) { + a.d[w] = byte(rem + '0') + } else if rem != 0 { + a.trunc = true + } + n = quo + } + + a.nd += delta + if a.nd >= len(a.d) { + a.nd = len(a.d) + } + a.dp += delta + trim(a) +} + +// Binary shift left (k > 0) or right (k < 0). +func (a *decimal) Shift(k int) { + switch { + case a.nd == 0: + // nothing to do: a == 0 + case k > 0: + for k > maxShift { + leftShift(a, maxShift) + k -= maxShift + } + leftShift(a, uint(k)) + case k < 0: + for k < -maxShift { + rightShift(a, maxShift) + k += maxShift + } + rightShift(a, uint(-k)) + } +} + +// If we chop a at nd digits, should we round up? +func shouldRoundUp(a *decimal, nd int) bool { + if nd < 0 || nd >= a.nd { + return false + } + if a.d[nd] == '5' && nd+1 == a.nd { // exactly halfway - round to even + // if we truncated, a little higher than what's recorded - always round up + if a.trunc { + return true + } + return nd > 0 && (a.d[nd-1]-'0')%2 != 0 + } + // not halfway - digit tells all + return a.d[nd] >= '5' +} + +// Round a to nd digits (or fewer). +// If nd is zero, it means we're rounding +// just to the left of the digits, as in +// 0.09 -> 0.1. +func (a *decimal) Round(nd int) { + if nd < 0 || nd >= a.nd { + return + } + if shouldRoundUp(a, nd) { + a.RoundUp(nd) + } else { + a.RoundDown(nd) + } +} + +// Round a down to nd digits (or fewer). +func (a *decimal) RoundDown(nd int) { + if nd < 0 || nd >= a.nd { + return + } + a.nd = nd + trim(a) +} + +// Round a up to nd digits (or fewer). +func (a *decimal) RoundUp(nd int) { + if nd < 0 || nd >= a.nd { + return + } + + // round up + for i := nd - 1; i >= 0; i-- { + c := a.d[i] + if c < '9' { // can stop after this digit + a.d[i]++ + a.nd = i + 1 + return + } + } + + // Number is all 9s. + // Change to single 1 with adjusted decimal point. + a.d[0] = '1' + a.nd = 1 + a.dp++ +} + +// Extract integer part, rounded appropriately. +// No guarantees about overflow. +func (a *decimal) RoundedInteger() uint64 { + if a.dp > 20 { + return 0xFFFFFFFFFFFFFFFF + } + var i int + n := uint64(0) + for i = 0; i < a.dp && i < a.nd; i++ { + n = n*10 + uint64(a.d[i]-'0') + } + for ; i < a.dp; i++ { + n *= 10 + } + if shouldRoundUp(a, a.dp) { + n++ + } + return n +} diff --git a/vendor/github.com/pquerna/ffjson/fflib/v1/extfloat.go b/vendor/github.com/pquerna/ffjson/fflib/v1/extfloat.go new file mode 100644 index 00000000..508ddc6b --- /dev/null +++ b/vendor/github.com/pquerna/ffjson/fflib/v1/extfloat.go @@ -0,0 +1,668 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package v1 + +// An extFloat represents an extended floating-point number, with more +// precision than a float64. It does not try to save bits: the +// number represented by the structure is mant*(2^exp), with a negative +// sign if neg is true. +type extFloat struct { + mant uint64 + exp int + neg bool +} + +// Powers of ten taken from double-conversion library. +// http://code.google.com/p/double-conversion/ +const ( + firstPowerOfTen = -348 + stepPowerOfTen = 8 +) + +var smallPowersOfTen = [...]extFloat{ + {1 << 63, -63, false}, // 1 + {0xa << 60, -60, false}, // 1e1 + {0x64 << 57, -57, false}, // 1e2 + {0x3e8 << 54, -54, false}, // 1e3 + {0x2710 << 50, -50, false}, // 1e4 + {0x186a0 << 47, -47, false}, // 1e5 + {0xf4240 << 44, -44, false}, // 1e6 + {0x989680 << 40, -40, false}, // 1e7 +} + +var powersOfTen = [...]extFloat{ + {0xfa8fd5a0081c0288, -1220, false}, // 10^-348 + {0xbaaee17fa23ebf76, -1193, false}, // 10^-340 + {0x8b16fb203055ac76, -1166, false}, // 10^-332 + {0xcf42894a5dce35ea, -1140, false}, // 10^-324 + {0x9a6bb0aa55653b2d, -1113, false}, // 10^-316 + {0xe61acf033d1a45df, -1087, false}, // 10^-308 + {0xab70fe17c79ac6ca, -1060, false}, // 10^-300 + {0xff77b1fcbebcdc4f, -1034, false}, // 10^-292 + {0xbe5691ef416bd60c, -1007, false}, // 10^-284 + {0x8dd01fad907ffc3c, -980, false}, // 10^-276 + {0xd3515c2831559a83, -954, false}, // 10^-268 + {0x9d71ac8fada6c9b5, -927, false}, // 10^-260 + {0xea9c227723ee8bcb, -901, false}, // 10^-252 + {0xaecc49914078536d, -874, false}, // 10^-244 + {0x823c12795db6ce57, -847, false}, // 10^-236 + {0xc21094364dfb5637, -821, false}, // 10^-228 + {0x9096ea6f3848984f, -794, false}, // 10^-220 + {0xd77485cb25823ac7, -768, false}, // 10^-212 + {0xa086cfcd97bf97f4, -741, false}, // 10^-204 + {0xef340a98172aace5, -715, false}, // 10^-196 + {0xb23867fb2a35b28e, -688, false}, // 10^-188 + {0x84c8d4dfd2c63f3b, -661, false}, // 10^-180 + {0xc5dd44271ad3cdba, -635, false}, // 10^-172 + {0x936b9fcebb25c996, -608, false}, // 10^-164 + {0xdbac6c247d62a584, -582, false}, // 10^-156 + {0xa3ab66580d5fdaf6, -555, false}, // 10^-148 + {0xf3e2f893dec3f126, -529, false}, // 10^-140 + {0xb5b5ada8aaff80b8, -502, false}, // 10^-132 + {0x87625f056c7c4a8b, -475, false}, // 10^-124 + {0xc9bcff6034c13053, -449, false}, // 10^-116 + {0x964e858c91ba2655, -422, false}, // 10^-108 + {0xdff9772470297ebd, -396, false}, // 10^-100 + {0xa6dfbd9fb8e5b88f, -369, false}, // 10^-92 + {0xf8a95fcf88747d94, -343, false}, // 10^-84 + {0xb94470938fa89bcf, -316, false}, // 10^-76 + {0x8a08f0f8bf0f156b, -289, false}, // 10^-68 + {0xcdb02555653131b6, -263, false}, // 10^-60 + {0x993fe2c6d07b7fac, -236, false}, // 10^-52 + {0xe45c10c42a2b3b06, -210, false}, // 10^-44 + {0xaa242499697392d3, -183, false}, // 10^-36 + {0xfd87b5f28300ca0e, -157, false}, // 10^-28 + {0xbce5086492111aeb, -130, false}, // 10^-20 + {0x8cbccc096f5088cc, -103, false}, // 10^-12 + {0xd1b71758e219652c, -77, false}, // 10^-4 + {0x9c40000000000000, -50, false}, // 10^4 + {0xe8d4a51000000000, -24, false}, // 10^12 + {0xad78ebc5ac620000, 3, false}, // 10^20 + {0x813f3978f8940984, 30, false}, // 10^28 + {0xc097ce7bc90715b3, 56, false}, // 10^36 + {0x8f7e32ce7bea5c70, 83, false}, // 10^44 + {0xd5d238a4abe98068, 109, false}, // 10^52 + {0x9f4f2726179a2245, 136, false}, // 10^60 + {0xed63a231d4c4fb27, 162, false}, // 10^68 + {0xb0de65388cc8ada8, 189, false}, // 10^76 + {0x83c7088e1aab65db, 216, false}, // 10^84 + {0xc45d1df942711d9a, 242, false}, // 10^92 + {0x924d692ca61be758, 269, false}, // 10^100 + {0xda01ee641a708dea, 295, false}, // 10^108 + {0xa26da3999aef774a, 322, false}, // 10^116 + {0xf209787bb47d6b85, 348, false}, // 10^124 + {0xb454e4a179dd1877, 375, false}, // 10^132 + {0x865b86925b9bc5c2, 402, false}, // 10^140 + {0xc83553c5c8965d3d, 428, false}, // 10^148 + {0x952ab45cfa97a0b3, 455, false}, // 10^156 + {0xde469fbd99a05fe3, 481, false}, // 10^164 + {0xa59bc234db398c25, 508, false}, // 10^172 + {0xf6c69a72a3989f5c, 534, false}, // 10^180 + {0xb7dcbf5354e9bece, 561, false}, // 10^188 + {0x88fcf317f22241e2, 588, false}, // 10^196 + {0xcc20ce9bd35c78a5, 614, false}, // 10^204 + {0x98165af37b2153df, 641, false}, // 10^212 + {0xe2a0b5dc971f303a, 667, false}, // 10^220 + {0xa8d9d1535ce3b396, 694, false}, // 10^228 + {0xfb9b7cd9a4a7443c, 720, false}, // 10^236 + {0xbb764c4ca7a44410, 747, false}, // 10^244 + {0x8bab8eefb6409c1a, 774, false}, // 10^252 + {0xd01fef10a657842c, 800, false}, // 10^260 + {0x9b10a4e5e9913129, 827, false}, // 10^268 + {0xe7109bfba19c0c9d, 853, false}, // 10^276 + {0xac2820d9623bf429, 880, false}, // 10^284 + {0x80444b5e7aa7cf85, 907, false}, // 10^292 + {0xbf21e44003acdd2d, 933, false}, // 10^300 + {0x8e679c2f5e44ff8f, 960, false}, // 10^308 + {0xd433179d9c8cb841, 986, false}, // 10^316 + {0x9e19db92b4e31ba9, 1013, false}, // 10^324 + {0xeb96bf6ebadf77d9, 1039, false}, // 10^332 + {0xaf87023b9bf0ee6b, 1066, false}, // 10^340 +} + +// floatBits returns the bits of the float64 that best approximates +// the extFloat passed as receiver. Overflow is set to true if +// the resulting float64 is ±Inf. +func (f *extFloat) floatBits(flt *floatInfo) (bits uint64, overflow bool) { + f.Normalize() + + exp := f.exp + 63 + + // Exponent too small. + if exp < flt.bias+1 { + n := flt.bias + 1 - exp + f.mant >>= uint(n) + exp += n + } + + // Extract 1+flt.mantbits bits from the 64-bit mantissa. + mant := f.mant >> (63 - flt.mantbits) + if f.mant&(1<<(62-flt.mantbits)) != 0 { + // Round up. + mant += 1 + } + + // Rounding might have added a bit; shift down. + if mant == 2<>= 1 + exp++ + } + + // Infinities. + if exp-flt.bias >= 1<>uint(-f.exp))<>= uint(-f.exp) + f.exp = 0 + return *f, *f + } + expBiased := exp - flt.bias + + upper = extFloat{mant: 2*f.mant + 1, exp: f.exp - 1, neg: f.neg} + if mant != 1<>(64-32) == 0 { + mant <<= 32 + exp -= 32 + } + if mant>>(64-16) == 0 { + mant <<= 16 + exp -= 16 + } + if mant>>(64-8) == 0 { + mant <<= 8 + exp -= 8 + } + if mant>>(64-4) == 0 { + mant <<= 4 + exp -= 4 + } + if mant>>(64-2) == 0 { + mant <<= 2 + exp -= 2 + } + if mant>>(64-1) == 0 { + mant <<= 1 + exp -= 1 + } + shift = uint(f.exp - exp) + f.mant, f.exp = mant, exp + return +} + +// Multiply sets f to the product f*g: the result is correctly rounded, +// but not normalized. +func (f *extFloat) Multiply(g extFloat) { + fhi, flo := f.mant>>32, uint64(uint32(f.mant)) + ghi, glo := g.mant>>32, uint64(uint32(g.mant)) + + // Cross products. + cross1 := fhi * glo + cross2 := flo * ghi + + // f.mant*g.mant is fhi*ghi << 64 + (cross1+cross2) << 32 + flo*glo + f.mant = fhi*ghi + (cross1 >> 32) + (cross2 >> 32) + rem := uint64(uint32(cross1)) + uint64(uint32(cross2)) + ((flo * glo) >> 32) + // Round up. + rem += (1 << 31) + + f.mant += (rem >> 32) + f.exp = f.exp + g.exp + 64 +} + +var uint64pow10 = [...]uint64{ + 1, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, + 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, +} + +// AssignDecimal sets f to an approximate value mantissa*10^exp. It +// returns true if the value represented by f is guaranteed to be the +// best approximation of d after being rounded to a float64 or +// float32 depending on flt. +func (f *extFloat) AssignDecimal(mantissa uint64, exp10 int, neg bool, trunc bool, flt *floatInfo) (ok bool) { + const uint64digits = 19 + const errorscale = 8 + errors := 0 // An upper bound for error, computed in errorscale*ulp. + if trunc { + // the decimal number was truncated. + errors += errorscale / 2 + } + + f.mant = mantissa + f.exp = 0 + f.neg = neg + + // Multiply by powers of ten. + i := (exp10 - firstPowerOfTen) / stepPowerOfTen + if exp10 < firstPowerOfTen || i >= len(powersOfTen) { + return false + } + adjExp := (exp10 - firstPowerOfTen) % stepPowerOfTen + + // We multiply by exp%step + if adjExp < uint64digits && mantissa < uint64pow10[uint64digits-adjExp] { + // We can multiply the mantissa exactly. + f.mant *= uint64pow10[adjExp] + f.Normalize() + } else { + f.Normalize() + f.Multiply(smallPowersOfTen[adjExp]) + errors += errorscale / 2 + } + + // We multiply by 10 to the exp - exp%step. + f.Multiply(powersOfTen[i]) + if errors > 0 { + errors += 1 + } + errors += errorscale / 2 + + // Normalize + shift := f.Normalize() + errors <<= shift + + // Now f is a good approximation of the decimal. + // Check whether the error is too large: that is, if the mantissa + // is perturbated by the error, the resulting float64 will change. + // The 64 bits mantissa is 1 + 52 bits for float64 + 11 extra bits. + // + // In many cases the approximation will be good enough. + denormalExp := flt.bias - 63 + var extrabits uint + if f.exp <= denormalExp { + // f.mant * 2^f.exp is smaller than 2^(flt.bias+1). + extrabits = uint(63 - flt.mantbits + 1 + uint(denormalExp-f.exp)) + } else { + extrabits = uint(63 - flt.mantbits) + } + + halfway := uint64(1) << (extrabits - 1) + mant_extra := f.mant & (1< expMax: + i-- + default: + break Loop + } + } + // Apply the desired decimal shift on f. It will have exponent + // in the desired range. This is multiplication by 10^-exp10. + f.Multiply(powersOfTen[i]) + + return -(firstPowerOfTen + i*stepPowerOfTen), i +} + +// frexp10Many applies a common shift by a power of ten to a, b, c. +func frexp10Many(a, b, c *extFloat) (exp10 int) { + exp10, i := c.frexp10() + a.Multiply(powersOfTen[i]) + b.Multiply(powersOfTen[i]) + return +} + +// FixedDecimal stores in d the first n significant digits +// of the decimal representation of f. It returns false +// if it cannot be sure of the answer. +func (f *extFloat) FixedDecimal(d *decimalSlice, n int) bool { + if f.mant == 0 { + d.nd = 0 + d.dp = 0 + d.neg = f.neg + return true + } + if n == 0 { + panic("strconv: internal error: extFloat.FixedDecimal called with n == 0") + } + // Multiply by an appropriate power of ten to have a reasonable + // number to process. + f.Normalize() + exp10, _ := f.frexp10() + + shift := uint(-f.exp) + integer := uint32(f.mant >> shift) + fraction := f.mant - (uint64(integer) << shift) + ε := uint64(1) // ε is the uncertainty we have on the mantissa of f. + + // Write exactly n digits to d. + needed := n // how many digits are left to write. + integerDigits := 0 // the number of decimal digits of integer. + pow10 := uint64(1) // the power of ten by which f was scaled. + for i, pow := 0, uint64(1); i < 20; i++ { + if pow > uint64(integer) { + integerDigits = i + break + } + pow *= 10 + } + rest := integer + if integerDigits > needed { + // the integral part is already large, trim the last digits. + pow10 = uint64pow10[integerDigits-needed] + integer /= uint32(pow10) + rest -= integer * uint32(pow10) + } else { + rest = 0 + } + + // Write the digits of integer: the digits of rest are omitted. + var buf [32]byte + pos := len(buf) + for v := integer; v > 0; { + v1 := v / 10 + v -= 10 * v1 + pos-- + buf[pos] = byte(v + '0') + v = v1 + } + for i := pos; i < len(buf); i++ { + d.d[i-pos] = buf[i] + } + nd := len(buf) - pos + d.nd = nd + d.dp = integerDigits + exp10 + needed -= nd + + if needed > 0 { + if rest != 0 || pow10 != 1 { + panic("strconv: internal error, rest != 0 but needed > 0") + } + // Emit digits for the fractional part. Each time, 10*fraction + // fits in a uint64 without overflow. + for needed > 0 { + fraction *= 10 + ε *= 10 // the uncertainty scales as we multiply by ten. + if 2*ε > 1<> shift + d.d[nd] = byte(digit + '0') + fraction -= digit << shift + nd++ + needed-- + } + d.nd = nd + } + + // We have written a truncation of f (a numerator / 10^d.dp). The remaining part + // can be interpreted as a small number (< 1) to be added to the last digit of the + // numerator. + // + // If rest > 0, the amount is: + // (rest< 0 guarantees that pow10 << shift does not overflow a uint64. + // + // If rest = 0, pow10 == 1 and the amount is + // fraction / (1 << shift) + // fraction being known with a ±ε uncertainty. + // + // We pass this information to the rounding routine for adjustment. + + ok := adjustLastDigitFixed(d, uint64(rest)<= 0; i-- { + if d.d[i] != '0' { + d.nd = i + 1 + break + } + } + return true +} + +// adjustLastDigitFixed assumes d contains the representation of the integral part +// of some number, whose fractional part is num / (den << shift). The numerator +// num is only known up to an uncertainty of size ε, assumed to be less than +// (den << shift)/2. +// +// It will increase the last digit by one to account for correct rounding, typically +// when the fractional part is greater than 1/2, and will return false if ε is such +// that no correct answer can be given. +func adjustLastDigitFixed(d *decimalSlice, num, den uint64, shift uint, ε uint64) bool { + if num > den< den< den< (den< den<= 0; i-- { + if d.d[i] == '9' { + d.nd-- + } else { + break + } + } + if i < 0 { + d.d[0] = '1' + d.nd = 1 + d.dp++ + } else { + d.d[i]++ + } + return true + } + return false +} + +// ShortestDecimal stores in d the shortest decimal representation of f +// which belongs to the open interval (lower, upper), where f is supposed +// to lie. It returns false whenever the result is unsure. The implementation +// uses the Grisu3 algorithm. +func (f *extFloat) ShortestDecimal(d *decimalSlice, lower, upper *extFloat) bool { + if f.mant == 0 { + d.nd = 0 + d.dp = 0 + d.neg = f.neg + return true + } + if f.exp == 0 && *lower == *f && *lower == *upper { + // an exact integer. + var buf [24]byte + n := len(buf) - 1 + for v := f.mant; v > 0; { + v1 := v / 10 + v -= 10 * v1 + buf[n] = byte(v + '0') + n-- + v = v1 + } + nd := len(buf) - n - 1 + for i := 0; i < nd; i++ { + d.d[i] = buf[n+1+i] + } + d.nd, d.dp = nd, nd + for d.nd > 0 && d.d[d.nd-1] == '0' { + d.nd-- + } + if d.nd == 0 { + d.dp = 0 + } + d.neg = f.neg + return true + } + upper.Normalize() + // Uniformize exponents. + if f.exp > upper.exp { + f.mant <<= uint(f.exp - upper.exp) + f.exp = upper.exp + } + if lower.exp > upper.exp { + lower.mant <<= uint(lower.exp - upper.exp) + lower.exp = upper.exp + } + + exp10 := frexp10Many(lower, f, upper) + // Take a safety margin due to rounding in frexp10Many, but we lose precision. + upper.mant++ + lower.mant-- + + // The shortest representation of f is either rounded up or down, but + // in any case, it is a truncation of upper. + shift := uint(-upper.exp) + integer := uint32(upper.mant >> shift) + fraction := upper.mant - (uint64(integer) << shift) + + // How far we can go down from upper until the result is wrong. + allowance := upper.mant - lower.mant + // How far we should go to get a very precise result. + targetDiff := upper.mant - f.mant + + // Count integral digits: there are at most 10. + var integerDigits int + for i, pow := 0, uint64(1); i < 20; i++ { + if pow > uint64(integer) { + integerDigits = i + break + } + pow *= 10 + } + for i := 0; i < integerDigits; i++ { + pow := uint64pow10[integerDigits-i-1] + digit := integer / uint32(pow) + d.d[i] = byte(digit + '0') + integer -= digit * uint32(pow) + // evaluate whether we should stop. + if currentDiff := uint64(integer)<> shift) + d.d[d.nd] = byte(digit + '0') + d.nd++ + fraction -= uint64(digit) << shift + if fraction < allowance*multiplier { + // We are in the admissible range. Note that if allowance is about to + // overflow, that is, allowance > 2^64/10, the condition is automatically + // true due to the limited range of fraction. + return adjustLastDigit(d, + fraction, targetDiff*multiplier, allowance*multiplier, + 1< maxDiff-ulpBinary { + // we went too far + return false + } + if d.nd == 1 && d.d[0] == '0' { + // the number has actually reached zero. + d.nd = 0 + d.dp = 0 + } + return true +} diff --git a/vendor/github.com/pquerna/ffjson/fflib/v1/fold.go b/vendor/github.com/pquerna/ffjson/fflib/v1/fold.go new file mode 100644 index 00000000..4d33e6f7 --- /dev/null +++ b/vendor/github.com/pquerna/ffjson/fflib/v1/fold.go @@ -0,0 +1,121 @@ +/** + * Copyright 2014 Paul Querna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +/* Portions of this file are on Go stdlib's encoding/json/fold.go */ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package v1 + +import ( + "unicode/utf8" +) + +const ( + caseMask = ^byte(0x20) // Mask to ignore case in ASCII. + kelvin = '\u212a' + smallLongEss = '\u017f' +) + +// equalFoldRight is a specialization of bytes.EqualFold when s is +// known to be all ASCII (including punctuation), but contains an 's', +// 'S', 'k', or 'K', requiring a Unicode fold on the bytes in t. +// See comments on foldFunc. +func EqualFoldRight(s, t []byte) bool { + for _, sb := range s { + if len(t) == 0 { + return false + } + tb := t[0] + if tb < utf8.RuneSelf { + if sb != tb { + sbUpper := sb & caseMask + if 'A' <= sbUpper && sbUpper <= 'Z' { + if sbUpper != tb&caseMask { + return false + } + } else { + return false + } + } + t = t[1:] + continue + } + // sb is ASCII and t is not. t must be either kelvin + // sign or long s; sb must be s, S, k, or K. + tr, size := utf8.DecodeRune(t) + switch sb { + case 's', 'S': + if tr != smallLongEss { + return false + } + case 'k', 'K': + if tr != kelvin { + return false + } + default: + return false + } + t = t[size:] + + } + if len(t) > 0 { + return false + } + return true +} + +// asciiEqualFold is a specialization of bytes.EqualFold for use when +// s is all ASCII (but may contain non-letters) and contains no +// special-folding letters. +// See comments on foldFunc. +func AsciiEqualFold(s, t []byte) bool { + if len(s) != len(t) { + return false + } + for i, sb := range s { + tb := t[i] + if sb == tb { + continue + } + if ('a' <= sb && sb <= 'z') || ('A' <= sb && sb <= 'Z') { + if sb&caseMask != tb&caseMask { + return false + } + } else { + return false + } + } + return true +} + +// simpleLetterEqualFold is a specialization of bytes.EqualFold for +// use when s is all ASCII letters (no underscores, etc) and also +// doesn't contain 'k', 'K', 's', or 'S'. +// See comments on foldFunc. +func SimpleLetterEqualFold(s, t []byte) bool { + if len(s) != len(t) { + return false + } + for i, b := range s { + if b&caseMask != t[i]&caseMask { + return false + } + } + return true +} diff --git a/vendor/github.com/pquerna/ffjson/fflib/v1/ftoa.go b/vendor/github.com/pquerna/ffjson/fflib/v1/ftoa.go new file mode 100644 index 00000000..360d6dbc --- /dev/null +++ b/vendor/github.com/pquerna/ffjson/fflib/v1/ftoa.go @@ -0,0 +1,542 @@ +package v1 + +/** + * Copyright 2015 Paul Querna, Klaus Post + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +/* Most of this file are on Go stdlib's strconv/ftoa.go */ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +import "math" + +// TODO: move elsewhere? +type floatInfo struct { + mantbits uint + expbits uint + bias int +} + +var optimize = true // can change for testing + +var float32info = floatInfo{23, 8, -127} +var float64info = floatInfo{52, 11, -1023} + +// AppendFloat appends the string form of the floating-point number f, +// as generated by FormatFloat +func AppendFloat(dst EncodingBuffer, val float64, fmt byte, prec, bitSize int) { + var bits uint64 + var flt *floatInfo + switch bitSize { + case 32: + bits = uint64(math.Float32bits(float32(val))) + flt = &float32info + case 64: + bits = math.Float64bits(val) + flt = &float64info + default: + panic("strconv: illegal AppendFloat/FormatFloat bitSize") + } + + neg := bits>>(flt.expbits+flt.mantbits) != 0 + exp := int(bits>>flt.mantbits) & (1< digs.nd && digs.nd >= digs.dp { + eprec = digs.nd + } + // %e is used if the exponent from the conversion + // is less than -4 or greater than or equal to the precision. + // if precision was the shortest possible, use precision 6 for this decision. + if shortest { + eprec = 6 + } + exp := digs.dp - 1 + if exp < -4 || exp >= eprec { + if prec > digs.nd { + prec = digs.nd + } + fmtE(dst, neg, digs, prec-1, fmt+'e'-'g') + return + } + if prec > digs.dp { + prec = digs.nd + } + fmtF(dst, neg, digs, max(prec-digs.dp, 0)) + return + } + + // unknown format + dst.Write([]byte{'%', fmt}) + return +} + +// Round d (= mant * 2^exp) to the shortest number of digits +// that will let the original floating point value be precisely +// reconstructed. Size is original floating point size (64 or 32). +func roundShortest(d *decimal, mant uint64, exp int, flt *floatInfo) { + // If mantissa is zero, the number is zero; stop now. + if mant == 0 { + d.nd = 0 + return + } + + // Compute upper and lower such that any decimal number + // between upper and lower (possibly inclusive) + // will round to the original floating point number. + + // We may see at once that the number is already shortest. + // + // Suppose d is not denormal, so that 2^exp <= d < 10^dp. + // The closest shorter number is at least 10^(dp-nd) away. + // The lower/upper bounds computed below are at distance + // at most 2^(exp-mantbits). + // + // So the number is already shortest if 10^(dp-nd) > 2^(exp-mantbits), + // or equivalently log2(10)*(dp-nd) > exp-mantbits. + // It is true if 332/100*(dp-nd) >= exp-mantbits (log2(10) > 3.32). + minexp := flt.bias + 1 // minimum possible exponent + if exp > minexp && 332*(d.dp-d.nd) >= 100*(exp-int(flt.mantbits)) { + // The number is already shortest. + return + } + + // d = mant << (exp - mantbits) + // Next highest floating point number is mant+1 << exp-mantbits. + // Our upper bound is halfway between, mant*2+1 << exp-mantbits-1. + upper := new(decimal) + upper.Assign(mant*2 + 1) + upper.Shift(exp - int(flt.mantbits) - 1) + + // d = mant << (exp - mantbits) + // Next lowest floating point number is mant-1 << exp-mantbits, + // unless mant-1 drops the significant bit and exp is not the minimum exp, + // in which case the next lowest is mant*2-1 << exp-mantbits-1. + // Either way, call it mantlo << explo-mantbits. + // Our lower bound is halfway between, mantlo*2+1 << explo-mantbits-1. + var mantlo uint64 + var explo int + if mant > 1< 0 { + dst.WriteByte('.') + i := 1 + m := min(d.nd, prec+1) + if i < m { + dst.Write(d.d[i:m]) + i = m + } + for i <= prec { + dst.WriteByte('0') + i++ + } + } + + // e± + dst.WriteByte(fmt) + exp := d.dp - 1 + if d.nd == 0 { // special case: 0 has exponent 0 + exp = 0 + } + if exp < 0 { + ch = '-' + exp = -exp + } else { + ch = '+' + } + dst.WriteByte(ch) + + // dd or ddd + switch { + case exp < 10: + dst.WriteByte('0') + dst.WriteByte(byte(exp) + '0') + case exp < 100: + dst.WriteByte(byte(exp/10) + '0') + dst.WriteByte(byte(exp%10) + '0') + default: + dst.WriteByte(byte(exp/100) + '0') + dst.WriteByte(byte(exp/10)%10 + '0') + dst.WriteByte(byte(exp%10) + '0') + } + + return +} + +// %f: -ddddddd.ddddd +func fmtF(dst EncodingBuffer, neg bool, d decimalSlice, prec int) { + // sign + if neg { + dst.WriteByte('-') + } + + // integer, padded with zeros as needed. + if d.dp > 0 { + m := min(d.nd, d.dp) + dst.Write(d.d[:m]) + for ; m < d.dp; m++ { + dst.WriteByte('0') + } + } else { + dst.WriteByte('0') + } + + // fraction + if prec > 0 { + dst.WriteByte('.') + for i := 0; i < prec; i++ { + ch := byte('0') + if j := d.dp + i; 0 <= j && j < d.nd { + ch = d.d[j] + } + dst.WriteByte(ch) + } + } + + return +} + +// %b: -ddddddddp±ddd +func fmtB(dst EncodingBuffer, neg bool, mant uint64, exp int, flt *floatInfo) { + // sign + if neg { + dst.WriteByte('-') + } + + // mantissa + formatBits(dst, mant, 10, false) + + // p + dst.WriteByte('p') + + // ±exponent + exp -= int(flt.mantbits) + if exp >= 0 { + dst.WriteByte('+') + } + formatBits(dst, uint64(exp), 10, exp < 0) + + return +} + +func min(a, b int) int { + if a < b { + return a + } + return b +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} + +// formatBits computes the string representation of u in the given base. +// If neg is set, u is treated as negative int64 value. +func formatBits(dst EncodingBuffer, u uint64, base int, neg bool) { + if base < 2 || base > len(digits) { + panic("strconv: illegal AppendInt/FormatInt base") + } + // 2 <= base && base <= len(digits) + + var a [64 + 1]byte // +1 for sign of 64bit value in base 2 + i := len(a) + + if neg { + u = -u + } + + // convert bits + if base == 10 { + // common case: use constants for / because + // the compiler can optimize it into a multiply+shift + + if ^uintptr(0)>>32 == 0 { + for u > uint64(^uintptr(0)) { + q := u / 1e9 + us := uintptr(u - q*1e9) // us % 1e9 fits into a uintptr + for j := 9; j > 0; j-- { + i-- + qs := us / 10 + a[i] = byte(us - qs*10 + '0') + us = qs + } + u = q + } + } + + // u guaranteed to fit into a uintptr + us := uintptr(u) + for us >= 10 { + i-- + q := us / 10 + a[i] = byte(us - q*10 + '0') + us = q + } + // u < 10 + i-- + a[i] = byte(us + '0') + + } else if s := shifts[base]; s > 0 { + // base is power of 2: use shifts and masks instead of / and % + b := uint64(base) + m := uintptr(b) - 1 // == 1<= b { + i-- + a[i] = digits[uintptr(u)&m] + u >>= s + } + // u < base + i-- + a[i] = digits[uintptr(u)] + + } else { + // general case + b := uint64(base) + for u >= b { + i-- + q := u / b + a[i] = digits[uintptr(u-q*b)] + u = q + } + // u < base + i-- + a[i] = digits[uintptr(u)] + } + + // add sign, if any + if neg { + i-- + a[i] = '-' + } + + dst.Write(a[i:]) +} diff --git a/vendor/github.com/pquerna/ffjson/fflib/v1/internal/atof.go b/vendor/github.com/pquerna/ffjson/fflib/v1/internal/atof.go new file mode 100644 index 00000000..46c1289e --- /dev/null +++ b/vendor/github.com/pquerna/ffjson/fflib/v1/internal/atof.go @@ -0,0 +1,936 @@ +/** + * Copyright 2014 Paul Querna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +/* Portions of this file are on Go stdlib's strconv/atof.go */ + +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package internal + +// decimal to binary floating point conversion. +// Algorithm: +// 1) Store input in multiprecision decimal. +// 2) Multiply/divide decimal by powers of two until in range [0.5, 1) +// 3) Multiply by 2^precision and round to get mantissa. + +import "math" + +var optimize = true // can change for testing + +func equalIgnoreCase(s1 []byte, s2 []byte) bool { + if len(s1) != len(s2) { + return false + } + for i := 0; i < len(s1); i++ { + c1 := s1[i] + if 'A' <= c1 && c1 <= 'Z' { + c1 += 'a' - 'A' + } + c2 := s2[i] + if 'A' <= c2 && c2 <= 'Z' { + c2 += 'a' - 'A' + } + if c1 != c2 { + return false + } + } + return true +} + +func special(s []byte) (f float64, ok bool) { + if len(s) == 0 { + return + } + switch s[0] { + default: + return + case '+': + if equalIgnoreCase(s, []byte("+inf")) || equalIgnoreCase(s, []byte("+infinity")) { + return math.Inf(1), true + } + case '-': + if equalIgnoreCase(s, []byte("-inf")) || equalIgnoreCase(s, []byte("-infinity")) { + return math.Inf(-1), true + } + case 'n', 'N': + if equalIgnoreCase(s, []byte("nan")) { + return math.NaN(), true + } + case 'i', 'I': + if equalIgnoreCase(s, []byte("inf")) || equalIgnoreCase(s, []byte("infinity")) { + return math.Inf(1), true + } + } + return +} + +func (b *decimal) set(s []byte) (ok bool) { + i := 0 + b.neg = false + b.trunc = false + + // optional sign + if i >= len(s) { + return + } + switch { + case s[i] == '+': + i++ + case s[i] == '-': + b.neg = true + i++ + } + + // digits + sawdot := false + sawdigits := false + for ; i < len(s); i++ { + switch { + case s[i] == '.': + if sawdot { + return + } + sawdot = true + b.dp = b.nd + continue + + case '0' <= s[i] && s[i] <= '9': + sawdigits = true + if s[i] == '0' && b.nd == 0 { // ignore leading zeros + b.dp-- + continue + } + if b.nd < len(b.d) { + b.d[b.nd] = s[i] + b.nd++ + } else if s[i] != '0' { + b.trunc = true + } + continue + } + break + } + if !sawdigits { + return + } + if !sawdot { + b.dp = b.nd + } + + // optional exponent moves decimal point. + // if we read a very large, very long number, + // just be sure to move the decimal point by + // a lot (say, 100000). it doesn't matter if it's + // not the exact number. + if i < len(s) && (s[i] == 'e' || s[i] == 'E') { + i++ + if i >= len(s) { + return + } + esign := 1 + if s[i] == '+' { + i++ + } else if s[i] == '-' { + i++ + esign = -1 + } + if i >= len(s) || s[i] < '0' || s[i] > '9' { + return + } + e := 0 + for ; i < len(s) && '0' <= s[i] && s[i] <= '9'; i++ { + if e < 10000 { + e = e*10 + int(s[i]) - '0' + } + } + b.dp += e * esign + } + + if i != len(s) { + return + } + + ok = true + return +} + +// readFloat reads a decimal mantissa and exponent from a float +// string representation. It sets ok to false if the number could +// not fit return types or is invalid. +func readFloat(s []byte) (mantissa uint64, exp int, neg, trunc, ok bool) { + const uint64digits = 19 + i := 0 + + // optional sign + if i >= len(s) { + return + } + switch { + case s[i] == '+': + i++ + case s[i] == '-': + neg = true + i++ + } + + // digits + sawdot := false + sawdigits := false + nd := 0 + ndMant := 0 + dp := 0 + for ; i < len(s); i++ { + switch c := s[i]; true { + case c == '.': + if sawdot { + return + } + sawdot = true + dp = nd + continue + + case '0' <= c && c <= '9': + sawdigits = true + if c == '0' && nd == 0 { // ignore leading zeros + dp-- + continue + } + nd++ + if ndMant < uint64digits { + mantissa *= 10 + mantissa += uint64(c - '0') + ndMant++ + } else if s[i] != '0' { + trunc = true + } + continue + } + break + } + if !sawdigits { + return + } + if !sawdot { + dp = nd + } + + // optional exponent moves decimal point. + // if we read a very large, very long number, + // just be sure to move the decimal point by + // a lot (say, 100000). it doesn't matter if it's + // not the exact number. + if i < len(s) && (s[i] == 'e' || s[i] == 'E') { + i++ + if i >= len(s) { + return + } + esign := 1 + if s[i] == '+' { + i++ + } else if s[i] == '-' { + i++ + esign = -1 + } + if i >= len(s) || s[i] < '0' || s[i] > '9' { + return + } + e := 0 + for ; i < len(s) && '0' <= s[i] && s[i] <= '9'; i++ { + if e < 10000 { + e = e*10 + int(s[i]) - '0' + } + } + dp += e * esign + } + + if i != len(s) { + return + } + + exp = dp - ndMant + ok = true + return + +} + +// decimal power of ten to binary power of two. +var powtab = []int{1, 3, 6, 9, 13, 16, 19, 23, 26} + +func (d *decimal) floatBits(flt *floatInfo) (b uint64, overflow bool) { + var exp int + var mant uint64 + + // Zero is always a special case. + if d.nd == 0 { + mant = 0 + exp = flt.bias + goto out + } + + // Obvious overflow/underflow. + // These bounds are for 64-bit floats. + // Will have to change if we want to support 80-bit floats in the future. + if d.dp > 310 { + goto overflow + } + if d.dp < -330 { + // zero + mant = 0 + exp = flt.bias + goto out + } + + // Scale by powers of two until in range [0.5, 1.0) + exp = 0 + for d.dp > 0 { + var n int + if d.dp >= len(powtab) { + n = 27 + } else { + n = powtab[d.dp] + } + d.Shift(-n) + exp += n + } + for d.dp < 0 || d.dp == 0 && d.d[0] < '5' { + var n int + if -d.dp >= len(powtab) { + n = 27 + } else { + n = powtab[-d.dp] + } + d.Shift(n) + exp -= n + } + + // Our range is [0.5,1) but floating point range is [1,2). + exp-- + + // Minimum representable exponent is flt.bias+1. + // If the exponent is smaller, move it up and + // adjust d accordingly. + if exp < flt.bias+1 { + n := flt.bias + 1 - exp + d.Shift(-n) + exp += n + } + + if exp-flt.bias >= 1<>= 1 + exp++ + if exp-flt.bias >= 1<>float64info.mantbits != 0 { + return + } + f = float64(mantissa) + if neg { + f = -f + } + switch { + case exp == 0: + // an integer. + return f, true + // Exact integers are <= 10^15. + // Exact powers of ten are <= 10^22. + case exp > 0 && exp <= 15+22: // int * 10^k + // If exponent is big but number of digits is not, + // can move a few zeros into the integer part. + if exp > 22 { + f *= float64pow10[exp-22] + exp = 22 + } + if f > 1e15 || f < -1e15 { + // the exponent was really too large. + return + } + return f * float64pow10[exp], true + case exp < 0 && exp >= -22: // int / 10^k + return f / float64pow10[-exp], true + } + return +} + +// If possible to compute mantissa*10^exp to 32-bit float f exactly, +// entirely in floating-point math, do so, avoiding the machinery above. +func atof32exact(mantissa uint64, exp int, neg bool) (f float32, ok bool) { + if mantissa>>float32info.mantbits != 0 { + return + } + f = float32(mantissa) + if neg { + f = -f + } + switch { + case exp == 0: + return f, true + // Exact integers are <= 10^7. + // Exact powers of ten are <= 10^10. + case exp > 0 && exp <= 7+10: // int * 10^k + // If exponent is big but number of digits is not, + // can move a few zeros into the integer part. + if exp > 10 { + f *= float32pow10[exp-10] + exp = 10 + } + if f > 1e7 || f < -1e7 { + // the exponent was really too large. + return + } + return f * float32pow10[exp], true + case exp < 0 && exp >= -10: // int / 10^k + return f / float32pow10[-exp], true + } + return +} + +const fnParseFloat = "ParseFloat" + +func atof32(s []byte) (f float32, err error) { + if val, ok := special(s); ok { + return float32(val), nil + } + + if optimize { + // Parse mantissa and exponent. + mantissa, exp, neg, trunc, ok := readFloat(s) + if ok { + // Try pure floating-point arithmetic conversion. + if !trunc { + if f, ok := atof32exact(mantissa, exp, neg); ok { + return f, nil + } + } + // Try another fast path. + ext := new(extFloat) + if ok := ext.AssignDecimal(mantissa, exp, neg, trunc, &float32info); ok { + b, ovf := ext.floatBits(&float32info) + f = math.Float32frombits(uint32(b)) + if ovf { + err = rangeError(fnParseFloat, string(s)) + } + return f, err + } + } + } + var d decimal + if !d.set(s) { + return 0, syntaxError(fnParseFloat, string(s)) + } + b, ovf := d.floatBits(&float32info) + f = math.Float32frombits(uint32(b)) + if ovf { + err = rangeError(fnParseFloat, string(s)) + } + return f, err +} + +func atof64(s []byte) (f float64, err error) { + if val, ok := special(s); ok { + return val, nil + } + + if optimize { + // Parse mantissa and exponent. + mantissa, exp, neg, trunc, ok := readFloat(s) + if ok { + // Try pure floating-point arithmetic conversion. + if !trunc { + if f, ok := atof64exact(mantissa, exp, neg); ok { + return f, nil + } + } + // Try another fast path. + ext := new(extFloat) + if ok := ext.AssignDecimal(mantissa, exp, neg, trunc, &float64info); ok { + b, ovf := ext.floatBits(&float64info) + f = math.Float64frombits(b) + if ovf { + err = rangeError(fnParseFloat, string(s)) + } + return f, err + } + } + } + var d decimal + if !d.set(s) { + return 0, syntaxError(fnParseFloat, string(s)) + } + b, ovf := d.floatBits(&float64info) + f = math.Float64frombits(b) + if ovf { + err = rangeError(fnParseFloat, string(s)) + } + return f, err +} + +// ParseFloat converts the string s to a floating-point number +// with the precision specified by bitSize: 32 for float32, or 64 for float64. +// When bitSize=32, the result still has type float64, but it will be +// convertible to float32 without changing its value. +// +// If s is well-formed and near a valid floating point number, +// ParseFloat returns the nearest floating point number rounded +// using IEEE754 unbiased rounding. +// +// The errors that ParseFloat returns have concrete type *NumError +// and include err.Num = s. +// +// If s is not syntactically well-formed, ParseFloat returns err.Err = ErrSyntax. +// +// If s is syntactically well-formed but is more than 1/2 ULP +// away from the largest floating point number of the given size, +// ParseFloat returns f = ±Inf, err.Err = ErrRange. +func ParseFloat(s []byte, bitSize int) (f float64, err error) { + if bitSize == 32 { + f1, err1 := atof32(s) + return float64(f1), err1 + } + f1, err1 := atof64(s) + return f1, err1 +} + +// oroginal: strconv/decimal.go, but not exported, and needed for PareFloat. + +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Multiprecision decimal numbers. +// For floating-point formatting only; not general purpose. +// Only operations are assign and (binary) left/right shift. +// Can do binary floating point in multiprecision decimal precisely +// because 2 divides 10; cannot do decimal floating point +// in multiprecision binary precisely. + +type decimal struct { + d [800]byte // digits + nd int // number of digits used + dp int // decimal point + neg bool + trunc bool // discarded nonzero digits beyond d[:nd] +} + +func (a *decimal) String() string { + n := 10 + a.nd + if a.dp > 0 { + n += a.dp + } + if a.dp < 0 { + n += -a.dp + } + + buf := make([]byte, n) + w := 0 + switch { + case a.nd == 0: + return "0" + + case a.dp <= 0: + // zeros fill space between decimal point and digits + buf[w] = '0' + w++ + buf[w] = '.' + w++ + w += digitZero(buf[w : w+-a.dp]) + w += copy(buf[w:], a.d[0:a.nd]) + + case a.dp < a.nd: + // decimal point in middle of digits + w += copy(buf[w:], a.d[0:a.dp]) + buf[w] = '.' + w++ + w += copy(buf[w:], a.d[a.dp:a.nd]) + + default: + // zeros fill space between digits and decimal point + w += copy(buf[w:], a.d[0:a.nd]) + w += digitZero(buf[w : w+a.dp-a.nd]) + } + return string(buf[0:w]) +} + +func digitZero(dst []byte) int { + for i := range dst { + dst[i] = '0' + } + return len(dst) +} + +// trim trailing zeros from number. +// (They are meaningless; the decimal point is tracked +// independent of the number of digits.) +func trim(a *decimal) { + for a.nd > 0 && a.d[a.nd-1] == '0' { + a.nd-- + } + if a.nd == 0 { + a.dp = 0 + } +} + +// Assign v to a. +func (a *decimal) Assign(v uint64) { + var buf [24]byte + + // Write reversed decimal in buf. + n := 0 + for v > 0 { + v1 := v / 10 + v -= 10 * v1 + buf[n] = byte(v + '0') + n++ + v = v1 + } + + // Reverse again to produce forward decimal in a.d. + a.nd = 0 + for n--; n >= 0; n-- { + a.d[a.nd] = buf[n] + a.nd++ + } + a.dp = a.nd + trim(a) +} + +// Maximum shift that we can do in one pass without overflow. +// Signed int has 31 bits, and we have to be able to accommodate 9<>k == 0; r++ { + if r >= a.nd { + if n == 0 { + // a == 0; shouldn't get here, but handle anyway. + a.nd = 0 + return + } + for n>>k == 0 { + n = n * 10 + r++ + } + break + } + c := int(a.d[r]) + n = n*10 + c - '0' + } + a.dp -= r - 1 + + // Pick up a digit, put down a digit. + for ; r < a.nd; r++ { + c := int(a.d[r]) + dig := n >> k + n -= dig << k + a.d[w] = byte(dig + '0') + w++ + n = n*10 + c - '0' + } + + // Put down extra digits. + for n > 0 { + dig := n >> k + n -= dig << k + if w < len(a.d) { + a.d[w] = byte(dig + '0') + w++ + } else if dig > 0 { + a.trunc = true + } + n = n * 10 + } + + a.nd = w + trim(a) +} + +// Cheat sheet for left shift: table indexed by shift count giving +// number of new digits that will be introduced by that shift. +// +// For example, leftcheats[4] = {2, "625"}. That means that +// if we are shifting by 4 (multiplying by 16), it will add 2 digits +// when the string prefix is "625" through "999", and one fewer digit +// if the string prefix is "000" through "624". +// +// Credit for this trick goes to Ken. + +type leftCheat struct { + delta int // number of new digits + cutoff string // minus one digit if original < a. +} + +var leftcheats = []leftCheat{ + // Leading digits of 1/2^i = 5^i. + // 5^23 is not an exact 64-bit floating point number, + // so have to use bc for the math. + /* + seq 27 | sed 's/^/5^/' | bc | + awk 'BEGIN{ print "\tleftCheat{ 0, \"\" }," } + { + log2 = log(2)/log(10) + printf("\tleftCheat{ %d, \"%s\" },\t// * %d\n", + int(log2*NR+1), $0, 2**NR) + }' + */ + {0, ""}, + {1, "5"}, // * 2 + {1, "25"}, // * 4 + {1, "125"}, // * 8 + {2, "625"}, // * 16 + {2, "3125"}, // * 32 + {2, "15625"}, // * 64 + {3, "78125"}, // * 128 + {3, "390625"}, // * 256 + {3, "1953125"}, // * 512 + {4, "9765625"}, // * 1024 + {4, "48828125"}, // * 2048 + {4, "244140625"}, // * 4096 + {4, "1220703125"}, // * 8192 + {5, "6103515625"}, // * 16384 + {5, "30517578125"}, // * 32768 + {5, "152587890625"}, // * 65536 + {6, "762939453125"}, // * 131072 + {6, "3814697265625"}, // * 262144 + {6, "19073486328125"}, // * 524288 + {7, "95367431640625"}, // * 1048576 + {7, "476837158203125"}, // * 2097152 + {7, "2384185791015625"}, // * 4194304 + {7, "11920928955078125"}, // * 8388608 + {8, "59604644775390625"}, // * 16777216 + {8, "298023223876953125"}, // * 33554432 + {8, "1490116119384765625"}, // * 67108864 + {9, "7450580596923828125"}, // * 134217728 +} + +// Is the leading prefix of b lexicographically less than s? +func prefixIsLessThan(b []byte, s string) bool { + for i := 0; i < len(s); i++ { + if i >= len(b) { + return true + } + if b[i] != s[i] { + return b[i] < s[i] + } + } + return false +} + +// Binary shift left (/ 2) by k bits. k <= maxShift to avoid overflow. +func leftShift(a *decimal, k uint) { + delta := leftcheats[k].delta + if prefixIsLessThan(a.d[0:a.nd], leftcheats[k].cutoff) { + delta-- + } + + r := a.nd // read index + w := a.nd + delta // write index + n := 0 + + // Pick up a digit, put down a digit. + for r--; r >= 0; r-- { + n += (int(a.d[r]) - '0') << k + quo := n / 10 + rem := n - 10*quo + w-- + if w < len(a.d) { + a.d[w] = byte(rem + '0') + } else if rem != 0 { + a.trunc = true + } + n = quo + } + + // Put down extra digits. + for n > 0 { + quo := n / 10 + rem := n - 10*quo + w-- + if w < len(a.d) { + a.d[w] = byte(rem + '0') + } else if rem != 0 { + a.trunc = true + } + n = quo + } + + a.nd += delta + if a.nd >= len(a.d) { + a.nd = len(a.d) + } + a.dp += delta + trim(a) +} + +// Binary shift left (k > 0) or right (k < 0). +func (a *decimal) Shift(k int) { + switch { + case a.nd == 0: + // nothing to do: a == 0 + case k > 0: + for k > maxShift { + leftShift(a, maxShift) + k -= maxShift + } + leftShift(a, uint(k)) + case k < 0: + for k < -maxShift { + rightShift(a, maxShift) + k += maxShift + } + rightShift(a, uint(-k)) + } +} + +// If we chop a at nd digits, should we round up? +func shouldRoundUp(a *decimal, nd int) bool { + if nd < 0 || nd >= a.nd { + return false + } + if a.d[nd] == '5' && nd+1 == a.nd { // exactly halfway - round to even + // if we truncated, a little higher than what's recorded - always round up + if a.trunc { + return true + } + return nd > 0 && (a.d[nd-1]-'0')%2 != 0 + } + // not halfway - digit tells all + return a.d[nd] >= '5' +} + +// Round a to nd digits (or fewer). +// If nd is zero, it means we're rounding +// just to the left of the digits, as in +// 0.09 -> 0.1. +func (a *decimal) Round(nd int) { + if nd < 0 || nd >= a.nd { + return + } + if shouldRoundUp(a, nd) { + a.RoundUp(nd) + } else { + a.RoundDown(nd) + } +} + +// Round a down to nd digits (or fewer). +func (a *decimal) RoundDown(nd int) { + if nd < 0 || nd >= a.nd { + return + } + a.nd = nd + trim(a) +} + +// Round a up to nd digits (or fewer). +func (a *decimal) RoundUp(nd int) { + if nd < 0 || nd >= a.nd { + return + } + + // round up + for i := nd - 1; i >= 0; i-- { + c := a.d[i] + if c < '9' { // can stop after this digit + a.d[i]++ + a.nd = i + 1 + return + } + } + + // Number is all 9s. + // Change to single 1 with adjusted decimal point. + a.d[0] = '1' + a.nd = 1 + a.dp++ +} + +// Extract integer part, rounded appropriately. +// No guarantees about overflow. +func (a *decimal) RoundedInteger() uint64 { + if a.dp > 20 { + return 0xFFFFFFFFFFFFFFFF + } + var i int + n := uint64(0) + for i = 0; i < a.dp && i < a.nd; i++ { + n = n*10 + uint64(a.d[i]-'0') + } + for ; i < a.dp; i++ { + n *= 10 + } + if shouldRoundUp(a, a.dp) { + n++ + } + return n +} diff --git a/vendor/github.com/pquerna/ffjson/fflib/v1/internal/atoi.go b/vendor/github.com/pquerna/ffjson/fflib/v1/internal/atoi.go new file mode 100644 index 00000000..06eb2ec2 --- /dev/null +++ b/vendor/github.com/pquerna/ffjson/fflib/v1/internal/atoi.go @@ -0,0 +1,213 @@ +/** + * Copyright 2014 Paul Querna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +/* Portions of this file are on Go stdlib's strconv/atoi.go */ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package internal + +import ( + "errors" + "strconv" +) + +// ErrRange indicates that a value is out of range for the target type. +var ErrRange = errors.New("value out of range") + +// ErrSyntax indicates that a value does not have the right syntax for the target type. +var ErrSyntax = errors.New("invalid syntax") + +// A NumError records a failed conversion. +type NumError struct { + Func string // the failing function (ParseBool, ParseInt, ParseUint, ParseFloat) + Num string // the input + Err error // the reason the conversion failed (ErrRange, ErrSyntax) +} + +func (e *NumError) Error() string { + return "strconv." + e.Func + ": " + "parsing " + strconv.Quote(e.Num) + ": " + e.Err.Error() +} + +func syntaxError(fn, str string) *NumError { + return &NumError{fn, str, ErrSyntax} +} + +func rangeError(fn, str string) *NumError { + return &NumError{fn, str, ErrRange} +} + +const intSize = 32 << uint(^uint(0)>>63) + +// IntSize is the size in bits of an int or uint value. +const IntSize = intSize + +// Return the first number n such that n*base >= 1<<64. +func cutoff64(base int) uint64 { + if base < 2 { + return 0 + } + return (1<<64-1)/uint64(base) + 1 +} + +// ParseUint is like ParseInt but for unsigned numbers, and oeprating on []byte +func ParseUint(s []byte, base int, bitSize int) (n uint64, err error) { + var cutoff, maxVal uint64 + + if bitSize == 0 { + bitSize = int(IntSize) + } + + s0 := s + switch { + case len(s) < 1: + err = ErrSyntax + goto Error + + case 2 <= base && base <= 36: + // valid base; nothing to do + + case base == 0: + // Look for octal, hex prefix. + switch { + case s[0] == '0' && len(s) > 1 && (s[1] == 'x' || s[1] == 'X'): + base = 16 + s = s[2:] + if len(s) < 1 { + err = ErrSyntax + goto Error + } + case s[0] == '0': + base = 8 + default: + base = 10 + } + + default: + err = errors.New("invalid base " + strconv.Itoa(base)) + goto Error + } + + n = 0 + cutoff = cutoff64(base) + maxVal = 1<= base { + n = 0 + err = ErrSyntax + goto Error + } + + if n >= cutoff { + // n*base overflows + n = 1<<64 - 1 + err = ErrRange + goto Error + } + n *= uint64(base) + + n1 := n + uint64(v) + if n1 < n || n1 > maxVal { + // n+v overflows + n = 1<<64 - 1 + err = ErrRange + goto Error + } + n = n1 + } + + return n, nil + +Error: + return n, &NumError{"ParseUint", string(s0), err} +} + +// ParseInt interprets a string s in the given base (2 to 36) and +// returns the corresponding value i. If base == 0, the base is +// implied by the string's prefix: base 16 for "0x", base 8 for +// "0", and base 10 otherwise. +// +// The bitSize argument specifies the integer type +// that the result must fit into. Bit sizes 0, 8, 16, 32, and 64 +// correspond to int, int8, int16, int32, and int64. +// +// The errors that ParseInt returns have concrete type *NumError +// and include err.Num = s. If s is empty or contains invalid +// digits, err.Err = ErrSyntax and the returned value is 0; +// if the value corresponding to s cannot be represented by a +// signed integer of the given size, err.Err = ErrRange and the +// returned value is the maximum magnitude integer of the +// appropriate bitSize and sign. +func ParseInt(s []byte, base int, bitSize int) (i int64, err error) { + const fnParseInt = "ParseInt" + + if bitSize == 0 { + bitSize = int(IntSize) + } + + // Empty string bad. + if len(s) == 0 { + return 0, syntaxError(fnParseInt, string(s)) + } + + // Pick off leading sign. + s0 := s + neg := false + if s[0] == '+' { + s = s[1:] + } else if s[0] == '-' { + neg = true + s = s[1:] + } + + // Convert unsigned and check range. + var un uint64 + un, err = ParseUint(s, base, bitSize) + if err != nil && err.(*NumError).Err != ErrRange { + err.(*NumError).Func = fnParseInt + err.(*NumError).Num = string(s0) + return 0, err + } + cutoff := uint64(1 << uint(bitSize-1)) + if !neg && un >= cutoff { + return int64(cutoff - 1), rangeError(fnParseInt, string(s0)) + } + if neg && un > cutoff { + return -int64(cutoff), rangeError(fnParseInt, string(s0)) + } + n := int64(un) + if neg { + n = -n + } + return n, nil +} diff --git a/vendor/github.com/pquerna/ffjson/fflib/v1/internal/extfloat.go b/vendor/github.com/pquerna/ffjson/fflib/v1/internal/extfloat.go new file mode 100644 index 00000000..ab791085 --- /dev/null +++ b/vendor/github.com/pquerna/ffjson/fflib/v1/internal/extfloat.go @@ -0,0 +1,668 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package internal + +// An extFloat represents an extended floating-point number, with more +// precision than a float64. It does not try to save bits: the +// number represented by the structure is mant*(2^exp), with a negative +// sign if neg is true. +type extFloat struct { + mant uint64 + exp int + neg bool +} + +// Powers of ten taken from double-conversion library. +// http://code.google.com/p/double-conversion/ +const ( + firstPowerOfTen = -348 + stepPowerOfTen = 8 +) + +var smallPowersOfTen = [...]extFloat{ + {1 << 63, -63, false}, // 1 + {0xa << 60, -60, false}, // 1e1 + {0x64 << 57, -57, false}, // 1e2 + {0x3e8 << 54, -54, false}, // 1e3 + {0x2710 << 50, -50, false}, // 1e4 + {0x186a0 << 47, -47, false}, // 1e5 + {0xf4240 << 44, -44, false}, // 1e6 + {0x989680 << 40, -40, false}, // 1e7 +} + +var powersOfTen = [...]extFloat{ + {0xfa8fd5a0081c0288, -1220, false}, // 10^-348 + {0xbaaee17fa23ebf76, -1193, false}, // 10^-340 + {0x8b16fb203055ac76, -1166, false}, // 10^-332 + {0xcf42894a5dce35ea, -1140, false}, // 10^-324 + {0x9a6bb0aa55653b2d, -1113, false}, // 10^-316 + {0xe61acf033d1a45df, -1087, false}, // 10^-308 + {0xab70fe17c79ac6ca, -1060, false}, // 10^-300 + {0xff77b1fcbebcdc4f, -1034, false}, // 10^-292 + {0xbe5691ef416bd60c, -1007, false}, // 10^-284 + {0x8dd01fad907ffc3c, -980, false}, // 10^-276 + {0xd3515c2831559a83, -954, false}, // 10^-268 + {0x9d71ac8fada6c9b5, -927, false}, // 10^-260 + {0xea9c227723ee8bcb, -901, false}, // 10^-252 + {0xaecc49914078536d, -874, false}, // 10^-244 + {0x823c12795db6ce57, -847, false}, // 10^-236 + {0xc21094364dfb5637, -821, false}, // 10^-228 + {0x9096ea6f3848984f, -794, false}, // 10^-220 + {0xd77485cb25823ac7, -768, false}, // 10^-212 + {0xa086cfcd97bf97f4, -741, false}, // 10^-204 + {0xef340a98172aace5, -715, false}, // 10^-196 + {0xb23867fb2a35b28e, -688, false}, // 10^-188 + {0x84c8d4dfd2c63f3b, -661, false}, // 10^-180 + {0xc5dd44271ad3cdba, -635, false}, // 10^-172 + {0x936b9fcebb25c996, -608, false}, // 10^-164 + {0xdbac6c247d62a584, -582, false}, // 10^-156 + {0xa3ab66580d5fdaf6, -555, false}, // 10^-148 + {0xf3e2f893dec3f126, -529, false}, // 10^-140 + {0xb5b5ada8aaff80b8, -502, false}, // 10^-132 + {0x87625f056c7c4a8b, -475, false}, // 10^-124 + {0xc9bcff6034c13053, -449, false}, // 10^-116 + {0x964e858c91ba2655, -422, false}, // 10^-108 + {0xdff9772470297ebd, -396, false}, // 10^-100 + {0xa6dfbd9fb8e5b88f, -369, false}, // 10^-92 + {0xf8a95fcf88747d94, -343, false}, // 10^-84 + {0xb94470938fa89bcf, -316, false}, // 10^-76 + {0x8a08f0f8bf0f156b, -289, false}, // 10^-68 + {0xcdb02555653131b6, -263, false}, // 10^-60 + {0x993fe2c6d07b7fac, -236, false}, // 10^-52 + {0xe45c10c42a2b3b06, -210, false}, // 10^-44 + {0xaa242499697392d3, -183, false}, // 10^-36 + {0xfd87b5f28300ca0e, -157, false}, // 10^-28 + {0xbce5086492111aeb, -130, false}, // 10^-20 + {0x8cbccc096f5088cc, -103, false}, // 10^-12 + {0xd1b71758e219652c, -77, false}, // 10^-4 + {0x9c40000000000000, -50, false}, // 10^4 + {0xe8d4a51000000000, -24, false}, // 10^12 + {0xad78ebc5ac620000, 3, false}, // 10^20 + {0x813f3978f8940984, 30, false}, // 10^28 + {0xc097ce7bc90715b3, 56, false}, // 10^36 + {0x8f7e32ce7bea5c70, 83, false}, // 10^44 + {0xd5d238a4abe98068, 109, false}, // 10^52 + {0x9f4f2726179a2245, 136, false}, // 10^60 + {0xed63a231d4c4fb27, 162, false}, // 10^68 + {0xb0de65388cc8ada8, 189, false}, // 10^76 + {0x83c7088e1aab65db, 216, false}, // 10^84 + {0xc45d1df942711d9a, 242, false}, // 10^92 + {0x924d692ca61be758, 269, false}, // 10^100 + {0xda01ee641a708dea, 295, false}, // 10^108 + {0xa26da3999aef774a, 322, false}, // 10^116 + {0xf209787bb47d6b85, 348, false}, // 10^124 + {0xb454e4a179dd1877, 375, false}, // 10^132 + {0x865b86925b9bc5c2, 402, false}, // 10^140 + {0xc83553c5c8965d3d, 428, false}, // 10^148 + {0x952ab45cfa97a0b3, 455, false}, // 10^156 + {0xde469fbd99a05fe3, 481, false}, // 10^164 + {0xa59bc234db398c25, 508, false}, // 10^172 + {0xf6c69a72a3989f5c, 534, false}, // 10^180 + {0xb7dcbf5354e9bece, 561, false}, // 10^188 + {0x88fcf317f22241e2, 588, false}, // 10^196 + {0xcc20ce9bd35c78a5, 614, false}, // 10^204 + {0x98165af37b2153df, 641, false}, // 10^212 + {0xe2a0b5dc971f303a, 667, false}, // 10^220 + {0xa8d9d1535ce3b396, 694, false}, // 10^228 + {0xfb9b7cd9a4a7443c, 720, false}, // 10^236 + {0xbb764c4ca7a44410, 747, false}, // 10^244 + {0x8bab8eefb6409c1a, 774, false}, // 10^252 + {0xd01fef10a657842c, 800, false}, // 10^260 + {0x9b10a4e5e9913129, 827, false}, // 10^268 + {0xe7109bfba19c0c9d, 853, false}, // 10^276 + {0xac2820d9623bf429, 880, false}, // 10^284 + {0x80444b5e7aa7cf85, 907, false}, // 10^292 + {0xbf21e44003acdd2d, 933, false}, // 10^300 + {0x8e679c2f5e44ff8f, 960, false}, // 10^308 + {0xd433179d9c8cb841, 986, false}, // 10^316 + {0x9e19db92b4e31ba9, 1013, false}, // 10^324 + {0xeb96bf6ebadf77d9, 1039, false}, // 10^332 + {0xaf87023b9bf0ee6b, 1066, false}, // 10^340 +} + +// floatBits returns the bits of the float64 that best approximates +// the extFloat passed as receiver. Overflow is set to true if +// the resulting float64 is ±Inf. +func (f *extFloat) floatBits(flt *floatInfo) (bits uint64, overflow bool) { + f.Normalize() + + exp := f.exp + 63 + + // Exponent too small. + if exp < flt.bias+1 { + n := flt.bias + 1 - exp + f.mant >>= uint(n) + exp += n + } + + // Extract 1+flt.mantbits bits from the 64-bit mantissa. + mant := f.mant >> (63 - flt.mantbits) + if f.mant&(1<<(62-flt.mantbits)) != 0 { + // Round up. + mant += 1 + } + + // Rounding might have added a bit; shift down. + if mant == 2<>= 1 + exp++ + } + + // Infinities. + if exp-flt.bias >= 1<>uint(-f.exp))<>= uint(-f.exp) + f.exp = 0 + return *f, *f + } + expBiased := exp - flt.bias + + upper = extFloat{mant: 2*f.mant + 1, exp: f.exp - 1, neg: f.neg} + if mant != 1<>(64-32) == 0 { + mant <<= 32 + exp -= 32 + } + if mant>>(64-16) == 0 { + mant <<= 16 + exp -= 16 + } + if mant>>(64-8) == 0 { + mant <<= 8 + exp -= 8 + } + if mant>>(64-4) == 0 { + mant <<= 4 + exp -= 4 + } + if mant>>(64-2) == 0 { + mant <<= 2 + exp -= 2 + } + if mant>>(64-1) == 0 { + mant <<= 1 + exp -= 1 + } + shift = uint(f.exp - exp) + f.mant, f.exp = mant, exp + return +} + +// Multiply sets f to the product f*g: the result is correctly rounded, +// but not normalized. +func (f *extFloat) Multiply(g extFloat) { + fhi, flo := f.mant>>32, uint64(uint32(f.mant)) + ghi, glo := g.mant>>32, uint64(uint32(g.mant)) + + // Cross products. + cross1 := fhi * glo + cross2 := flo * ghi + + // f.mant*g.mant is fhi*ghi << 64 + (cross1+cross2) << 32 + flo*glo + f.mant = fhi*ghi + (cross1 >> 32) + (cross2 >> 32) + rem := uint64(uint32(cross1)) + uint64(uint32(cross2)) + ((flo * glo) >> 32) + // Round up. + rem += (1 << 31) + + f.mant += (rem >> 32) + f.exp = f.exp + g.exp + 64 +} + +var uint64pow10 = [...]uint64{ + 1, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, + 1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, +} + +// AssignDecimal sets f to an approximate value mantissa*10^exp. It +// returns true if the value represented by f is guaranteed to be the +// best approximation of d after being rounded to a float64 or +// float32 depending on flt. +func (f *extFloat) AssignDecimal(mantissa uint64, exp10 int, neg bool, trunc bool, flt *floatInfo) (ok bool) { + const uint64digits = 19 + const errorscale = 8 + errors := 0 // An upper bound for error, computed in errorscale*ulp. + if trunc { + // the decimal number was truncated. + errors += errorscale / 2 + } + + f.mant = mantissa + f.exp = 0 + f.neg = neg + + // Multiply by powers of ten. + i := (exp10 - firstPowerOfTen) / stepPowerOfTen + if exp10 < firstPowerOfTen || i >= len(powersOfTen) { + return false + } + adjExp := (exp10 - firstPowerOfTen) % stepPowerOfTen + + // We multiply by exp%step + if adjExp < uint64digits && mantissa < uint64pow10[uint64digits-adjExp] { + // We can multiply the mantissa exactly. + f.mant *= uint64pow10[adjExp] + f.Normalize() + } else { + f.Normalize() + f.Multiply(smallPowersOfTen[adjExp]) + errors += errorscale / 2 + } + + // We multiply by 10 to the exp - exp%step. + f.Multiply(powersOfTen[i]) + if errors > 0 { + errors += 1 + } + errors += errorscale / 2 + + // Normalize + shift := f.Normalize() + errors <<= shift + + // Now f is a good approximation of the decimal. + // Check whether the error is too large: that is, if the mantissa + // is perturbated by the error, the resulting float64 will change. + // The 64 bits mantissa is 1 + 52 bits for float64 + 11 extra bits. + // + // In many cases the approximation will be good enough. + denormalExp := flt.bias - 63 + var extrabits uint + if f.exp <= denormalExp { + // f.mant * 2^f.exp is smaller than 2^(flt.bias+1). + extrabits = uint(63 - flt.mantbits + 1 + uint(denormalExp-f.exp)) + } else { + extrabits = uint(63 - flt.mantbits) + } + + halfway := uint64(1) << (extrabits - 1) + mant_extra := f.mant & (1< expMax: + i-- + default: + break Loop + } + } + // Apply the desired decimal shift on f. It will have exponent + // in the desired range. This is multiplication by 10^-exp10. + f.Multiply(powersOfTen[i]) + + return -(firstPowerOfTen + i*stepPowerOfTen), i +} + +// frexp10Many applies a common shift by a power of ten to a, b, c. +func frexp10Many(a, b, c *extFloat) (exp10 int) { + exp10, i := c.frexp10() + a.Multiply(powersOfTen[i]) + b.Multiply(powersOfTen[i]) + return +} + +// FixedDecimal stores in d the first n significant digits +// of the decimal representation of f. It returns false +// if it cannot be sure of the answer. +func (f *extFloat) FixedDecimal(d *decimalSlice, n int) bool { + if f.mant == 0 { + d.nd = 0 + d.dp = 0 + d.neg = f.neg + return true + } + if n == 0 { + panic("strconv: internal error: extFloat.FixedDecimal called with n == 0") + } + // Multiply by an appropriate power of ten to have a reasonable + // number to process. + f.Normalize() + exp10, _ := f.frexp10() + + shift := uint(-f.exp) + integer := uint32(f.mant >> shift) + fraction := f.mant - (uint64(integer) << shift) + ε := uint64(1) // ε is the uncertainty we have on the mantissa of f. + + // Write exactly n digits to d. + needed := n // how many digits are left to write. + integerDigits := 0 // the number of decimal digits of integer. + pow10 := uint64(1) // the power of ten by which f was scaled. + for i, pow := 0, uint64(1); i < 20; i++ { + if pow > uint64(integer) { + integerDigits = i + break + } + pow *= 10 + } + rest := integer + if integerDigits > needed { + // the integral part is already large, trim the last digits. + pow10 = uint64pow10[integerDigits-needed] + integer /= uint32(pow10) + rest -= integer * uint32(pow10) + } else { + rest = 0 + } + + // Write the digits of integer: the digits of rest are omitted. + var buf [32]byte + pos := len(buf) + for v := integer; v > 0; { + v1 := v / 10 + v -= 10 * v1 + pos-- + buf[pos] = byte(v + '0') + v = v1 + } + for i := pos; i < len(buf); i++ { + d.d[i-pos] = buf[i] + } + nd := len(buf) - pos + d.nd = nd + d.dp = integerDigits + exp10 + needed -= nd + + if needed > 0 { + if rest != 0 || pow10 != 1 { + panic("strconv: internal error, rest != 0 but needed > 0") + } + // Emit digits for the fractional part. Each time, 10*fraction + // fits in a uint64 without overflow. + for needed > 0 { + fraction *= 10 + ε *= 10 // the uncertainty scales as we multiply by ten. + if 2*ε > 1<> shift + d.d[nd] = byte(digit + '0') + fraction -= digit << shift + nd++ + needed-- + } + d.nd = nd + } + + // We have written a truncation of f (a numerator / 10^d.dp). The remaining part + // can be interpreted as a small number (< 1) to be added to the last digit of the + // numerator. + // + // If rest > 0, the amount is: + // (rest< 0 guarantees that pow10 << shift does not overflow a uint64. + // + // If rest = 0, pow10 == 1 and the amount is + // fraction / (1 << shift) + // fraction being known with a ±ε uncertainty. + // + // We pass this information to the rounding routine for adjustment. + + ok := adjustLastDigitFixed(d, uint64(rest)<= 0; i-- { + if d.d[i] != '0' { + d.nd = i + 1 + break + } + } + return true +} + +// adjustLastDigitFixed assumes d contains the representation of the integral part +// of some number, whose fractional part is num / (den << shift). The numerator +// num is only known up to an uncertainty of size ε, assumed to be less than +// (den << shift)/2. +// +// It will increase the last digit by one to account for correct rounding, typically +// when the fractional part is greater than 1/2, and will return false if ε is such +// that no correct answer can be given. +func adjustLastDigitFixed(d *decimalSlice, num, den uint64, shift uint, ε uint64) bool { + if num > den< den< den< (den< den<= 0; i-- { + if d.d[i] == '9' { + d.nd-- + } else { + break + } + } + if i < 0 { + d.d[0] = '1' + d.nd = 1 + d.dp++ + } else { + d.d[i]++ + } + return true + } + return false +} + +// ShortestDecimal stores in d the shortest decimal representation of f +// which belongs to the open interval (lower, upper), where f is supposed +// to lie. It returns false whenever the result is unsure. The implementation +// uses the Grisu3 algorithm. +func (f *extFloat) ShortestDecimal(d *decimalSlice, lower, upper *extFloat) bool { + if f.mant == 0 { + d.nd = 0 + d.dp = 0 + d.neg = f.neg + return true + } + if f.exp == 0 && *lower == *f && *lower == *upper { + // an exact integer. + var buf [24]byte + n := len(buf) - 1 + for v := f.mant; v > 0; { + v1 := v / 10 + v -= 10 * v1 + buf[n] = byte(v + '0') + n-- + v = v1 + } + nd := len(buf) - n - 1 + for i := 0; i < nd; i++ { + d.d[i] = buf[n+1+i] + } + d.nd, d.dp = nd, nd + for d.nd > 0 && d.d[d.nd-1] == '0' { + d.nd-- + } + if d.nd == 0 { + d.dp = 0 + } + d.neg = f.neg + return true + } + upper.Normalize() + // Uniformize exponents. + if f.exp > upper.exp { + f.mant <<= uint(f.exp - upper.exp) + f.exp = upper.exp + } + if lower.exp > upper.exp { + lower.mant <<= uint(lower.exp - upper.exp) + lower.exp = upper.exp + } + + exp10 := frexp10Many(lower, f, upper) + // Take a safety margin due to rounding in frexp10Many, but we lose precision. + upper.mant++ + lower.mant-- + + // The shortest representation of f is either rounded up or down, but + // in any case, it is a truncation of upper. + shift := uint(-upper.exp) + integer := uint32(upper.mant >> shift) + fraction := upper.mant - (uint64(integer) << shift) + + // How far we can go down from upper until the result is wrong. + allowance := upper.mant - lower.mant + // How far we should go to get a very precise result. + targetDiff := upper.mant - f.mant + + // Count integral digits: there are at most 10. + var integerDigits int + for i, pow := 0, uint64(1); i < 20; i++ { + if pow > uint64(integer) { + integerDigits = i + break + } + pow *= 10 + } + for i := 0; i < integerDigits; i++ { + pow := uint64pow10[integerDigits-i-1] + digit := integer / uint32(pow) + d.d[i] = byte(digit + '0') + integer -= digit * uint32(pow) + // evaluate whether we should stop. + if currentDiff := uint64(integer)<> shift) + d.d[d.nd] = byte(digit + '0') + d.nd++ + fraction -= uint64(digit) << shift + if fraction < allowance*multiplier { + // We are in the admissible range. Note that if allowance is about to + // overflow, that is, allowance > 2^64/10, the condition is automatically + // true due to the limited range of fraction. + return adjustLastDigit(d, + fraction, targetDiff*multiplier, allowance*multiplier, + 1< maxDiff-ulpBinary { + // we went too far + return false + } + if d.nd == 1 && d.d[0] == '0' { + // the number has actually reached zero. + d.nd = 0 + d.dp = 0 + } + return true +} diff --git a/vendor/github.com/pquerna/ffjson/fflib/v1/internal/ftoa.go b/vendor/github.com/pquerna/ffjson/fflib/v1/internal/ftoa.go new file mode 100644 index 00000000..253f83b4 --- /dev/null +++ b/vendor/github.com/pquerna/ffjson/fflib/v1/internal/ftoa.go @@ -0,0 +1,475 @@ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Binary to decimal floating point conversion. +// Algorithm: +// 1) store mantissa in multiprecision decimal +// 2) shift decimal by exponent +// 3) read digits out & format + +package internal + +import "math" + +// TODO: move elsewhere? +type floatInfo struct { + mantbits uint + expbits uint + bias int +} + +var float32info = floatInfo{23, 8, -127} +var float64info = floatInfo{52, 11, -1023} + +// FormatFloat converts the floating-point number f to a string, +// according to the format fmt and precision prec. It rounds the +// result assuming that the original was obtained from a floating-point +// value of bitSize bits (32 for float32, 64 for float64). +// +// The format fmt is one of +// 'b' (-ddddp±ddd, a binary exponent), +// 'e' (-d.dddde±dd, a decimal exponent), +// 'E' (-d.ddddE±dd, a decimal exponent), +// 'f' (-ddd.dddd, no exponent), +// 'g' ('e' for large exponents, 'f' otherwise), or +// 'G' ('E' for large exponents, 'f' otherwise). +// +// The precision prec controls the number of digits +// (excluding the exponent) printed by the 'e', 'E', 'f', 'g', and 'G' formats. +// For 'e', 'E', and 'f' it is the number of digits after the decimal point. +// For 'g' and 'G' it is the total number of digits. +// The special precision -1 uses the smallest number of digits +// necessary such that ParseFloat will return f exactly. +func formatFloat(f float64, fmt byte, prec, bitSize int) string { + return string(genericFtoa(make([]byte, 0, max(prec+4, 24)), f, fmt, prec, bitSize)) +} + +// AppendFloat appends the string form of the floating-point number f, +// as generated by FormatFloat, to dst and returns the extended buffer. +func appendFloat(dst []byte, f float64, fmt byte, prec int, bitSize int) []byte { + return genericFtoa(dst, f, fmt, prec, bitSize) +} + +func genericFtoa(dst []byte, val float64, fmt byte, prec, bitSize int) []byte { + var bits uint64 + var flt *floatInfo + switch bitSize { + case 32: + bits = uint64(math.Float32bits(float32(val))) + flt = &float32info + case 64: + bits = math.Float64bits(val) + flt = &float64info + default: + panic("strconv: illegal AppendFloat/FormatFloat bitSize") + } + + neg := bits>>(flt.expbits+flt.mantbits) != 0 + exp := int(bits>>flt.mantbits) & (1< digs.nd && digs.nd >= digs.dp { + eprec = digs.nd + } + // %e is used if the exponent from the conversion + // is less than -4 or greater than or equal to the precision. + // if precision was the shortest possible, use precision 6 for this decision. + if shortest { + eprec = 6 + } + exp := digs.dp - 1 + if exp < -4 || exp >= eprec { + if prec > digs.nd { + prec = digs.nd + } + return fmtE(dst, neg, digs, prec-1, fmt+'e'-'g') + } + if prec > digs.dp { + prec = digs.nd + } + return fmtF(dst, neg, digs, max(prec-digs.dp, 0)) + } + + // unknown format + return append(dst, '%', fmt) +} + +// Round d (= mant * 2^exp) to the shortest number of digits +// that will let the original floating point value be precisely +// reconstructed. Size is original floating point size (64 or 32). +func roundShortest(d *decimal, mant uint64, exp int, flt *floatInfo) { + // If mantissa is zero, the number is zero; stop now. + if mant == 0 { + d.nd = 0 + return + } + + // Compute upper and lower such that any decimal number + // between upper and lower (possibly inclusive) + // will round to the original floating point number. + + // We may see at once that the number is already shortest. + // + // Suppose d is not denormal, so that 2^exp <= d < 10^dp. + // The closest shorter number is at least 10^(dp-nd) away. + // The lower/upper bounds computed below are at distance + // at most 2^(exp-mantbits). + // + // So the number is already shortest if 10^(dp-nd) > 2^(exp-mantbits), + // or equivalently log2(10)*(dp-nd) > exp-mantbits. + // It is true if 332/100*(dp-nd) >= exp-mantbits (log2(10) > 3.32). + minexp := flt.bias + 1 // minimum possible exponent + if exp > minexp && 332*(d.dp-d.nd) >= 100*(exp-int(flt.mantbits)) { + // The number is already shortest. + return + } + + // d = mant << (exp - mantbits) + // Next highest floating point number is mant+1 << exp-mantbits. + // Our upper bound is halfway between, mant*2+1 << exp-mantbits-1. + upper := new(decimal) + upper.Assign(mant*2 + 1) + upper.Shift(exp - int(flt.mantbits) - 1) + + // d = mant << (exp - mantbits) + // Next lowest floating point number is mant-1 << exp-mantbits, + // unless mant-1 drops the significant bit and exp is not the minimum exp, + // in which case the next lowest is mant*2-1 << exp-mantbits-1. + // Either way, call it mantlo << explo-mantbits. + // Our lower bound is halfway between, mantlo*2+1 << explo-mantbits-1. + var mantlo uint64 + var explo int + if mant > 1< 0 { + dst = append(dst, '.') + i := 1 + m := d.nd + prec + 1 - max(d.nd, prec+1) + for i < m { + dst = append(dst, d.d[i]) + i++ + } + for i <= prec { + dst = append(dst, '0') + i++ + } + } + + // e± + dst = append(dst, fmt) + exp := d.dp - 1 + if d.nd == 0 { // special case: 0 has exponent 0 + exp = 0 + } + if exp < 0 { + ch = '-' + exp = -exp + } else { + ch = '+' + } + dst = append(dst, ch) + + // dddd + var buf [3]byte + i := len(buf) + for exp >= 10 { + i-- + buf[i] = byte(exp%10 + '0') + exp /= 10 + } + // exp < 10 + i-- + buf[i] = byte(exp + '0') + + switch i { + case 0: + dst = append(dst, buf[0], buf[1], buf[2]) + case 1: + dst = append(dst, buf[1], buf[2]) + case 2: + // leading zeroes + dst = append(dst, '0', buf[2]) + } + return dst +} + +// %f: -ddddddd.ddddd +func fmtF(dst []byte, neg bool, d decimalSlice, prec int) []byte { + // sign + if neg { + dst = append(dst, '-') + } + + // integer, padded with zeros as needed. + if d.dp > 0 { + var i int + for i = 0; i < d.dp && i < d.nd; i++ { + dst = append(dst, d.d[i]) + } + for ; i < d.dp; i++ { + dst = append(dst, '0') + } + } else { + dst = append(dst, '0') + } + + // fraction + if prec > 0 { + dst = append(dst, '.') + for i := 0; i < prec; i++ { + ch := byte('0') + if j := d.dp + i; 0 <= j && j < d.nd { + ch = d.d[j] + } + dst = append(dst, ch) + } + } + + return dst +} + +// %b: -ddddddddp+ddd +func fmtB(dst []byte, neg bool, mant uint64, exp int, flt *floatInfo) []byte { + var buf [50]byte + w := len(buf) + exp -= int(flt.mantbits) + esign := byte('+') + if exp < 0 { + esign = '-' + exp = -exp + } + n := 0 + for exp > 0 || n < 1 { + n++ + w-- + buf[w] = byte(exp%10 + '0') + exp /= 10 + } + w-- + buf[w] = esign + w-- + buf[w] = 'p' + n = 0 + for mant > 0 || n < 1 { + n++ + w-- + buf[w] = byte(mant%10 + '0') + mant /= 10 + } + if neg { + w-- + buf[w] = '-' + } + return append(dst, buf[w:]...) +} + +func max(a, b int) int { + if a > b { + return a + } + return b +} diff --git a/vendor/github.com/pquerna/ffjson/fflib/v1/iota.go b/vendor/github.com/pquerna/ffjson/fflib/v1/iota.go new file mode 100644 index 00000000..3e50f0c4 --- /dev/null +++ b/vendor/github.com/pquerna/ffjson/fflib/v1/iota.go @@ -0,0 +1,161 @@ +/** + * Copyright 2014 Paul Querna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +/* Portions of this file are on Go stdlib's strconv/iota.go */ +// Copyright 2009 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package v1 + +import ( + "io" +) + +const ( + digits = "0123456789abcdefghijklmnopqrstuvwxyz" + digits01 = "0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789" + digits10 = "0000000000111111111122222222223333333333444444444455555555556666666666777777777788888888889999999999" +) + +var shifts = [len(digits) + 1]uint{ + 1 << 1: 1, + 1 << 2: 2, + 1 << 3: 3, + 1 << 4: 4, + 1 << 5: 5, +} + +var smallNumbers = [][]byte{ + []byte("0"), + []byte("1"), + []byte("2"), + []byte("3"), + []byte("4"), + []byte("5"), + []byte("6"), + []byte("7"), + []byte("8"), + []byte("9"), + []byte("10"), +} + +type FormatBitsWriter interface { + io.Writer + io.ByteWriter +} + +type FormatBitsScratch struct{} + +// +// DEPRECIATED: `scratch` is no longer used, FormatBits2 is available. +// +// FormatBits computes the string representation of u in the given base. +// If neg is set, u is treated as negative int64 value. If append_ is +// set, the string is appended to dst and the resulting byte slice is +// returned as the first result value; otherwise the string is returned +// as the second result value. +// +func FormatBits(scratch *FormatBitsScratch, dst FormatBitsWriter, u uint64, base int, neg bool) { + FormatBits2(dst, u, base, neg) +} + +// FormatBits2 computes the string representation of u in the given base. +// If neg is set, u is treated as negative int64 value. If append_ is +// set, the string is appended to dst and the resulting byte slice is +// returned as the first result value; otherwise the string is returned +// as the second result value. +// +func FormatBits2(dst FormatBitsWriter, u uint64, base int, neg bool) { + if base < 2 || base > len(digits) { + panic("strconv: illegal AppendInt/FormatInt base") + } + // fast path for small common numbers + if u <= 10 { + if neg { + dst.WriteByte('-') + } + dst.Write(smallNumbers[u]) + return + } + + // 2 <= base && base <= len(digits) + + var a = makeSlice(65) + // var a [64 + 1]byte // +1 for sign of 64bit value in base 2 + i := len(a) + + if neg { + u = -u + } + + // convert bits + if base == 10 { + // common case: use constants for / and % because + // the compiler can optimize it into a multiply+shift, + // and unroll loop + for u >= 100 { + i -= 2 + q := u / 100 + j := uintptr(u - q*100) + a[i+1] = digits01[j] + a[i+0] = digits10[j] + u = q + } + if u >= 10 { + i-- + q := u / 10 + a[i] = digits[uintptr(u-q*10)] + u = q + } + + } else if s := shifts[base]; s > 0 { + // base is power of 2: use shifts and masks instead of / and % + b := uint64(base) + m := uintptr(b) - 1 // == 1<= b { + i-- + a[i] = digits[uintptr(u)&m] + u >>= s + } + + } else { + // general case + b := uint64(base) + for u >= b { + i-- + a[i] = digits[uintptr(u%b)] + u /= b + } + } + + // u < base + i-- + a[i] = digits[uintptr(u)] + + // add sign, if any + if neg { + i-- + a[i] = '-' + } + + dst.Write(a[i:]) + + Pool(a) + + return +} diff --git a/vendor/github.com/pquerna/ffjson/fflib/v1/jsonstring.go b/vendor/github.com/pquerna/ffjson/fflib/v1/jsonstring.go new file mode 100644 index 00000000..513b45d5 --- /dev/null +++ b/vendor/github.com/pquerna/ffjson/fflib/v1/jsonstring.go @@ -0,0 +1,512 @@ +/** + * Copyright 2014 Paul Querna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +/* Portions of this file are on Go stdlib's encoding/json/encode.go */ +// Copyright 2010 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package v1 + +import ( + "io" + "unicode/utf8" + "strconv" + "unicode/utf16" + "unicode" +) + +const hex = "0123456789abcdef" + +type JsonStringWriter interface { + io.Writer + io.ByteWriter + stringWriter +} + +func WriteJsonString(buf JsonStringWriter, s string) { + WriteJson(buf, []byte(s)) +} + +/** + * Function ported from encoding/json: func (e *encodeState) string(s string) (int, error) + */ +func WriteJson(buf JsonStringWriter, s []byte) { + buf.WriteByte('"') + start := 0 + for i := 0; i < len(s); { + if b := s[i]; b < utf8.RuneSelf { + /* + if 0x20 <= b && b != '\\' && b != '"' && b != '<' && b != '>' && b != '&' { + i++ + continue + } + */ + if lt[b] == true { + i++ + continue + } + + if start < i { + buf.Write(s[start:i]) + } + switch b { + case '\\', '"': + buf.WriteByte('\\') + buf.WriteByte(b) + case '\n': + buf.WriteByte('\\') + buf.WriteByte('n') + case '\r': + buf.WriteByte('\\') + buf.WriteByte('r') + default: + // This encodes bytes < 0x20 except for \n and \r, + // as well as < and >. The latter are escaped because they + // can lead to security holes when user-controlled strings + // are rendered into JSON and served to some browsers. + buf.WriteString(`\u00`) + buf.WriteByte(hex[b>>4]) + buf.WriteByte(hex[b&0xF]) + } + i++ + start = i + continue + } + c, size := utf8.DecodeRune(s[i:]) + if c == utf8.RuneError && size == 1 { + if start < i { + buf.Write(s[start:i]) + } + buf.WriteString(`\ufffd`) + i += size + start = i + continue + } + // U+2028 is LINE SEPARATOR. + // U+2029 is PARAGRAPH SEPARATOR. + // They are both technically valid characters in JSON strings, + // but don't work in JSONP, which has to be evaluated as JavaScript, + // and can lead to security holes there. It is valid JSON to + // escape them, so we do so unconditionally. + // See http://timelessrepo.com/json-isnt-a-javascript-subset for discussion. + if c == '\u2028' || c == '\u2029' { + if start < i { + buf.Write(s[start:i]) + } + buf.WriteString(`\u202`) + buf.WriteByte(hex[c&0xF]) + i += size + start = i + continue + } + i += size + } + if start < len(s) { + buf.Write(s[start:]) + } + buf.WriteByte('"') +} + +// UnquoteBytes will decode []byte containing json string to go string +// ported from encoding/json/decode.go +func UnquoteBytes(s []byte) (t []byte, ok bool) { + if len(s) < 2 || s[0] != '"' || s[len(s)-1] != '"' { + return + } + s = s[1 : len(s)-1] + + // Check for unusual characters. If there are none, + // then no unquoting is needed, so return a slice of the + // original bytes. + r := 0 + for r < len(s) { + c := s[r] + if c == '\\' || c == '"' || c < ' ' { + break + } + if c < utf8.RuneSelf { + r++ + continue + } + rr, size := utf8.DecodeRune(s[r:]) + if rr == utf8.RuneError && size == 1 { + break + } + r += size + } + if r == len(s) { + return s, true + } + + b := make([]byte, len(s)+2*utf8.UTFMax) + w := copy(b, s[0:r]) + for r < len(s) { + // Out of room? Can only happen if s is full of + // malformed UTF-8 and we're replacing each + // byte with RuneError. + if w >= len(b)-2*utf8.UTFMax { + nb := make([]byte, (len(b)+utf8.UTFMax)*2) + copy(nb, b[0:w]) + b = nb + } + switch c := s[r]; { + case c == '\\': + r++ + if r >= len(s) { + return + } + switch s[r] { + default: + return + case '"', '\\', '/', '\'': + b[w] = s[r] + r++ + w++ + case 'b': + b[w] = '\b' + r++ + w++ + case 'f': + b[w] = '\f' + r++ + w++ + case 'n': + b[w] = '\n' + r++ + w++ + case 'r': + b[w] = '\r' + r++ + w++ + case 't': + b[w] = '\t' + r++ + w++ + case 'u': + r-- + rr := getu4(s[r:]) + if rr < 0 { + return + } + r += 6 + if utf16.IsSurrogate(rr) { + rr1 := getu4(s[r:]) + if dec := utf16.DecodeRune(rr, rr1); dec != unicode.ReplacementChar { + // A valid pair; consume. + r += 6 + w += utf8.EncodeRune(b[w:], dec) + break + } + // Invalid surrogate; fall back to replacement rune. + rr = unicode.ReplacementChar + } + w += utf8.EncodeRune(b[w:], rr) + } + + // Quote, control characters are invalid. + case c == '"', c < ' ': + return + + // ASCII + case c < utf8.RuneSelf: + b[w] = c + r++ + w++ + + // Coerce to well-formed UTF-8. + default: + rr, size := utf8.DecodeRune(s[r:]) + r += size + w += utf8.EncodeRune(b[w:], rr) + } + } + return b[0:w], true +} + +// getu4 decodes \uXXXX from the beginning of s, returning the hex value, +// or it returns -1. +func getu4(s []byte) rune { + if len(s) < 6 || s[0] != '\\' || s[1] != 'u' { + return -1 + } + r, err := strconv.ParseUint(string(s[2:6]), 16, 64) + if err != nil { + return -1 + } + return rune(r) +} + +// TODO(pquerna): consider combining wibth the normal byte mask. +var lt [256]bool = [256]bool{ + false, /* 0 */ + false, /* 1 */ + false, /* 2 */ + false, /* 3 */ + false, /* 4 */ + false, /* 5 */ + false, /* 6 */ + false, /* 7 */ + false, /* 8 */ + false, /* 9 */ + false, /* 10 */ + false, /* 11 */ + false, /* 12 */ + false, /* 13 */ + false, /* 14 */ + false, /* 15 */ + false, /* 16 */ + false, /* 17 */ + false, /* 18 */ + false, /* 19 */ + false, /* 20 */ + false, /* 21 */ + false, /* 22 */ + false, /* 23 */ + false, /* 24 */ + false, /* 25 */ + false, /* 26 */ + false, /* 27 */ + false, /* 28 */ + false, /* 29 */ + false, /* 30 */ + false, /* 31 */ + true, /* 32 */ + true, /* 33 */ + false, /* 34 */ + true, /* 35 */ + true, /* 36 */ + true, /* 37 */ + false, /* 38 */ + true, /* 39 */ + true, /* 40 */ + true, /* 41 */ + true, /* 42 */ + true, /* 43 */ + true, /* 44 */ + true, /* 45 */ + true, /* 46 */ + true, /* 47 */ + true, /* 48 */ + true, /* 49 */ + true, /* 50 */ + true, /* 51 */ + true, /* 52 */ + true, /* 53 */ + true, /* 54 */ + true, /* 55 */ + true, /* 56 */ + true, /* 57 */ + true, /* 58 */ + true, /* 59 */ + false, /* 60 */ + true, /* 61 */ + false, /* 62 */ + true, /* 63 */ + true, /* 64 */ + true, /* 65 */ + true, /* 66 */ + true, /* 67 */ + true, /* 68 */ + true, /* 69 */ + true, /* 70 */ + true, /* 71 */ + true, /* 72 */ + true, /* 73 */ + true, /* 74 */ + true, /* 75 */ + true, /* 76 */ + true, /* 77 */ + true, /* 78 */ + true, /* 79 */ + true, /* 80 */ + true, /* 81 */ + true, /* 82 */ + true, /* 83 */ + true, /* 84 */ + true, /* 85 */ + true, /* 86 */ + true, /* 87 */ + true, /* 88 */ + true, /* 89 */ + true, /* 90 */ + true, /* 91 */ + false, /* 92 */ + true, /* 93 */ + true, /* 94 */ + true, /* 95 */ + true, /* 96 */ + true, /* 97 */ + true, /* 98 */ + true, /* 99 */ + true, /* 100 */ + true, /* 101 */ + true, /* 102 */ + true, /* 103 */ + true, /* 104 */ + true, /* 105 */ + true, /* 106 */ + true, /* 107 */ + true, /* 108 */ + true, /* 109 */ + true, /* 110 */ + true, /* 111 */ + true, /* 112 */ + true, /* 113 */ + true, /* 114 */ + true, /* 115 */ + true, /* 116 */ + true, /* 117 */ + true, /* 118 */ + true, /* 119 */ + true, /* 120 */ + true, /* 121 */ + true, /* 122 */ + true, /* 123 */ + true, /* 124 */ + true, /* 125 */ + true, /* 126 */ + true, /* 127 */ + true, /* 128 */ + true, /* 129 */ + true, /* 130 */ + true, /* 131 */ + true, /* 132 */ + true, /* 133 */ + true, /* 134 */ + true, /* 135 */ + true, /* 136 */ + true, /* 137 */ + true, /* 138 */ + true, /* 139 */ + true, /* 140 */ + true, /* 141 */ + true, /* 142 */ + true, /* 143 */ + true, /* 144 */ + true, /* 145 */ + true, /* 146 */ + true, /* 147 */ + true, /* 148 */ + true, /* 149 */ + true, /* 150 */ + true, /* 151 */ + true, /* 152 */ + true, /* 153 */ + true, /* 154 */ + true, /* 155 */ + true, /* 156 */ + true, /* 157 */ + true, /* 158 */ + true, /* 159 */ + true, /* 160 */ + true, /* 161 */ + true, /* 162 */ + true, /* 163 */ + true, /* 164 */ + true, /* 165 */ + true, /* 166 */ + true, /* 167 */ + true, /* 168 */ + true, /* 169 */ + true, /* 170 */ + true, /* 171 */ + true, /* 172 */ + true, /* 173 */ + true, /* 174 */ + true, /* 175 */ + true, /* 176 */ + true, /* 177 */ + true, /* 178 */ + true, /* 179 */ + true, /* 180 */ + true, /* 181 */ + true, /* 182 */ + true, /* 183 */ + true, /* 184 */ + true, /* 185 */ + true, /* 186 */ + true, /* 187 */ + true, /* 188 */ + true, /* 189 */ + true, /* 190 */ + true, /* 191 */ + true, /* 192 */ + true, /* 193 */ + true, /* 194 */ + true, /* 195 */ + true, /* 196 */ + true, /* 197 */ + true, /* 198 */ + true, /* 199 */ + true, /* 200 */ + true, /* 201 */ + true, /* 202 */ + true, /* 203 */ + true, /* 204 */ + true, /* 205 */ + true, /* 206 */ + true, /* 207 */ + true, /* 208 */ + true, /* 209 */ + true, /* 210 */ + true, /* 211 */ + true, /* 212 */ + true, /* 213 */ + true, /* 214 */ + true, /* 215 */ + true, /* 216 */ + true, /* 217 */ + true, /* 218 */ + true, /* 219 */ + true, /* 220 */ + true, /* 221 */ + true, /* 222 */ + true, /* 223 */ + true, /* 224 */ + true, /* 225 */ + true, /* 226 */ + true, /* 227 */ + true, /* 228 */ + true, /* 229 */ + true, /* 230 */ + true, /* 231 */ + true, /* 232 */ + true, /* 233 */ + true, /* 234 */ + true, /* 235 */ + true, /* 236 */ + true, /* 237 */ + true, /* 238 */ + true, /* 239 */ + true, /* 240 */ + true, /* 241 */ + true, /* 242 */ + true, /* 243 */ + true, /* 244 */ + true, /* 245 */ + true, /* 246 */ + true, /* 247 */ + true, /* 248 */ + true, /* 249 */ + true, /* 250 */ + true, /* 251 */ + true, /* 252 */ + true, /* 253 */ + true, /* 254 */ + true, /* 255 */ +} diff --git a/vendor/github.com/pquerna/ffjson/fflib/v1/lexer.go b/vendor/github.com/pquerna/ffjson/fflib/v1/lexer.go new file mode 100644 index 00000000..8ffd54be --- /dev/null +++ b/vendor/github.com/pquerna/ffjson/fflib/v1/lexer.go @@ -0,0 +1,937 @@ +/** + * Copyright 2014 Paul Querna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +/* Portions of this file are on derived from yajl: */ +/* + * Copyright (c) 2007-2014, Lloyd Hilaiel + * + * Permission to use, copy, modify, and/or distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +package v1 + +import ( + "errors" + "fmt" + "io" +) + +type FFParseState int + +const ( + FFParse_map_start FFParseState = iota + FFParse_want_key + FFParse_want_colon + FFParse_want_value + FFParse_after_value +) + +type FFTok int + +const ( + FFTok_init FFTok = iota + FFTok_bool FFTok = iota + FFTok_colon FFTok = iota + FFTok_comma FFTok = iota + FFTok_eof FFTok = iota + FFTok_error FFTok = iota + FFTok_left_brace FFTok = iota + FFTok_left_bracket FFTok = iota + FFTok_null FFTok = iota + FFTok_right_brace FFTok = iota + FFTok_right_bracket FFTok = iota + + /* we differentiate between integers and doubles to allow the + * parser to interpret the number without re-scanning */ + FFTok_integer FFTok = iota + FFTok_double FFTok = iota + + FFTok_string FFTok = iota + + /* comment tokens are not currently returned to the parser, ever */ + FFTok_comment FFTok = iota +) + +type FFErr int + +const ( + FFErr_e_ok FFErr = iota + FFErr_io FFErr = iota + FFErr_string_invalid_utf8 FFErr = iota + FFErr_string_invalid_escaped_char FFErr = iota + FFErr_string_invalid_json_char FFErr = iota + FFErr_string_invalid_hex_char FFErr = iota + FFErr_invalid_char FFErr = iota + FFErr_invalid_string FFErr = iota + FFErr_missing_integer_after_decimal FFErr = iota + FFErr_missing_integer_after_exponent FFErr = iota + FFErr_missing_integer_after_minus FFErr = iota + FFErr_unallowed_comment FFErr = iota + FFErr_incomplete_comment FFErr = iota + FFErr_unexpected_token_type FFErr = iota // TODO: improve this error +) + +type FFLexer struct { + reader *ffReader + Output DecodingBuffer + Token FFTok + Error FFErr + BigError error + // TODO: convert all of this to an interface + lastCurrentChar int + captureAll bool + buf Buffer +} + +func NewFFLexer(input []byte) *FFLexer { + fl := &FFLexer{ + Token: FFTok_init, + Error: FFErr_e_ok, + reader: newffReader(input), + Output: &Buffer{}, + } + // TODO: guess size? + //fl.Output.Grow(64) + return fl +} + +type LexerError struct { + offset int + line int + char int + err error +} + +// Reset the Lexer and add new input. +func (ffl *FFLexer) Reset(input []byte) { + ffl.Token = FFTok_init + ffl.Error = FFErr_e_ok + ffl.BigError = nil + ffl.reader.Reset(input) + ffl.lastCurrentChar = 0 + ffl.Output.Reset() +} + +func (le *LexerError) Error() string { + return fmt.Sprintf(`ffjson error: (%T)%s offset=%d line=%d char=%d`, + le.err, le.err.Error(), + le.offset, le.line, le.char) +} + +func (ffl *FFLexer) WrapErr(err error) error { + line, char := ffl.reader.PosWithLine() + // TOOD: calcualte lines/characters based on offset + return &LexerError{ + offset: ffl.reader.Pos(), + line: line, + char: char, + err: err, + } +} + +func (ffl *FFLexer) scanReadByte() (byte, error) { + var c byte + var err error + if ffl.captureAll { + c, err = ffl.reader.ReadByte() + } else { + c, err = ffl.reader.ReadByteNoWS() + } + + if err != nil { + ffl.Error = FFErr_io + ffl.BigError = err + return 0, err + } + + return c, nil +} + +func (ffl *FFLexer) readByte() (byte, error) { + + c, err := ffl.reader.ReadByte() + if err != nil { + ffl.Error = FFErr_io + ffl.BigError = err + return 0, err + } + + return c, nil +} + +func (ffl *FFLexer) unreadByte() { + ffl.reader.UnreadByte() +} + +func (ffl *FFLexer) wantBytes(want []byte, iftrue FFTok) FFTok { + startPos := ffl.reader.Pos() + for _, b := range want { + c, err := ffl.readByte() + + if err != nil { + return FFTok_error + } + + if c != b { + ffl.unreadByte() + // fmt.Printf("wanted bytes: %s\n", string(want)) + // TODO(pquerna): thsi is a bad error message + ffl.Error = FFErr_invalid_string + return FFTok_error + } + } + + endPos := ffl.reader.Pos() + ffl.Output.Write(ffl.reader.Slice(startPos, endPos)) + return iftrue +} + +func (ffl *FFLexer) lexComment() FFTok { + c, err := ffl.readByte() + if err != nil { + return FFTok_error + } + + if c == '/' { + // a // comment, scan until line ends. + for { + c, err := ffl.readByte() + if err != nil { + return FFTok_error + } + + if c == '\n' { + return FFTok_comment + } + } + } else if c == '*' { + // a /* */ comment, scan */ + for { + c, err := ffl.readByte() + if err != nil { + return FFTok_error + } + + if c == '*' { + c, err := ffl.readByte() + + if err != nil { + return FFTok_error + } + + if c == '/' { + return FFTok_comment + } + + ffl.Error = FFErr_incomplete_comment + return FFTok_error + } + } + } else { + ffl.Error = FFErr_incomplete_comment + return FFTok_error + } +} + +func (ffl *FFLexer) lexString() FFTok { + if ffl.captureAll { + ffl.buf.Reset() + err := ffl.reader.SliceString(&ffl.buf) + + if err != nil { + ffl.BigError = err + return FFTok_error + } + + WriteJson(ffl.Output, ffl.buf.Bytes()) + + return FFTok_string + } else { + err := ffl.reader.SliceString(ffl.Output) + + if err != nil { + ffl.BigError = err + return FFTok_error + } + + return FFTok_string + } +} + +func (ffl *FFLexer) lexNumber() FFTok { + var numRead int = 0 + tok := FFTok_integer + startPos := ffl.reader.Pos() + + c, err := ffl.readByte() + if err != nil { + return FFTok_error + } + + /* optional leading minus */ + if c == '-' { + c, err = ffl.readByte() + if err != nil { + return FFTok_error + } + } + + /* a single zero, or a series of integers */ + if c == '0' { + c, err = ffl.readByte() + if err != nil { + return FFTok_error + } + } else if c >= '1' && c <= '9' { + for c >= '0' && c <= '9' { + c, err = ffl.readByte() + if err != nil { + return FFTok_error + } + } + } else { + ffl.unreadByte() + ffl.Error = FFErr_missing_integer_after_minus + return FFTok_error + } + + if c == '.' { + numRead = 0 + c, err = ffl.readByte() + if err != nil { + return FFTok_error + } + + for c >= '0' && c <= '9' { + numRead++ + c, err = ffl.readByte() + if err != nil { + return FFTok_error + } + } + + if numRead == 0 { + ffl.unreadByte() + + ffl.Error = FFErr_missing_integer_after_decimal + return FFTok_error + } + + tok = FFTok_double + } + + /* optional exponent (indicates this is floating point) */ + if c == 'e' || c == 'E' { + numRead = 0 + c, err = ffl.readByte() + if err != nil { + return FFTok_error + } + + /* optional sign */ + if c == '+' || c == '-' { + c, err = ffl.readByte() + if err != nil { + return FFTok_error + } + } + + for c >= '0' && c <= '9' { + numRead++ + c, err = ffl.readByte() + if err != nil { + return FFTok_error + } + } + + if numRead == 0 { + ffl.Error = FFErr_missing_integer_after_exponent + return FFTok_error + } + + tok = FFTok_double + } + + ffl.unreadByte() + + endPos := ffl.reader.Pos() + ffl.Output.Write(ffl.reader.Slice(startPos, endPos)) + return tok +} + +var true_bytes = []byte{'r', 'u', 'e'} +var false_bytes = []byte{'a', 'l', 's', 'e'} +var null_bytes = []byte{'u', 'l', 'l'} + +func (ffl *FFLexer) Scan() FFTok { + tok := FFTok_error + if ffl.captureAll == false { + ffl.Output.Reset() + } + ffl.Token = FFTok_init + + for { + c, err := ffl.scanReadByte() + if err != nil { + if err == io.EOF { + return FFTok_eof + } else { + return FFTok_error + } + } + + switch c { + case '{': + tok = FFTok_left_bracket + if ffl.captureAll { + ffl.Output.WriteByte('{') + } + goto lexed + case '}': + tok = FFTok_right_bracket + if ffl.captureAll { + ffl.Output.WriteByte('}') + } + goto lexed + case '[': + tok = FFTok_left_brace + if ffl.captureAll { + ffl.Output.WriteByte('[') + } + goto lexed + case ']': + tok = FFTok_right_brace + if ffl.captureAll { + ffl.Output.WriteByte(']') + } + goto lexed + case ',': + tok = FFTok_comma + if ffl.captureAll { + ffl.Output.WriteByte(',') + } + goto lexed + case ':': + tok = FFTok_colon + if ffl.captureAll { + ffl.Output.WriteByte(':') + } + goto lexed + case '\t', '\n', '\v', '\f', '\r', ' ': + if ffl.captureAll { + ffl.Output.WriteByte(c) + } + break + case 't': + ffl.Output.WriteByte('t') + tok = ffl.wantBytes(true_bytes, FFTok_bool) + goto lexed + case 'f': + ffl.Output.WriteByte('f') + tok = ffl.wantBytes(false_bytes, FFTok_bool) + goto lexed + case 'n': + ffl.Output.WriteByte('n') + tok = ffl.wantBytes(null_bytes, FFTok_null) + goto lexed + case '"': + tok = ffl.lexString() + goto lexed + case '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9': + ffl.unreadByte() + tok = ffl.lexNumber() + goto lexed + case '/': + tok = ffl.lexComment() + goto lexed + default: + tok = FFTok_error + ffl.Error = FFErr_invalid_char + } + } + +lexed: + ffl.Token = tok + return tok +} + +func (ffl *FFLexer) scanField(start FFTok, capture bool) ([]byte, error) { + switch start { + case FFTok_left_brace, + FFTok_left_bracket: + { + end := FFTok_right_brace + if start == FFTok_left_bracket { + end = FFTok_right_bracket + if capture { + ffl.Output.WriteByte('{') + } + } else { + if capture { + ffl.Output.WriteByte('[') + } + } + + depth := 1 + if capture { + ffl.captureAll = true + } + // TODO: work. + scanloop: + for { + tok := ffl.Scan() + //fmt.Printf("capture-token: %v end: %v depth: %v\n", tok, end, depth) + switch tok { + case FFTok_eof: + return nil, errors.New("ffjson: unexpected EOF") + case FFTok_error: + if ffl.BigError != nil { + return nil, ffl.BigError + } + return nil, ffl.Error.ToError() + case end: + depth-- + if depth == 0 { + break scanloop + } + case start: + depth++ + } + } + + if capture { + ffl.captureAll = false + } + + if capture { + return ffl.Output.Bytes(), nil + } else { + return nil, nil + } + } + case FFTok_bool, + FFTok_integer, + FFTok_null, + FFTok_double: + // simple value, return it. + if capture { + return ffl.Output.Bytes(), nil + } else { + return nil, nil + } + + case FFTok_string: + //TODO(pquerna): so, other users expect this to be a quoted string :( + if capture { + ffl.buf.Reset() + WriteJson(&ffl.buf, ffl.Output.Bytes()) + return ffl.buf.Bytes(), nil + } else { + return nil, nil + } + } + + return nil, fmt.Errorf("ffjson: invalid capture type: %v", start) +} + +// Captures an entire field value, including recursive objects, +// and converts them to a []byte suitable to pass to a sub-object's +// UnmarshalJSON +func (ffl *FFLexer) CaptureField(start FFTok) ([]byte, error) { + return ffl.scanField(start, true) +} + +func (ffl *FFLexer) SkipField(start FFTok) error { + _, err := ffl.scanField(start, false) + return err +} + +// TODO(pquerna): return line number and offset. +func (err FFErr) ToError() error { + switch err { + case FFErr_e_ok: + return nil + case FFErr_io: + return errors.New("ffjson: IO error") + case FFErr_string_invalid_utf8: + return errors.New("ffjson: string with invalid UTF-8 sequence") + case FFErr_string_invalid_escaped_char: + return errors.New("ffjson: string with invalid escaped character") + case FFErr_string_invalid_json_char: + return errors.New("ffjson: string with invalid JSON character") + case FFErr_string_invalid_hex_char: + return errors.New("ffjson: string with invalid hex character") + case FFErr_invalid_char: + return errors.New("ffjson: invalid character") + case FFErr_invalid_string: + return errors.New("ffjson: invalid string") + case FFErr_missing_integer_after_decimal: + return errors.New("ffjson: missing integer after decimal") + case FFErr_missing_integer_after_exponent: + return errors.New("ffjson: missing integer after exponent") + case FFErr_missing_integer_after_minus: + return errors.New("ffjson: missing integer after minus") + case FFErr_unallowed_comment: + return errors.New("ffjson: unallowed comment") + case FFErr_incomplete_comment: + return errors.New("ffjson: incomplete comment") + case FFErr_unexpected_token_type: + return errors.New("ffjson: unexpected token sequence") + } + + panic(fmt.Sprintf("unknown error type: %v ", err)) +} + +func (state FFParseState) String() string { + switch state { + case FFParse_map_start: + return "map:start" + case FFParse_want_key: + return "want_key" + case FFParse_want_colon: + return "want_colon" + case FFParse_want_value: + return "want_value" + case FFParse_after_value: + return "after_value" + } + + panic(fmt.Sprintf("unknown parse state: %d", int(state))) +} + +func (tok FFTok) String() string { + switch tok { + case FFTok_init: + return "tok:init" + case FFTok_bool: + return "tok:bool" + case FFTok_colon: + return "tok:colon" + case FFTok_comma: + return "tok:comma" + case FFTok_eof: + return "tok:eof" + case FFTok_error: + return "tok:error" + case FFTok_left_brace: + return "tok:left_brace" + case FFTok_left_bracket: + return "tok:left_bracket" + case FFTok_null: + return "tok:null" + case FFTok_right_brace: + return "tok:right_brace" + case FFTok_right_bracket: + return "tok:right_bracket" + case FFTok_integer: + return "tok:integer" + case FFTok_double: + return "tok:double" + case FFTok_string: + return "tok:string" + case FFTok_comment: + return "comment" + } + + panic(fmt.Sprintf("unknown token: %d", int(tok))) +} + +/* a lookup table which lets us quickly determine three things: + * cVEC - valid escaped control char + * note. the solidus '/' may be escaped or not. + * cIJC - invalid json char + * cVHC - valid hex char + * cNFP - needs further processing (from a string scanning perspective) + * cNUC - needs utf8 checking when enabled (from a string scanning perspective) + */ + +const ( + cVEC int8 = 0x01 + cIJC int8 = 0x02 + cVHC int8 = 0x04 + cNFP int8 = 0x08 + cNUC int8 = 0x10 +) + +var byteLookupTable [256]int8 = [256]int8{ + cIJC, /* 0 */ + cIJC, /* 1 */ + cIJC, /* 2 */ + cIJC, /* 3 */ + cIJC, /* 4 */ + cIJC, /* 5 */ + cIJC, /* 6 */ + cIJC, /* 7 */ + cIJC, /* 8 */ + cIJC, /* 9 */ + cIJC, /* 10 */ + cIJC, /* 11 */ + cIJC, /* 12 */ + cIJC, /* 13 */ + cIJC, /* 14 */ + cIJC, /* 15 */ + cIJC, /* 16 */ + cIJC, /* 17 */ + cIJC, /* 18 */ + cIJC, /* 19 */ + cIJC, /* 20 */ + cIJC, /* 21 */ + cIJC, /* 22 */ + cIJC, /* 23 */ + cIJC, /* 24 */ + cIJC, /* 25 */ + cIJC, /* 26 */ + cIJC, /* 27 */ + cIJC, /* 28 */ + cIJC, /* 29 */ + cIJC, /* 30 */ + cIJC, /* 31 */ + 0, /* 32 */ + 0, /* 33 */ + cVEC | cIJC | cNFP, /* 34 */ + 0, /* 35 */ + 0, /* 36 */ + 0, /* 37 */ + 0, /* 38 */ + 0, /* 39 */ + 0, /* 40 */ + 0, /* 41 */ + 0, /* 42 */ + 0, /* 43 */ + 0, /* 44 */ + 0, /* 45 */ + 0, /* 46 */ + cVEC, /* 47 */ + cVHC, /* 48 */ + cVHC, /* 49 */ + cVHC, /* 50 */ + cVHC, /* 51 */ + cVHC, /* 52 */ + cVHC, /* 53 */ + cVHC, /* 54 */ + cVHC, /* 55 */ + cVHC, /* 56 */ + cVHC, /* 57 */ + 0, /* 58 */ + 0, /* 59 */ + 0, /* 60 */ + 0, /* 61 */ + 0, /* 62 */ + 0, /* 63 */ + 0, /* 64 */ + cVHC, /* 65 */ + cVHC, /* 66 */ + cVHC, /* 67 */ + cVHC, /* 68 */ + cVHC, /* 69 */ + cVHC, /* 70 */ + 0, /* 71 */ + 0, /* 72 */ + 0, /* 73 */ + 0, /* 74 */ + 0, /* 75 */ + 0, /* 76 */ + 0, /* 77 */ + 0, /* 78 */ + 0, /* 79 */ + 0, /* 80 */ + 0, /* 81 */ + 0, /* 82 */ + 0, /* 83 */ + 0, /* 84 */ + 0, /* 85 */ + 0, /* 86 */ + 0, /* 87 */ + 0, /* 88 */ + 0, /* 89 */ + 0, /* 90 */ + 0, /* 91 */ + cVEC | cIJC | cNFP, /* 92 */ + 0, /* 93 */ + 0, /* 94 */ + 0, /* 95 */ + 0, /* 96 */ + cVHC, /* 97 */ + cVEC | cVHC, /* 98 */ + cVHC, /* 99 */ + cVHC, /* 100 */ + cVHC, /* 101 */ + cVEC | cVHC, /* 102 */ + 0, /* 103 */ + 0, /* 104 */ + 0, /* 105 */ + 0, /* 106 */ + 0, /* 107 */ + 0, /* 108 */ + 0, /* 109 */ + cVEC, /* 110 */ + 0, /* 111 */ + 0, /* 112 */ + 0, /* 113 */ + cVEC, /* 114 */ + 0, /* 115 */ + cVEC, /* 116 */ + 0, /* 117 */ + 0, /* 118 */ + 0, /* 119 */ + 0, /* 120 */ + 0, /* 121 */ + 0, /* 122 */ + 0, /* 123 */ + 0, /* 124 */ + 0, /* 125 */ + 0, /* 126 */ + 0, /* 127 */ + cNUC, /* 128 */ + cNUC, /* 129 */ + cNUC, /* 130 */ + cNUC, /* 131 */ + cNUC, /* 132 */ + cNUC, /* 133 */ + cNUC, /* 134 */ + cNUC, /* 135 */ + cNUC, /* 136 */ + cNUC, /* 137 */ + cNUC, /* 138 */ + cNUC, /* 139 */ + cNUC, /* 140 */ + cNUC, /* 141 */ + cNUC, /* 142 */ + cNUC, /* 143 */ + cNUC, /* 144 */ + cNUC, /* 145 */ + cNUC, /* 146 */ + cNUC, /* 147 */ + cNUC, /* 148 */ + cNUC, /* 149 */ + cNUC, /* 150 */ + cNUC, /* 151 */ + cNUC, /* 152 */ + cNUC, /* 153 */ + cNUC, /* 154 */ + cNUC, /* 155 */ + cNUC, /* 156 */ + cNUC, /* 157 */ + cNUC, /* 158 */ + cNUC, /* 159 */ + cNUC, /* 160 */ + cNUC, /* 161 */ + cNUC, /* 162 */ + cNUC, /* 163 */ + cNUC, /* 164 */ + cNUC, /* 165 */ + cNUC, /* 166 */ + cNUC, /* 167 */ + cNUC, /* 168 */ + cNUC, /* 169 */ + cNUC, /* 170 */ + cNUC, /* 171 */ + cNUC, /* 172 */ + cNUC, /* 173 */ + cNUC, /* 174 */ + cNUC, /* 175 */ + cNUC, /* 176 */ + cNUC, /* 177 */ + cNUC, /* 178 */ + cNUC, /* 179 */ + cNUC, /* 180 */ + cNUC, /* 181 */ + cNUC, /* 182 */ + cNUC, /* 183 */ + cNUC, /* 184 */ + cNUC, /* 185 */ + cNUC, /* 186 */ + cNUC, /* 187 */ + cNUC, /* 188 */ + cNUC, /* 189 */ + cNUC, /* 190 */ + cNUC, /* 191 */ + cNUC, /* 192 */ + cNUC, /* 193 */ + cNUC, /* 194 */ + cNUC, /* 195 */ + cNUC, /* 196 */ + cNUC, /* 197 */ + cNUC, /* 198 */ + cNUC, /* 199 */ + cNUC, /* 200 */ + cNUC, /* 201 */ + cNUC, /* 202 */ + cNUC, /* 203 */ + cNUC, /* 204 */ + cNUC, /* 205 */ + cNUC, /* 206 */ + cNUC, /* 207 */ + cNUC, /* 208 */ + cNUC, /* 209 */ + cNUC, /* 210 */ + cNUC, /* 211 */ + cNUC, /* 212 */ + cNUC, /* 213 */ + cNUC, /* 214 */ + cNUC, /* 215 */ + cNUC, /* 216 */ + cNUC, /* 217 */ + cNUC, /* 218 */ + cNUC, /* 219 */ + cNUC, /* 220 */ + cNUC, /* 221 */ + cNUC, /* 222 */ + cNUC, /* 223 */ + cNUC, /* 224 */ + cNUC, /* 225 */ + cNUC, /* 226 */ + cNUC, /* 227 */ + cNUC, /* 228 */ + cNUC, /* 229 */ + cNUC, /* 230 */ + cNUC, /* 231 */ + cNUC, /* 232 */ + cNUC, /* 233 */ + cNUC, /* 234 */ + cNUC, /* 235 */ + cNUC, /* 236 */ + cNUC, /* 237 */ + cNUC, /* 238 */ + cNUC, /* 239 */ + cNUC, /* 240 */ + cNUC, /* 241 */ + cNUC, /* 242 */ + cNUC, /* 243 */ + cNUC, /* 244 */ + cNUC, /* 245 */ + cNUC, /* 246 */ + cNUC, /* 247 */ + cNUC, /* 248 */ + cNUC, /* 249 */ + cNUC, /* 250 */ + cNUC, /* 251 */ + cNUC, /* 252 */ + cNUC, /* 253 */ + cNUC, /* 254 */ + cNUC, /* 255 */ +} diff --git a/vendor/github.com/pquerna/ffjson/fflib/v1/reader.go b/vendor/github.com/pquerna/ffjson/fflib/v1/reader.go new file mode 100644 index 00000000..0f22c469 --- /dev/null +++ b/vendor/github.com/pquerna/ffjson/fflib/v1/reader.go @@ -0,0 +1,512 @@ +/** + * Copyright 2014 Paul Querna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package v1 + +import ( + "fmt" + "io" + "unicode" + "unicode/utf16" +) + +const sliceStringMask = cIJC | cNFP + +type ffReader struct { + s []byte + i int + l int +} + +func newffReader(d []byte) *ffReader { + return &ffReader{ + s: d, + i: 0, + l: len(d), + } +} + +func (r *ffReader) Slice(start, stop int) []byte { + return r.s[start:stop] +} + +func (r *ffReader) Pos() int { + return r.i +} + +// Reset the reader, and add new input. +func (r *ffReader) Reset(d []byte) { + r.s = d + r.i = 0 + r.l = len(d) +} + +// Calcuates the Position with line and line offset, +// because this isn't counted for performance reasons, +// it will iterate the buffer from the beginning, and should +// only be used in error-paths. +func (r *ffReader) PosWithLine() (int, int) { + currentLine := 1 + currentChar := 0 + + for i := 0; i < r.i; i++ { + c := r.s[i] + currentChar++ + if c == '\n' { + currentLine++ + currentChar = 0 + } + } + + return currentLine, currentChar +} + +func (r *ffReader) ReadByteNoWS() (byte, error) { + if r.i >= r.l { + return 0, io.EOF + } + + j := r.i + + for { + c := r.s[j] + j++ + + // inline whitespace parsing gives another ~8% performance boost + // for many kinds of nicely indented JSON. + // ... and using a [255]bool instead of multiple ifs, gives another 2% + /* + if c != '\t' && + c != '\n' && + c != '\v' && + c != '\f' && + c != '\r' && + c != ' ' { + r.i = j + return c, nil + } + */ + if whitespaceLookupTable[c] == false { + r.i = j + return c, nil + } + + if j >= r.l { + return 0, io.EOF + } + } +} + +func (r *ffReader) ReadByte() (byte, error) { + if r.i >= r.l { + return 0, io.EOF + } + + r.i++ + + return r.s[r.i-1], nil +} + +func (r *ffReader) UnreadByte() error { + if r.i <= 0 { + panic("ffReader.UnreadByte: at beginning of slice") + } + r.i-- + return nil +} + +func (r *ffReader) readU4(j int) (rune, error) { + + var u4 [4]byte + for i := 0; i < 4; i++ { + if j >= r.l { + return -1, io.EOF + } + c := r.s[j] + if byteLookupTable[c]&cVHC != 0 { + u4[i] = c + j++ + continue + } else { + // TODO(pquerna): handle errors better. layering violation. + return -1, fmt.Errorf("lex_string_invalid_hex_char: %v %v", c, string(u4[:])) + } + } + + // TODO(pquerna): utf16.IsSurrogate + rr, err := ParseUint(u4[:], 16, 64) + if err != nil { + return -1, err + } + return rune(rr), nil +} + +func (r *ffReader) handleEscaped(c byte, j int, out DecodingBuffer) (int, error) { + if j >= r.l { + return 0, io.EOF + } + + c = r.s[j] + j++ + + if c == 'u' { + ru, err := r.readU4(j) + if err != nil { + return 0, err + } + + if utf16.IsSurrogate(ru) { + ru2, err := r.readU4(j + 6) + if err != nil { + return 0, err + } + out.Write(r.s[r.i : j-2]) + r.i = j + 10 + j = r.i + rval := utf16.DecodeRune(ru, ru2) + if rval != unicode.ReplacementChar { + out.WriteRune(rval) + } else { + return 0, fmt.Errorf("lex_string_invalid_unicode_surrogate: %v %v", ru, ru2) + } + } else { + out.Write(r.s[r.i : j-2]) + r.i = j + 4 + j = r.i + out.WriteRune(ru) + } + return j, nil + } else if byteLookupTable[c]&cVEC == 0 { + return 0, fmt.Errorf("lex_string_invalid_escaped_char: %v", c) + } else { + out.Write(r.s[r.i : j-2]) + r.i = j + j = r.i + + switch c { + case '"': + out.WriteByte('"') + case '\\': + out.WriteByte('\\') + case '/': + out.WriteByte('/') + case 'b': + out.WriteByte('\b') + case 'f': + out.WriteByte('\f') + case 'n': + out.WriteByte('\n') + case 'r': + out.WriteByte('\r') + case 't': + out.WriteByte('\t') + } + } + + return j, nil +} + +func (r *ffReader) SliceString(out DecodingBuffer) error { + var c byte + // TODO(pquerna): string_with_escapes? de-escape here? + j := r.i + + for { + if j >= r.l { + return io.EOF + } + + j, c = scanString(r.s, j) + + if c == '"' { + if j != r.i { + out.Write(r.s[r.i : j-1]) + r.i = j + } + return nil + } else if c == '\\' { + var err error + j, err = r.handleEscaped(c, j, out) + if err != nil { + return err + } + } else if byteLookupTable[c]&cIJC != 0 { + return fmt.Errorf("lex_string_invalid_json_char: %v", c) + } + continue + } +} + +// TODO(pquerna): consider combining wibth the normal byte mask. +var whitespaceLookupTable [256]bool = [256]bool{ + false, /* 0 */ + false, /* 1 */ + false, /* 2 */ + false, /* 3 */ + false, /* 4 */ + false, /* 5 */ + false, /* 6 */ + false, /* 7 */ + false, /* 8 */ + true, /* 9 */ + true, /* 10 */ + true, /* 11 */ + true, /* 12 */ + true, /* 13 */ + false, /* 14 */ + false, /* 15 */ + false, /* 16 */ + false, /* 17 */ + false, /* 18 */ + false, /* 19 */ + false, /* 20 */ + false, /* 21 */ + false, /* 22 */ + false, /* 23 */ + false, /* 24 */ + false, /* 25 */ + false, /* 26 */ + false, /* 27 */ + false, /* 28 */ + false, /* 29 */ + false, /* 30 */ + false, /* 31 */ + true, /* 32 */ + false, /* 33 */ + false, /* 34 */ + false, /* 35 */ + false, /* 36 */ + false, /* 37 */ + false, /* 38 */ + false, /* 39 */ + false, /* 40 */ + false, /* 41 */ + false, /* 42 */ + false, /* 43 */ + false, /* 44 */ + false, /* 45 */ + false, /* 46 */ + false, /* 47 */ + false, /* 48 */ + false, /* 49 */ + false, /* 50 */ + false, /* 51 */ + false, /* 52 */ + false, /* 53 */ + false, /* 54 */ + false, /* 55 */ + false, /* 56 */ + false, /* 57 */ + false, /* 58 */ + false, /* 59 */ + false, /* 60 */ + false, /* 61 */ + false, /* 62 */ + false, /* 63 */ + false, /* 64 */ + false, /* 65 */ + false, /* 66 */ + false, /* 67 */ + false, /* 68 */ + false, /* 69 */ + false, /* 70 */ + false, /* 71 */ + false, /* 72 */ + false, /* 73 */ + false, /* 74 */ + false, /* 75 */ + false, /* 76 */ + false, /* 77 */ + false, /* 78 */ + false, /* 79 */ + false, /* 80 */ + false, /* 81 */ + false, /* 82 */ + false, /* 83 */ + false, /* 84 */ + false, /* 85 */ + false, /* 86 */ + false, /* 87 */ + false, /* 88 */ + false, /* 89 */ + false, /* 90 */ + false, /* 91 */ + false, /* 92 */ + false, /* 93 */ + false, /* 94 */ + false, /* 95 */ + false, /* 96 */ + false, /* 97 */ + false, /* 98 */ + false, /* 99 */ + false, /* 100 */ + false, /* 101 */ + false, /* 102 */ + false, /* 103 */ + false, /* 104 */ + false, /* 105 */ + false, /* 106 */ + false, /* 107 */ + false, /* 108 */ + false, /* 109 */ + false, /* 110 */ + false, /* 111 */ + false, /* 112 */ + false, /* 113 */ + false, /* 114 */ + false, /* 115 */ + false, /* 116 */ + false, /* 117 */ + false, /* 118 */ + false, /* 119 */ + false, /* 120 */ + false, /* 121 */ + false, /* 122 */ + false, /* 123 */ + false, /* 124 */ + false, /* 125 */ + false, /* 126 */ + false, /* 127 */ + false, /* 128 */ + false, /* 129 */ + false, /* 130 */ + false, /* 131 */ + false, /* 132 */ + false, /* 133 */ + false, /* 134 */ + false, /* 135 */ + false, /* 136 */ + false, /* 137 */ + false, /* 138 */ + false, /* 139 */ + false, /* 140 */ + false, /* 141 */ + false, /* 142 */ + false, /* 143 */ + false, /* 144 */ + false, /* 145 */ + false, /* 146 */ + false, /* 147 */ + false, /* 148 */ + false, /* 149 */ + false, /* 150 */ + false, /* 151 */ + false, /* 152 */ + false, /* 153 */ + false, /* 154 */ + false, /* 155 */ + false, /* 156 */ + false, /* 157 */ + false, /* 158 */ + false, /* 159 */ + false, /* 160 */ + false, /* 161 */ + false, /* 162 */ + false, /* 163 */ + false, /* 164 */ + false, /* 165 */ + false, /* 166 */ + false, /* 167 */ + false, /* 168 */ + false, /* 169 */ + false, /* 170 */ + false, /* 171 */ + false, /* 172 */ + false, /* 173 */ + false, /* 174 */ + false, /* 175 */ + false, /* 176 */ + false, /* 177 */ + false, /* 178 */ + false, /* 179 */ + false, /* 180 */ + false, /* 181 */ + false, /* 182 */ + false, /* 183 */ + false, /* 184 */ + false, /* 185 */ + false, /* 186 */ + false, /* 187 */ + false, /* 188 */ + false, /* 189 */ + false, /* 190 */ + false, /* 191 */ + false, /* 192 */ + false, /* 193 */ + false, /* 194 */ + false, /* 195 */ + false, /* 196 */ + false, /* 197 */ + false, /* 198 */ + false, /* 199 */ + false, /* 200 */ + false, /* 201 */ + false, /* 202 */ + false, /* 203 */ + false, /* 204 */ + false, /* 205 */ + false, /* 206 */ + false, /* 207 */ + false, /* 208 */ + false, /* 209 */ + false, /* 210 */ + false, /* 211 */ + false, /* 212 */ + false, /* 213 */ + false, /* 214 */ + false, /* 215 */ + false, /* 216 */ + false, /* 217 */ + false, /* 218 */ + false, /* 219 */ + false, /* 220 */ + false, /* 221 */ + false, /* 222 */ + false, /* 223 */ + false, /* 224 */ + false, /* 225 */ + false, /* 226 */ + false, /* 227 */ + false, /* 228 */ + false, /* 229 */ + false, /* 230 */ + false, /* 231 */ + false, /* 232 */ + false, /* 233 */ + false, /* 234 */ + false, /* 235 */ + false, /* 236 */ + false, /* 237 */ + false, /* 238 */ + false, /* 239 */ + false, /* 240 */ + false, /* 241 */ + false, /* 242 */ + false, /* 243 */ + false, /* 244 */ + false, /* 245 */ + false, /* 246 */ + false, /* 247 */ + false, /* 248 */ + false, /* 249 */ + false, /* 250 */ + false, /* 251 */ + false, /* 252 */ + false, /* 253 */ + false, /* 254 */ + false, /* 255 */ +} diff --git a/vendor/github.com/pquerna/ffjson/fflib/v1/reader_scan_generic.go b/vendor/github.com/pquerna/ffjson/fflib/v1/reader_scan_generic.go new file mode 100644 index 00000000..47c26077 --- /dev/null +++ b/vendor/github.com/pquerna/ffjson/fflib/v1/reader_scan_generic.go @@ -0,0 +1,34 @@ +/** + * Copyright 2014 Paul Querna + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +package v1 + +func scanString(s []byte, j int) (int, byte) { + for { + if j >= len(s) { + return j, 0 + } + + c := s[j] + j++ + if byteLookupTable[c]&sliceStringMask == 0 { + continue + } + + return j, c + } +}